Use dropdown instead of actions_menu in scrobble activity
This commit is contained in:
@@ -203,7 +203,7 @@
|
|||||||
</.link>
|
</.link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.actions_menu
|
<.dropdown
|
||||||
:if={
|
:if={
|
||||||
album.metadata.musicbrainz_id !== "" and
|
album.metadata.musicbrainz_id !== "" and
|
||||||
!tracked_record?(
|
!tracked_record?(
|
||||||
@@ -211,19 +211,21 @@
|
|||||||
album.metadata.musicbrainz_id
|
album.metadata.musicbrainz_id
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
id={album.scrobbled_at_uts}
|
id={"actions-#{album.scrobbled_at_uts}-albums"}
|
||||||
background_container_target="#records > li"
|
placement="bottom-end"
|
||||||
>
|
>
|
||||||
<:button>
|
<:toggle>
|
||||||
<span class="sr-only">{gettext("Choose which format to import")}</span>
|
<span class="sr-only">{gettext("Choose which format to import")}</span>
|
||||||
<.icon name="hero-star" class="-mt-1 h-5 w-5" aria-hidden="true" data-slot="icon" />
|
<.icon
|
||||||
</:button>
|
name="hero-star"
|
||||||
<:links>
|
class="-mt-1 h-5 w-5 text-zinc-500 dark:text-zinc-400 cursor-pointer"
|
||||||
<.link
|
aria-hidden="true"
|
||||||
|
data-slot="icon"
|
||||||
|
/>
|
||||||
|
</:toggle>
|
||||||
|
<.focus_wrap id={"actions-#{album.scrobbled_at_uts}-albums-focus-wrap"}>
|
||||||
|
<.dropdown_link
|
||||||
:for={format <- Records.Record.formats()}
|
:for={format <- Records.Record.formats()}
|
||||||
class="block px-3 py-1 text-sm leading-6 text-zinc-900 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:text-zinc-300 dark:hover:bg-zinc-700"
|
|
||||||
role="menuitem"
|
|
||||||
tabindex="0"
|
|
||||||
id={"actions-#{album.scrobbled_at_uts}-#{format}-import"}
|
id={"actions-#{album.scrobbled_at_uts}-#{format}-import"}
|
||||||
phx-click={
|
phx-click={
|
||||||
JS.push("import",
|
JS.push("import",
|
||||||
@@ -233,9 +235,9 @@
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{format_label(format)}
|
{format_label(format)}
|
||||||
</.link>
|
</.dropdown_link>
|
||||||
</:links>
|
</.focus_wrap>
|
||||||
</.actions_menu>
|
</.dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -304,7 +306,7 @@
|
|||||||
</.link>
|
</.link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<.actions_menu
|
<.dropdown
|
||||||
:if={
|
:if={
|
||||||
track.album.musicbrainz_id !== "" and
|
track.album.musicbrainz_id !== "" and
|
||||||
!tracked_record?(
|
!tracked_record?(
|
||||||
@@ -312,19 +314,21 @@
|
|||||||
track.album.musicbrainz_id
|
track.album.musicbrainz_id
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
id={track.scrobbled_at_uts}
|
id={"actions-#{track.scrobbled_at_uts}-tracks"}
|
||||||
background_container_target="#records > li"
|
placement="bottom-end"
|
||||||
>
|
>
|
||||||
<:button>
|
<:toggle>
|
||||||
<span class="sr-only">{gettext("Choose which format to import")}</span>
|
<span class="sr-only">{gettext("Choose which format to import")}</span>
|
||||||
<.icon name="hero-star" class="-mt-1 h-5 w-5" aria-hidden="true" data-slot="icon" />
|
<.icon
|
||||||
</:button>
|
name="hero-star"
|
||||||
<:links>
|
class="-mt-1 h-5 w-5 text-zinc-500 dark:text-zinc-400 cursor-pointer"
|
||||||
<.link
|
aria-hidden="true"
|
||||||
|
data-slot="icon"
|
||||||
|
/>
|
||||||
|
</:toggle>
|
||||||
|
<.focus_wrap id={"actions-#{track.scrobbled_at_uts}-tracks-focus-wrap"}>
|
||||||
|
<.dropdown_link
|
||||||
:for={format <- Records.Record.formats()}
|
:for={format <- Records.Record.formats()}
|
||||||
class="block px-3 py-1 text-sm leading-6 text-zinc-900 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:text-zinc-300 dark:hover:bg-zinc-700"
|
|
||||||
role="menuitem"
|
|
||||||
tabindex="0"
|
|
||||||
id={"actions-#{track.scrobbled_at_uts}-#{format}-import"}
|
id={"actions-#{track.scrobbled_at_uts}-#{format}-import"}
|
||||||
phx-click={
|
phx-click={
|
||||||
JS.push("import",
|
JS.push("import",
|
||||||
@@ -334,9 +338,9 @@
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{format_label(format)}
|
{format_label(format)}
|
||||||
</.link>
|
</.dropdown_link>
|
||||||
</:links>
|
</.focus_wrap>
|
||||||
</.actions_menu>
|
</.dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user