Move all components under /components
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
defmodule MusicLibraryWeb.RecordLive.BarcodeScannerComponent do
|
||||
defmodule MusicLibraryWeb.BarcodeScannerComponent do
|
||||
use MusicLibraryWeb, :live_component
|
||||
|
||||
alias MusicLibrary.Records
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
defmodule MusicLibraryWeb.RecordLive.FormComponent do
|
||||
defmodule MusicLibraryWeb.FormComponent do
|
||||
use MusicLibraryWeb, :live_component
|
||||
|
||||
import MusicLibraryWeb.RecordComponents, only: [format_label: 1, type_label: 1]
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
defmodule MusicLibraryWeb.RecordLive.ImportComponent do
|
||||
defmodule MusicLibraryWeb.ImportComponent do
|
||||
use MusicLibraryWeb, :live_component
|
||||
|
||||
import MusicLibraryWeb.RecordComponents,
|
||||
@@ -90,7 +90,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_info({MusicLibraryWeb.RecordLive.FormComponent, {:saved, _record}}, socket) do
|
||||
def handle_info({MusicLibraryWeb.FormComponent, {:saved, _record}}, socket) do
|
||||
{:noreply, load_and_assign_records(socket, socket.assigns.record_list_params)}
|
||||
end
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
on_cancel={JS.patch(back_path(@record_list_params))}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.RecordLive.FormComponent}
|
||||
module={MusicLibraryWeb.FormComponent}
|
||||
id={@record.id}
|
||||
action={@live_action}
|
||||
show_purchased_at={true}
|
||||
@@ -107,7 +107,7 @@
|
||||
on_cancel={JS.patch(back_path(@record_list_params))}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.RecordLive.ImportComponent}
|
||||
module={MusicLibraryWeb.ImportComponent}
|
||||
id={:search}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
@@ -125,7 +125,7 @@
|
||||
on_cancel={JS.patch(back_path(@record_list_params))}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.RecordLive.BarcodeScannerComponent}
|
||||
module={MusicLibraryWeb.BarcodeScannerComponent}
|
||||
id={:barcode_scanner}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
|
||||
@@ -99,7 +99,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_info({MusicLibraryWeb.RecordLive.FormComponent, {:saved, record}}, socket) do
|
||||
def handle_info({MusicLibraryWeb.FormComponent, {:saved, record}}, socket) do
|
||||
{:noreply, assign(socket, :record, record)}
|
||||
end
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
on_cancel={JS.patch(~p"/collection/#{@record}")}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.RecordLive.FormComponent}
|
||||
module={MusicLibraryWeb.FormComponent}
|
||||
id={@record.id}
|
||||
action={@live_action}
|
||||
show_purchased_at={true}
|
||||
|
||||
@@ -79,7 +79,7 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_info({MusicLibraryWeb.RecordLive.FormComponent, {:saved, _record}}, socket) do
|
||||
def handle_info({MusicLibraryWeb.FormComponent, {:saved, _record}}, socket) do
|
||||
{:noreply, load_and_assign_records(socket, socket.assigns.record_list_params)}
|
||||
end
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
on_cancel={JS.patch(back_path(@record_list_params))}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.RecordLive.FormComponent}
|
||||
module={MusicLibraryWeb.FormComponent}
|
||||
id={@record.id}
|
||||
action={@live_action}
|
||||
show_purchased_at={false}
|
||||
@@ -47,7 +47,7 @@
|
||||
on_cancel={JS.patch(back_path(@record_list_params))}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.RecordLive.ImportComponent}
|
||||
module={MusicLibraryWeb.ImportComponent}
|
||||
id={:search}
|
||||
title={@page_title}
|
||||
action={@live_action}
|
||||
|
||||
@@ -119,7 +119,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_info({MusicLibraryWeb.RecordLive.FormComponent, {:saved, record}}, socket) do
|
||||
def handle_info({MusicLibraryWeb.FormComponent, {:saved, record}}, socket) do
|
||||
{:noreply, assign(socket, :record, record)}
|
||||
end
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
on_cancel={JS.patch(~p"/wishlist/#{@record}")}
|
||||
>
|
||||
<.live_component
|
||||
module={MusicLibraryWeb.RecordLive.FormComponent}
|
||||
module={MusicLibraryWeb.FormComponent}
|
||||
id={@record.id}
|
||||
action={@live_action}
|
||||
show_purchased_at={false}
|
||||
|
||||
+26
-26
@@ -23,8 +23,8 @@ msgstr ""
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:40
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:47
|
||||
#: lib/music_library_web/components/form_component.ex:40
|
||||
#: lib/music_library_web/components/form_component.ex:47
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Choose a value"
|
||||
msgstr ""
|
||||
@@ -38,7 +38,7 @@ msgstr ""
|
||||
msgid "Collection"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:61
|
||||
#: lib/music_library_web/components/form_component.ex:61
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Cover art"
|
||||
msgstr ""
|
||||
@@ -74,7 +74,7 @@ msgstr ""
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:46
|
||||
#: lib/music_library_web/components/form_component.ex:46
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Format"
|
||||
msgstr ""
|
||||
@@ -128,8 +128,8 @@ msgstr ""
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/components/form_component.ex:51
|
||||
#: lib/music_library_web/live/collection_live/show.html.heex:178
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:51
|
||||
#: lib/music_library_web/live/wishlist_live/show.html.heex:198
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "MusicBrainz ID"
|
||||
@@ -141,12 +141,12 @@ msgstr ""
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:68
|
||||
#: lib/music_library_web/components/form_component.ex:68
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No cover selected"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/import_component.ex:44
|
||||
#: lib/music_library_web/components/import_component.ex:44
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No results"
|
||||
msgstr ""
|
||||
@@ -174,7 +174,7 @@ msgstr ""
|
||||
msgid "Purchase"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:57
|
||||
#: lib/music_library_web/components/form_component.ex:57
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Purchased at"
|
||||
msgstr ""
|
||||
@@ -193,22 +193,22 @@ msgstr ""
|
||||
msgid "Record imported successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:128
|
||||
#: lib/music_library_web/components/form_component.ex:128
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Record updated successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:52
|
||||
#: lib/music_library_web/components/form_component.ex:52
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Release"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:79
|
||||
#: lib/music_library_web/components/form_component.ex:79
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:79
|
||||
#: lib/music_library_web/components/form_component.ex:79
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Saving..."
|
||||
msgstr ""
|
||||
@@ -218,12 +218,12 @@ msgstr ""
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/import_component.ex:26
|
||||
#: lib/music_library_web/components/import_component.ex:26
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search for a record on MusicBrainz"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/import_component.ex:27
|
||||
#: lib/music_library_web/components/import_component.ex:27
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Search for records"
|
||||
msgstr ""
|
||||
@@ -275,7 +275,7 @@ msgstr ""
|
||||
msgid "Total wishlist"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/form_component.ex:39
|
||||
#: lib/music_library_web/components/form_component.ex:39
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@@ -337,19 +337,19 @@ msgstr ""
|
||||
msgid "Scrobble activity"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/import_component.ex:85
|
||||
#: lib/music_library_web/components/import_component.ex:85
|
||||
#: lib/music_library_web/live/stats_live/index.html.heex:169
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Choose which format to import"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:118
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:118
|
||||
#: lib/music_library_web/live/stats_live/index.html.heex:141
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Collected"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:117
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:117
|
||||
#: lib/music_library_web/live/stats_live/index.html.heex:147
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Wishlisted"
|
||||
@@ -632,42 +632,42 @@ msgstr ""
|
||||
msgid "Scan barcodes · Collection"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:23
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:23
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Scan one or more barcodes"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:90
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:90
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Open camera"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:54
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:54
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Import releases"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:158
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:158
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Failed to search release for barcode %{number}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:149
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:149
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "No release found for barcode %{number}"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:51
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:51
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Importing..."
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:188
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:188
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "Records imported successfully"
|
||||
msgstr ""
|
||||
|
||||
#: lib/music_library_web/live/record_live/barcode_scanner_component.ex:116
|
||||
#: lib/music_library_web/components/barcode_scanner_component.ex:116
|
||||
#, elixir-autogen, elixir-format
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
Reference in New Issue
Block a user