Simplify loading button state tracking
This commit is contained in:
@@ -24,12 +24,8 @@
|
||||
class="flex-1"
|
||||
phx-debounce="300"
|
||||
/>
|
||||
<.button type="submit" disabled={@loading}>
|
||||
<%= if @loading do %>
|
||||
<.icon name="hero-arrow-path" class="h-4 w-4 animate-spin mr-2" /> Searching...
|
||||
<% else %>
|
||||
<.icon name="hero-magnifying-glass" class="h-4 w-4 mr-2" /> Search
|
||||
<% end %>
|
||||
<.button type="submit" disabled={@loading} phx-disable-with={gettext("Searching...")}>
|
||||
<.icon name="hero-magnifying-glass" class="size-4" />{gettext("Search")}
|
||||
</.button>
|
||||
</div>
|
||||
</.form>
|
||||
|
||||
@@ -182,6 +182,7 @@ msgid "Saving..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/components/record_components.ex
|
||||
#: lib/music_library_web/live/scrobble_live/index.html.heex
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
@@ -1421,3 +1422,8 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Failed to search for release groups"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/scrobble_live/index.html.heex
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Searching..."
|
||||
msgstr ""
|
||||
|
||||
@@ -182,6 +182,7 @@ msgid "Saving..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/components/record_components.ex
|
||||
#: lib/music_library_web/live/scrobble_live/index.html.heex
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
@@ -1421,3 +1422,8 @@ msgstr ""
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Failed to search for release groups"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/scrobble_live/index.html.heex
|
||||
#, elixir-autogen, elixir-format, fuzzy
|
||||
msgid "Searching..."
|
||||
msgstr ""
|
||||
|
||||
Reference in New Issue
Block a user