Show confetti when adding a record
This commit is contained in:
@@ -66,6 +66,7 @@ window.addEventListener("music_library:confetti", (_event) => {
|
|||||||
confetti({
|
confetti({
|
||||||
particleCount: 100,
|
particleCount: 100,
|
||||||
spread: 200,
|
spread: 200,
|
||||||
|
zIndex: 1500,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,11 @@ defmodule MusicLibraryWeb.AddRecordComponent do
|
|||||||
tabindex="0"
|
tabindex="0"
|
||||||
id={"actions-#{@release_group.id}-#{format}-import"}
|
id={"actions-#{@release_group.id}-#{format}-import"}
|
||||||
phx-click={
|
phx-click={
|
||||||
JS.push("import", value: %{id: @release_group.id, format: format}, page_loading: true)
|
JS.dispatch("music_library:confetti")
|
||||||
|
|> JS.push("import",
|
||||||
|
value: %{id: @release_group.id, format: format},
|
||||||
|
page_loading: true
|
||||||
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{format_label(format)}
|
{format_label(format)}
|
||||||
|
|||||||
Reference in New Issue
Block a user