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