mix format
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
shibao 2022-03-04 23:17:53 -05:00
parent 8bb4aab49c
commit c0179f48bd
5 changed files with 8 additions and 9 deletions

View File

@ -2,9 +2,9 @@
// update. https://github.com/phoenixframework/phoenix_live_view/issues/1011 // update. https://github.com/phoenixframework/phoenix_live_view/issues/1011
export default { export default {
attrs() { attrs () {
const attrs = this.el.getAttribute('data-attrs'); const attrs = this.el.getAttribute('data-attrs')
if (attrs) { return attrs.split(', '); } else { return []; } if (attrs) { return attrs.split(', ') } else { return [] }
}, },
beforeUpdate () { this.prevAttrs = this.attrs().map(name => [name, this.el.getAttribute(name)]) }, beforeUpdate () { this.prevAttrs = this.attrs().map(name => [name, this.el.getAttribute(name)]) },
updated () { this.prevAttrs.forEach(([name, val]) => this.el.setAttribute(name, val)) } updated () { this.prevAttrs.forEach(([name, val]) => this.el.setAttribute(name, val)) }

View File

@ -6,7 +6,7 @@ defmodule Cannery.Ammo do
import Ecto.Query, warn: false import Ecto.Query, warn: false
alias Cannery.{Accounts.User, Containers, Repo} alias Cannery.{Accounts.User, Containers, Repo}
alias Cannery.Ammo.{AmmoGroup, AmmoType} alias Cannery.Ammo.{AmmoGroup, AmmoType}
alias Ecto.{Changeset, Multi} alias Ecto.Changeset
@ammo_group_create_limit 10_000 @ammo_group_create_limit 10_000

View File

@ -69,7 +69,6 @@
) %> ) %>
<%= error_tag(f, :multiplier, "col-span-3 text-center") %> <%= error_tag(f, :multiplier, "col-span-3 text-center") %>
<% :edit -> %> <% :edit -> %>
<%= submit(dgettext("actions", "Save"), <%= submit(dgettext("actions", "Save"),
phx_disable_with: dgettext("prompts", "Saving..."), phx_disable_with: dgettext("prompts", "Saving..."),

View File

@ -159,11 +159,11 @@ msgid "Tag could not be removed"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:113 #: lib/cannery_web/live/ammo_group_live/form_component.ex:126
msgid "Could not parse number of copies" msgid "Could not parse number of copies"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:98 #: lib/cannery_web/live/ammo_group_live/form_component.ex:111
msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}" msgid "Invalid number of copies, must be between 1 and %{max}. Was %{multiplier}"
msgstr "" msgstr ""

View File

@ -68,7 +68,7 @@ msgid "Ammo group deleted succesfully"
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:75 #: lib/cannery_web/live/ammo_group_live/form_component.ex:88
msgid "Ammo group updated successfully" msgid "Ammo group updated successfully"
msgstr "" msgstr ""
@ -253,7 +253,7 @@ msgid "Creating..."
msgstr "" msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
#: lib/cannery_web/live/ammo_group_live/form_component.ex:134 #: lib/cannery_web/live/ammo_group_live/form_component.ex:147
msgid "Ammo group created successfully" msgid "Ammo group created successfully"
msgid_plural "Ammo groups created successfully" msgid_plural "Ammo groups created successfully"
msgstr[0] "" msgstr[0] ""