Show confetti when adding a record

This commit is contained in:
Claudio Ortolina
2025-06-09 18:40:03 +01:00
parent 4da5a8d59b
commit a31d92bc9f
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -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)}