Change import menu icon depending on destination
Star = wishlist, plus = collection
This commit is contained in:
@@ -32,7 +32,11 @@ defmodule MusicLibraryWeb.RecordLive.ImportComponent do
|
|||||||
role="list"
|
role="list"
|
||||||
class="divide-y divide-zinc-100 dark:divide-slate-300/30 mt-5"
|
class="divide-y divide-zinc-100 dark:divide-slate-300/30 mt-5"
|
||||||
>
|
>
|
||||||
<.result :for={release_group <- @release_groups} release_group={release_group} />
|
<.result
|
||||||
|
:for={release_group <- @release_groups}
|
||||||
|
release_group={release_group}
|
||||||
|
icon_name={@icon_name}
|
||||||
|
/>
|
||||||
</ul>
|
</ul>
|
||||||
<div
|
<div
|
||||||
:if={@release_groups == []}
|
:if={@release_groups == []}
|
||||||
@@ -73,8 +77,8 @@ defmodule MusicLibraryWeb.RecordLive.ImportComponent do
|
|||||||
phx-click={toggle_actions_menu(@release_group.id)}
|
phx-click={toggle_actions_menu(@release_group.id)}
|
||||||
phx-click-away={close_actions_menu(@release_group.id)}
|
phx-click-away={close_actions_menu(@release_group.id)}
|
||||||
>
|
>
|
||||||
<span class="sr-only"><%= gettext("Open options") %></span>
|
<span class="sr-only"><%= gettext("Choose which format to import") %></span>
|
||||||
<.icon name="hero-plus" class="-mt-1 h-5 w-5" aria-hidden="true" data-slot="icon" />
|
<.icon name={@icon_name} class="-mt-1 h-5 w-5" aria-hidden="true" data-slot="icon" />
|
||||||
</button>
|
</button>
|
||||||
<!--
|
<!--
|
||||||
Dropdown menu, show/hide based on menu state.
|
Dropdown menu, show/hide based on menu state.
|
||||||
|
|||||||
@@ -191,6 +191,7 @@
|
|||||||
record={@record}
|
record={@record}
|
||||||
patch={back_path(@record_list_params)}
|
patch={back_path(@record_list_params)}
|
||||||
initial_query=""
|
initial_query=""
|
||||||
|
icon_name="hero-plus"
|
||||||
/>
|
/>
|
||||||
</.modal>
|
</.modal>
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
phx-click-away={close_actions_menu(track.scrobbled_at_uts)}
|
phx-click-away={close_actions_menu(track.scrobbled_at_uts)}
|
||||||
>
|
>
|
||||||
<span class="sr-only"><%= gettext("Open options") %></span>
|
<span class="sr-only"><%= gettext("Open options") %></span>
|
||||||
<.icon name="hero-plus" class="-mt-1 h-5 w-5" aria-hidden="true" data-slot="icon" />
|
<.icon name="hero-star" class="-mt-1 h-5 w-5" aria-hidden="true" data-slot="icon" />
|
||||||
</button>
|
</button>
|
||||||
<!--
|
<!--
|
||||||
Dropdown menu, show/hide based on menu state.
|
Dropdown menu, show/hide based on menu state.
|
||||||
|
|||||||
@@ -201,6 +201,7 @@
|
|||||||
record={@record}
|
record={@record}
|
||||||
patch={back_path(@record_list_params)}
|
patch={back_path(@record_list_params)}
|
||||||
initial_query=""
|
initial_query=""
|
||||||
|
icon_name="hero-star"
|
||||||
/>
|
/>
|
||||||
</.modal>
|
</.modal>
|
||||||
|
|
||||||
|
|||||||
@@ -171,12 +171,11 @@ msgstr ""
|
|||||||
msgid "No cover selected"
|
msgid "No cover selected"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/import_component.ex:41
|
#: lib/music_library_web/live/record_live/import_component.ex:45
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "No results"
|
msgid "No results"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/music_library_web/live/record_live/import_component.ex:76
|
|
||||||
#: lib/music_library_web/live/record_live/index.html.heex:89
|
#: lib/music_library_web/live/record_live/index.html.heex:89
|
||||||
#: lib/music_library_web/live/stats_live/index.html.heex:112
|
#: lib/music_library_web/live/stats_live/index.html.heex:112
|
||||||
#: lib/music_library_web/live/wishlist_live/index.html.heex:89
|
#: lib/music_library_web/live/wishlist_live/index.html.heex:89
|
||||||
@@ -367,3 +366,8 @@ msgstr ""
|
|||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Scrobble activity"
|
msgid "Scrobble activity"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lib/music_library_web/live/record_live/import_component.ex:80
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
msgid "Choose which format to import"
|
||||||
|
msgstr ""
|
||||||
|
|||||||
Reference in New Issue
Block a user