Add confirmations to maintenance actions

This commit is contained in:
Claudio Ortolina
2025-11-03 17:28:55 +00:00
parent d71e787a3a
commit c583567b17
3 changed files with 78 additions and 4 deletions
@@ -13,10 +13,26 @@
</p>
<ul class="mt-4">
<li class="space-y-4">
<.button type="button" phx-click="refresh_records_musicbrainz_data">
<.button
type="button"
phx-click="refresh_records_musicbrainz_data"
data-confirm={
gettext(
"Are you sure you want to refresh MusicBrainz data for all records? This operation can take a long time to complete."
)
}
>
{gettext("Refresh MusicBrainz data")}
</.button>
<.button type="button" phx-click="generate_record_embeddings">
<.button
type="button"
phx-click="generate_record_embeddings"
data-confirm={
gettext(
"Are you sure you want to regenerate embeddings for all records? This operation can take a long time to complete."
)
}
>
{gettext("Regenerate record embeddings")}
</.button>
</li>
@@ -31,10 +47,28 @@
</p>
<ul class="mt-4">
<li class="space-y-4">
<.button disabled type="button" phx-click="refresh_artists_musicbrainz_data">
<.button
disabled
type="button"
phx-click="refresh_artists_musicbrainz_data"
data-confirm={
gettext(
"Are you sure you want to refresh MusicBrainz data for all artists? This operation can take a long time to complete."
)
}
>
{gettext("Refresh MusicBrainz data")}
</.button>
<.button disabled type="button" phx-click="refresh_artists_discogs_data">
<.button
disabled
type="button"
phx-click="refresh_artists_discogs_data"
data-confirm={
gettext(
"Are you sure you want to refresh Discogs data for all artists? This operation can take a long time to complete."
)
}
>
{gettext("Refresh Discogs data")}
</.button>
</li>
+20
View File
@@ -1573,3 +1573,23 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Vacuum"
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to refresh Discogs data for all artists? This operation can take a long time to complete."
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to refresh MusicBrainz data for all artists? This operation can take a long time to complete."
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to refresh MusicBrainz data for all records? This operation can take a long time to complete."
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to regenerate embeddings for all records? This operation can take a long time to complete."
msgstr ""
+20
View File
@@ -1573,3 +1573,23 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Vacuum"
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to refresh Discogs data for all artists? This operation can take a long time to complete."
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to refresh MusicBrainz data for all artists? This operation can take a long time to complete."
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to refresh MusicBrainz data for all records? This operation can take a long time to complete."
msgstr ""
#: lib/music_library_web/live/maintenance_live/index.html.heex
#, elixir-autogen, elixir-format
msgid "Are you sure you want to regenerate embeddings for all records? This operation can take a long time to complete."
msgstr ""