Rename FormComponent -> RecordFormComponent

This commit is contained in:
Claudio Ortolina
2025-08-30 22:16:20 +03:00
parent c8ca209566
commit 7358608eca
11 changed files with 41 additions and 41 deletions
@@ -1,4 +1,4 @@
defmodule MusicLibraryWeb.FormComponent do defmodule MusicLibraryWeb.RecordFormComponent do
use MusicLibraryWeb, :live_component use MusicLibraryWeb, :live_component
import MusicLibraryWeb.RecordComponents, import MusicLibraryWeb.RecordComponents,
@@ -73,7 +73,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
end end
@impl true @impl true
def handle_info({MusicLibraryWeb.FormComponent, {:saved, _record}}, socket) do def handle_info({MusicLibraryWeb.RecordFormComponent, {:saved, _record}}, socket) do
{:noreply, load_and_assign_records(socket, socket.assigns.record_list_params)} {:noreply, load_and_assign_records(socket, socket.assigns.record_list_params)}
end end
@@ -66,7 +66,7 @@
on_close={JS.patch(back_path(@record_list_params))} on_close={JS.patch(back_path(@record_list_params))}
> >
<.live_component <.live_component
module={MusicLibraryWeb.FormComponent} module={MusicLibraryWeb.RecordFormComponent}
id={@record.id} id={@record.id}
action={@live_action} action={@live_action}
show_purchased_at={true} show_purchased_at={true}
@@ -138,7 +138,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
end end
@impl true @impl true
def handle_info({MusicLibraryWeb.FormComponent, {:saved, record}}, socket) do def handle_info({MusicLibraryWeb.RecordFormComponent, {:saved, record}}, socket) do
{:noreply, assign(socket, :record, record)} {:noreply, assign(socket, :record, record)}
end end
@@ -326,7 +326,7 @@
on_close={JS.patch(~p"/collection/#{@record}")} on_close={JS.patch(~p"/collection/#{@record}")}
> >
<.live_component <.live_component
module={MusicLibraryWeb.FormComponent} module={MusicLibraryWeb.RecordFormComponent}
id={@record.id} id={@record.id}
action={@live_action} action={@live_action}
show_purchased_at={true} show_purchased_at={true}
@@ -70,7 +70,7 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
end end
@impl true @impl true
def handle_info({MusicLibraryWeb.FormComponent, {:saved, _record}}, socket) do def handle_info({MusicLibraryWeb.RecordFormComponent, {:saved, _record}}, socket) do
{:noreply, load_and_assign_records(socket, socket.assigns.record_list_params)} {:noreply, load_and_assign_records(socket, socket.assigns.record_list_params)}
end end
@@ -54,7 +54,7 @@
on_close={JS.patch(back_path(@record_list_params))} on_close={JS.patch(back_path(@record_list_params))}
> >
<.live_component <.live_component
module={MusicLibraryWeb.FormComponent} module={MusicLibraryWeb.RecordFormComponent}
id={@record.id} id={@record.id}
action={@live_action} action={@live_action}
show_purchased_at={false} show_purchased_at={false}
@@ -145,7 +145,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
end end
@impl true @impl true
def handle_info({MusicLibraryWeb.FormComponent, {:saved, record}}, socket) do def handle_info({MusicLibraryWeb.RecordFormComponent, {:saved, record}}, socket) do
{:noreply, assign(socket, :record, record)} {:noreply, assign(socket, :record, record)}
end end
@@ -307,7 +307,7 @@
on_close={JS.patch(~p"/wishlist/#{@record}")} on_close={JS.patch(~p"/wishlist/#{@record}")}
> >
<.live_component <.live_component
module={MusicLibraryWeb.FormComponent} module={MusicLibraryWeb.RecordFormComponent}
id={@record.id} id={@record.id}
action={@live_action} action={@live_action}
show_purchased_at={false} show_purchased_at={false}
+16 -16
View File
@@ -28,7 +28,7 @@ msgstr ""
msgid "Collection" msgid "Collection"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cover art" msgid "Cover art"
msgstr "" msgstr ""
@@ -61,7 +61,7 @@ msgstr ""
msgid "Error importing record" msgid "Error importing record"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Format" msgid "Format"
msgstr "" msgstr ""
@@ -104,7 +104,7 @@ msgstr ""
msgid "Logout" msgid "Logout"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/show.html.heex #: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex #: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex #: lib/music_library_web/live/wishlist_live/show.html.heex
@@ -137,7 +137,7 @@ msgstr ""
msgid "Purchase" msgid "Purchase"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Purchased at" msgid "Purchased at"
msgstr "" msgstr ""
@@ -154,18 +154,18 @@ msgstr ""
msgid "Record imported successfully" msgid "Record imported successfully"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record updated successfully" msgid "Record updated successfully"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#: lib/music_library_web/live/online_store_template_live/form_component.ex #: lib/music_library_web/live/online_store_template_live/form_component.ex
#: lib/music_library_web/live/scrobble_rules_live/form_component.ex #: lib/music_library_web/live/scrobble_rules_live/form_component.ex
@@ -205,7 +205,7 @@ msgstr ""
msgid "Total wishlist" msgid "Total wishlist"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
@@ -572,19 +572,19 @@ msgstr ""
msgid "Similar artists" msgid "Similar artists"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "PNG, JPG, WEBP up to 8MB" msgid "PNG, JPG, WEBP up to 8MB"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Upload a file" msgid "Upload a file"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "or drag and drop" msgid "or drag and drop"
@@ -703,7 +703,7 @@ msgstr ""
msgid "Top %{n} Genres" msgid "Top %{n} Genres"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Release Date" msgid "Release Date"
msgstr "" msgstr ""
@@ -719,7 +719,7 @@ msgstr ""
msgid "No release selected" msgid "No release selected"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Selected Release" msgid "Selected Release"
msgstr "" msgstr ""
@@ -1160,7 +1160,7 @@ msgstr ""
msgid "Copy record selected release ID to clipboard" msgid "Copy record selected release ID to clipboard"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dominant Colors" msgid "Dominant Colors"
msgstr "" msgstr ""
@@ -1170,7 +1170,7 @@ msgstr ""
msgid "Apply All" msgid "Apply All"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Title" msgid "Title"
msgstr "" msgstr ""
@@ -1293,7 +1293,7 @@ msgstr ""
msgid "90 days" msgid "90 days"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rotate colors" msgid "Rotate colors"
msgstr "" msgstr ""
+16 -16
View File
@@ -28,7 +28,7 @@ msgstr ""
msgid "Collection" msgid "Collection"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Cover art" msgid "Cover art"
msgstr "" msgstr ""
@@ -61,7 +61,7 @@ msgstr ""
msgid "Error importing record" msgid "Error importing record"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Format" msgid "Format"
msgstr "" msgstr ""
@@ -104,7 +104,7 @@ msgstr ""
msgid "Logout" msgid "Logout"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/show.html.heex #: lib/music_library_web/live/artist_live/show.html.heex
#: lib/music_library_web/live/collection_live/show.html.heex #: lib/music_library_web/live/collection_live/show.html.heex
#: lib/music_library_web/live/wishlist_live/show.html.heex #: lib/music_library_web/live/wishlist_live/show.html.heex
@@ -137,7 +137,7 @@ msgstr ""
msgid "Purchase" msgid "Purchase"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Purchased at" msgid "Purchased at"
msgstr "" msgstr ""
@@ -154,18 +154,18 @@ msgstr ""
msgid "Record imported successfully" msgid "Record imported successfully"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Record updated successfully" msgid "Record updated successfully"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Save" msgid "Save"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#: lib/music_library_web/live/online_store_template_live/form_component.ex #: lib/music_library_web/live/online_store_template_live/form_component.ex
#: lib/music_library_web/live/scrobble_rules_live/form_component.ex #: lib/music_library_web/live/scrobble_rules_live/form_component.ex
@@ -205,7 +205,7 @@ msgstr ""
msgid "Total wishlist" msgid "Total wishlist"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type" msgid "Type"
msgstr "" msgstr ""
@@ -572,19 +572,19 @@ msgstr ""
msgid "Similar artists" msgid "Similar artists"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "PNG, JPG, WEBP up to 8MB" msgid "PNG, JPG, WEBP up to 8MB"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Upload a file" msgid "Upload a file"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#: lib/music_library_web/live/artist_live/form_component.ex #: lib/music_library_web/live/artist_live/form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "or drag and drop" msgid "or drag and drop"
@@ -703,7 +703,7 @@ msgstr ""
msgid "Top %{n} Genres" msgid "Top %{n} Genres"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Release Date" msgid "Release Date"
msgstr "" msgstr ""
@@ -719,7 +719,7 @@ msgstr ""
msgid "No release selected" msgid "No release selected"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Selected Release" msgid "Selected Release"
msgstr "" msgstr ""
@@ -1160,7 +1160,7 @@ msgstr ""
msgid "Copy record selected release ID to clipboard" msgid "Copy record selected release ID to clipboard"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Dominant Colors" msgid "Dominant Colors"
msgstr "" msgstr ""
@@ -1170,7 +1170,7 @@ msgstr ""
msgid "Apply All" msgid "Apply All"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Title" msgid "Title"
msgstr "" msgstr ""
@@ -1293,7 +1293,7 @@ msgstr ""
msgid "90 days" msgid "90 days"
msgstr "" msgstr ""
#: lib/music_library_web/components/form_component.ex #: lib/music_library_web/components/record_form_component.ex
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Rotate colors" msgid "Rotate colors"
msgstr "" msgstr ""