Allow manual upload of artist image
This commit is contained in:
@@ -17,6 +17,18 @@
|
||||
/>
|
||||
</:toggle>
|
||||
<.focus_wrap id={"actions-#{@artist.musicbrainz_id}-focus-wrap"}>
|
||||
<.dropdown_link
|
||||
id={"actions-#{@artist.musicbrainz_id}-edit"}
|
||||
patch={~p"/artists/#{@artist.musicbrainz_id}/edit"}
|
||||
>
|
||||
<.icon
|
||||
name="hero-pencil-square"
|
||||
class="h-4 w-4 mr-1 phx-click-loading:animate-bounce"
|
||||
aria-hidden="true"
|
||||
data-slot="icon"
|
||||
/>
|
||||
{gettext("Edit")}
|
||||
</.dropdown_link>
|
||||
<.dropdown_link
|
||||
id={"actions-#{@artist.musicbrainz_id}-refresh-image"}
|
||||
phx-click={JS.push("refresh_artist_image", value: %{id: @artist.musicbrainz_id})}
|
||||
@@ -223,3 +235,19 @@
|
||||
icon_name="hero-plus"
|
||||
/>
|
||||
</.modal>
|
||||
|
||||
<.modal
|
||||
:if={@live_action == :edit}
|
||||
id="artist-info-modal"
|
||||
open
|
||||
on_close={JS.patch(~p"/artists/#{@artist.musicbrainz_id}")}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.ArtistLive.FormComponent}
|
||||
id={@artist_info.id}
|
||||
action={@live_action}
|
||||
artist_info={@artist_info}
|
||||
artist={@artist}
|
||||
patch={~p"/artists/#{@artist.musicbrainz_id}"}
|
||||
/>
|
||||
</.modal>
|
||||
|
||||
Reference in New Issue
Block a user