feat: unify page titles
This commit is contained in:
parent
e8ec620d57
commit
c933144920
37 changed files with 309 additions and 200 deletions
|
|
@ -19,6 +19,7 @@ defmodule MvWeb.SignInLive do
|
|||
|
||||
alias AshAuthentication.Phoenix.Components
|
||||
alias Mv.Config
|
||||
alias Mv.Membership
|
||||
alias MvWeb.{AuthOverridesDE, AuthOverridesRegistrationDisabled, Layouts}
|
||||
|
||||
@impl true
|
||||
|
|
@ -49,6 +50,13 @@ defmodule MvWeb.SignInLive do
|
|||
register_path =
|
||||
if session["registration_enabled"] == false, do: nil, else: session["register_path"]
|
||||
|
||||
# Club name and page title for browser tab (root layout: Mila · Club · Page)
|
||||
club_name =
|
||||
case Membership.get_settings() do
|
||||
{:ok, settings} when is_binary(settings.club_name) -> settings.club_name
|
||||
_ -> nil
|
||||
end
|
||||
|
||||
socket =
|
||||
socket
|
||||
|> assign(overrides: overrides)
|
||||
|
|
@ -66,6 +74,8 @@ defmodule MvWeb.SignInLive do
|
|||
|> assign(:oidc_only, Config.oidc_only?())
|
||||
|> assign(:sign_in_id, "sign-in")
|
||||
|> assign(:locale, locale)
|
||||
|> assign(:club_name, club_name)
|
||||
|> Layouts.assign_page_title(gettext("Sign in"))
|
||||
|
||||
{:ok, socket}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue