diff --git a/lib/music_library_web/components/form_component.ex b/lib/music_library_web/components/record_form_component.ex similarity index 99% rename from lib/music_library_web/components/form_component.ex rename to lib/music_library_web/components/record_form_component.ex index 593cc402..cc60e70d 100644 --- a/lib/music_library_web/components/form_component.ex +++ b/lib/music_library_web/components/record_form_component.ex @@ -1,4 +1,4 @@ -defmodule MusicLibraryWeb.FormComponent do +defmodule MusicLibraryWeb.RecordFormComponent do use MusicLibraryWeb, :live_component import MusicLibraryWeb.RecordComponents, diff --git a/lib/music_library_web/live/collection_live/index.ex b/lib/music_library_web/live/collection_live/index.ex index cfaf45d3..919d4698 100644 --- a/lib/music_library_web/live/collection_live/index.ex +++ b/lib/music_library_web/live/collection_live/index.ex @@ -73,7 +73,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do end @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)} end diff --git a/lib/music_library_web/live/collection_live/index.html.heex b/lib/music_library_web/live/collection_live/index.html.heex index 801d0e1c..3e29cbb1 100644 --- a/lib/music_library_web/live/collection_live/index.html.heex +++ b/lib/music_library_web/live/collection_live/index.html.heex @@ -66,7 +66,7 @@ on_close={JS.patch(back_path(@record_list_params))} > <.live_component - module={MusicLibraryWeb.FormComponent} + module={MusicLibraryWeb.RecordFormComponent} id={@record.id} action={@live_action} show_purchased_at={true} diff --git a/lib/music_library_web/live/collection_live/show.ex b/lib/music_library_web/live/collection_live/show.ex index 91461e2c..39926499 100644 --- a/lib/music_library_web/live/collection_live/show.ex +++ b/lib/music_library_web/live/collection_live/show.ex @@ -138,7 +138,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do end @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)} end diff --git a/lib/music_library_web/live/collection_live/show.html.heex b/lib/music_library_web/live/collection_live/show.html.heex index 8a4ce72e..c8931084 100644 --- a/lib/music_library_web/live/collection_live/show.html.heex +++ b/lib/music_library_web/live/collection_live/show.html.heex @@ -326,7 +326,7 @@ on_close={JS.patch(~p"/collection/#{@record}")} > <.live_component - module={MusicLibraryWeb.FormComponent} + module={MusicLibraryWeb.RecordFormComponent} id={@record.id} action={@live_action} show_purchased_at={true} diff --git a/lib/music_library_web/live/wishlist_live/index.ex b/lib/music_library_web/live/wishlist_live/index.ex index fdb96b5e..aff63a06 100644 --- a/lib/music_library_web/live/wishlist_live/index.ex +++ b/lib/music_library_web/live/wishlist_live/index.ex @@ -70,7 +70,7 @@ defmodule MusicLibraryWeb.WishlistLive.Index do end @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)} end diff --git a/lib/music_library_web/live/wishlist_live/index.html.heex b/lib/music_library_web/live/wishlist_live/index.html.heex index ace6255d..e992d6f8 100644 --- a/lib/music_library_web/live/wishlist_live/index.html.heex +++ b/lib/music_library_web/live/wishlist_live/index.html.heex @@ -54,7 +54,7 @@ on_close={JS.patch(back_path(@record_list_params))} > <.live_component - module={MusicLibraryWeb.FormComponent} + module={MusicLibraryWeb.RecordFormComponent} id={@record.id} action={@live_action} show_purchased_at={false} diff --git a/lib/music_library_web/live/wishlist_live/show.ex b/lib/music_library_web/live/wishlist_live/show.ex index 3a7358b3..17862f23 100644 --- a/lib/music_library_web/live/wishlist_live/show.ex +++ b/lib/music_library_web/live/wishlist_live/show.ex @@ -145,7 +145,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do end @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)} end diff --git a/lib/music_library_web/live/wishlist_live/show.html.heex b/lib/music_library_web/live/wishlist_live/show.html.heex index 651f9ae1..25409bf7 100644 --- a/lib/music_library_web/live/wishlist_live/show.html.heex +++ b/lib/music_library_web/live/wishlist_live/show.html.heex @@ -307,7 +307,7 @@ on_close={JS.patch(~p"/wishlist/#{@record}")} > <.live_component - module={MusicLibraryWeb.FormComponent} + module={MusicLibraryWeb.RecordFormComponent} id={@record.id} action={@live_action} show_purchased_at={false} diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 6846ce12..7711887d 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -28,7 +28,7 @@ msgstr "" msgid "Collection" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Cover art" msgstr "" @@ -61,7 +61,7 @@ msgstr "" msgid "Error importing record" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Format" msgstr "" @@ -104,7 +104,7 @@ msgstr "" msgid "Logout" 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/collection_live/show.html.heex #: lib/music_library_web/live/wishlist_live/show.html.heex @@ -137,7 +137,7 @@ msgstr "" msgid "Purchase" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Purchased at" msgstr "" @@ -154,18 +154,18 @@ msgstr "" msgid "Record imported successfully" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Record updated successfully" 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 #, elixir-autogen, elixir-format msgid "Save" 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/online_store_template_live/form_component.ex #: lib/music_library_web/live/scrobble_rules_live/form_component.ex @@ -205,7 +205,7 @@ msgstr "" msgid "Total wishlist" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -572,19 +572,19 @@ msgstr "" msgid "Similar artists" 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 #, elixir-autogen, elixir-format msgid "PNG, JPG, WEBP up to 8MB" 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 #, elixir-autogen, elixir-format msgid "Upload a file" 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 #, elixir-autogen, elixir-format msgid "or drag and drop" @@ -703,7 +703,7 @@ msgstr "" msgid "Top %{n} Genres" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Release Date" msgstr "" @@ -719,7 +719,7 @@ msgstr "" msgid "No release selected" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Selected Release" msgstr "" @@ -1160,7 +1160,7 @@ msgstr "" msgid "Copy record selected release ID to clipboard" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Dominant Colors" msgstr "" @@ -1170,7 +1170,7 @@ msgstr "" msgid "Apply All" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Title" msgstr "" @@ -1293,7 +1293,7 @@ msgstr "" msgid "90 days" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Rotate colors" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index bdf9adc1..b233c98a 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -28,7 +28,7 @@ msgstr "" msgid "Collection" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Cover art" msgstr "" @@ -61,7 +61,7 @@ msgstr "" msgid "Error importing record" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Format" msgstr "" @@ -104,7 +104,7 @@ msgstr "" msgid "Logout" 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/collection_live/show.html.heex #: lib/music_library_web/live/wishlist_live/show.html.heex @@ -137,7 +137,7 @@ msgstr "" msgid "Purchase" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Purchased at" msgstr "" @@ -154,18 +154,18 @@ msgstr "" msgid "Record imported successfully" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Record updated successfully" 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 #, elixir-autogen, elixir-format msgid "Save" 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/online_store_template_live/form_component.ex #: lib/music_library_web/live/scrobble_rules_live/form_component.ex @@ -205,7 +205,7 @@ msgstr "" msgid "Total wishlist" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Type" msgstr "" @@ -572,19 +572,19 @@ msgstr "" msgid "Similar artists" 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 #, elixir-autogen, elixir-format msgid "PNG, JPG, WEBP up to 8MB" 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 #, elixir-autogen, elixir-format msgid "Upload a file" 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 #, elixir-autogen, elixir-format msgid "or drag and drop" @@ -703,7 +703,7 @@ msgstr "" msgid "Top %{n} Genres" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Release Date" msgstr "" @@ -719,7 +719,7 @@ msgstr "" msgid "No release selected" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Selected Release" msgstr "" @@ -1160,7 +1160,7 @@ msgstr "" msgid "Copy record selected release ID to clipboard" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Dominant Colors" msgstr "" @@ -1170,7 +1170,7 @@ msgstr "" msgid "Apply All" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Title" msgstr "" @@ -1293,7 +1293,7 @@ msgstr "" msgid "90 days" msgstr "" -#: lib/music_library_web/components/form_component.ex +#: lib/music_library_web/components/record_form_component.ex #, elixir-autogen, elixir-format msgid "Rotate colors" msgstr ""