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