From 805eacdf1efc9973e395b8a35f4032065abcdcda Mon Sep 17 00:00:00 2001 From: Inhji Date: Sun, 9 Apr 2023 13:57:52 +0200 Subject: [PATCH] switch footer and admin bar text --- lib/chiya_web/components/admin_components.ex | 6 ++---- lib/chiya_web/components/layouts/root_app.html.heex | 2 +- lib/chiya_web/components/layouts/root_public.html.heex | 5 +++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/chiya_web/components/admin_components.ex b/lib/chiya_web/components/admin_components.ex index c824db1..e53f3b6 100644 --- a/lib/chiya_web/components/admin_components.ex +++ b/lib/chiya_web/components/admin_components.ex @@ -76,6 +76,7 @@ defmodule ChiyaWeb.AdminComponents do """ attr :current_user, :map, required: true + attr :settings, :map, required: true def admin_bar(assigns) do ~H""" @@ -85,10 +86,7 @@ defmodule ChiyaWeb.AdminComponents do href={~p"/"} class="flex gap-3 text-sm leading-6 font-semibold text-gray-900 dark:text-gray-100 dark:hover:text-gray-300 hover:text-gray-700" > - Chiya -

- v<%= Application.spec(:chiya, :vsn) %> -

+ <%= @settings.title %>
  • diff --git a/lib/chiya_web/components/layouts/root_app.html.heex b/lib/chiya_web/components/layouts/root_app.html.heex index 52248b6..5408a38 100644 --- a/lib/chiya_web/components/layouts/root_app.html.heex +++ b/lib/chiya_web/components/layouts/root_app.html.heex @@ -22,7 +22,7 @@ - <.admin_bar current_user={@current_user} /> + <.admin_bar current_user={@current_user} settings={@settings} /> <%= @inner_content %>
    diff --git a/lib/chiya_web/components/layouts/root_public.html.heex b/lib/chiya_web/components/layouts/root_public.html.heex index f065d69..1ff835e 100644 --- a/lib/chiya_web/components/layouts/root_public.html.heex +++ b/lib/chiya_web/components/layouts/root_public.html.heex @@ -25,14 +25,15 @@ - <.admin_bar current_user={@current_user} /> + <.admin_bar current_user={@current_user} settings={@settings} />
    <%= @inner_content %>
    <%= raw(@settings.custom_html) %>