From 21a7160be4933867657a927fd5fdce88b07d3495 Mon Sep 17 00:00:00 2001 From: shibao Date: Fri, 10 Sep 2021 00:28:53 -0400 Subject: [PATCH] rename page to home --- ...{page_controller.ex => home_controller.ex} | 2 +- lib/cannery_web/live/component/topbar.ex | 2 +- .../live/component/topbar.html.leex | 2 +- .../live/{page_live.ex => home_live.ex} | 6 +- lib/cannery_web/live/home_live.html.leex | 68 +++++++++++++++++++ lib/cannery_web/live/page_live.html.leex | 9 --- .../templates/layout/topbar.html.eex | 12 ++-- lib/cannery_web/views/home_view.ex | 3 + lib/cannery_web/views/page_view.ex | 3 - .../controllers/home_controller_test.exs | 8 +++ .../controllers/page_controller_test.exs | 8 --- test/cannery_web/live/home_live_test.exs | 11 +++ test/cannery_web/live/page_live_test.exs | 11 --- ...{page_view_test.exs => home_view_test.exs} | 2 +- 14 files changed, 104 insertions(+), 43 deletions(-) rename lib/cannery_web/controllers/{page_controller.ex => home_controller.ex} (72%) rename lib/cannery_web/live/{page_live.ex => home_live.ex} (88%) create mode 100644 lib/cannery_web/live/home_live.html.leex delete mode 100644 lib/cannery_web/live/page_live.html.leex create mode 100644 lib/cannery_web/views/home_view.ex delete mode 100644 lib/cannery_web/views/page_view.ex create mode 100644 test/cannery_web/controllers/home_controller_test.exs delete mode 100644 test/cannery_web/controllers/page_controller_test.exs create mode 100644 test/cannery_web/live/home_live_test.exs delete mode 100644 test/cannery_web/live/page_live_test.exs rename test/cannery_web/views/{page_view_test.exs => home_view_test.exs} (53%) diff --git a/lib/cannery_web/controllers/page_controller.ex b/lib/cannery_web/controllers/home_controller.ex similarity index 72% rename from lib/cannery_web/controllers/page_controller.ex rename to lib/cannery_web/controllers/home_controller.ex index 77a81ed..ff26174 100644 --- a/lib/cannery_web/controllers/page_controller.ex +++ b/lib/cannery_web/controllers/home_controller.ex @@ -1,4 +1,4 @@ -defmodule CanneryWeb.PageController do +defmodule CanneryWeb.HomeController do use CanneryWeb, :controller def index(conn, _params) do diff --git a/lib/cannery_web/live/component/topbar.ex b/lib/cannery_web/live/component/topbar.ex index 0bde2cc..0718d48 100644 --- a/lib/cannery_web/live/component/topbar.ex +++ b/lib/cannery_web/live/component/topbar.ex @@ -1,7 +1,7 @@ defmodule CanneryWeb.Live.Component.Topbar do use CanneryWeb, :live_component - alias CanneryWeb.{PageLive} + alias CanneryWeb.{HomeLive} def mount(socket) do {:ok, socket |> assign(results: [], title_content: nil)} diff --git a/lib/cannery_web/live/component/topbar.html.leex b/lib/cannery_web/live/component/topbar.html.leex index fd6d9d0..7ea43f3 100644 --- a/lib/cannery_web/live/component/topbar.html.leex +++ b/lib/cannery_web/live/component/topbar.html.leex @@ -2,7 +2,7 @@