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}
|
||||
|
||||
Reference in New Issue
Block a user