feat(chat): improve user pages layout + redirect
This commit is contained in:
parent
24b609ec3a
commit
10c905249c
@ -5,7 +5,7 @@ defmodule SlaxWeb.UserConfirmationInstructionsLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto w-96 mt-16">
|
||||||
<.header class="text-center">
|
<.header class="text-center">
|
||||||
No confirmation instructions received?
|
No confirmation instructions received?
|
||||||
<:subtitle>We'll send a new confirmation link to your inbox</:subtitle>
|
<:subtitle>We'll send a new confirmation link to your inbox</:subtitle>
|
||||||
|
@ -5,7 +5,7 @@ defmodule SlaxWeb.UserConfirmationLive do
|
|||||||
|
|
||||||
def render(%{live_action: :edit} = assigns) do
|
def render(%{live_action: :edit} = assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto w-96 mt-16">
|
||||||
<.header class="text-center">Confirm Account</.header>
|
<.header class="text-center">Confirm Account</.header>
|
||||||
|
|
||||||
<.simple_form for={@form} id="confirmation_form" phx-submit="confirm_account">
|
<.simple_form for={@form} id="confirmation_form" phx-submit="confirm_account">
|
||||||
|
@ -5,7 +5,7 @@ defmodule SlaxWeb.UserForgotPasswordLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto w-96 mt-16">
|
||||||
<.header class="text-center">
|
<.header class="text-center">
|
||||||
Forgot your password?
|
Forgot your password?
|
||||||
<:subtitle>We'll send a password reset link to your inbox</:subtitle>
|
<:subtitle>We'll send a password reset link to your inbox</:subtitle>
|
||||||
@ -45,6 +45,6 @@ defmodule SlaxWeb.UserForgotPasswordLive do
|
|||||||
{:noreply,
|
{:noreply,
|
||||||
socket
|
socket
|
||||||
|> put_flash(:info, info)
|
|> put_flash(:info, info)
|
||||||
|> redirect(to: ~p"/")}
|
|> redirect(to: ~p"/users/log_in")}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,7 +3,7 @@ defmodule SlaxWeb.UserLoginLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto w-96 mt-16">
|
||||||
<.header class="text-center">
|
<.header class="text-center">
|
||||||
Log in to account
|
Log in to account
|
||||||
<:subtitle>
|
<:subtitle>
|
||||||
|
@ -6,7 +6,7 @@ defmodule SlaxWeb.UserRegistrationLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto w-96 mt-16">
|
||||||
<.header class="text-center">
|
<.header class="text-center">
|
||||||
Register for an account
|
Register for an account
|
||||||
<:subtitle>
|
<:subtitle>
|
||||||
|
@ -5,7 +5,7 @@ defmodule SlaxWeb.UserResetPasswordLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
<div class="mx-auto max-w-sm">
|
<div class="mx-auto w-96 mt-16">
|
||||||
<.header class="text-center">Reset Password</.header>
|
<.header class="text-center">Reset Password</.header>
|
||||||
|
|
||||||
<.simple_form
|
<.simple_form
|
||||||
|
@ -5,6 +5,7 @@ defmodule SlaxWeb.UserSettingsLive do
|
|||||||
|
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
|
<div class="mx-auto w-96 mt-16">
|
||||||
<.header class="text-center">
|
<.header class="text-center">
|
||||||
Account Settings
|
Account Settings
|
||||||
<:subtitle>Manage your account email address and password settings</:subtitle>
|
<:subtitle>Manage your account email address and password settings</:subtitle>
|
||||||
@ -26,7 +27,6 @@ defmodule SlaxWeb.UserSettingsLive do
|
|||||||
type="password"
|
type="password"
|
||||||
label="Current password"
|
label="Current password"
|
||||||
value={@email_form_current_password}
|
value={@email_form_current_password}
|
||||||
required
|
|
||||||
/>
|
/>
|
||||||
<:actions>
|
<:actions>
|
||||||
<.button phx-disable-with="Changing...">Change Email</.button>
|
<.button phx-disable-with="Changing...">Change Email</.button>
|
||||||
@ -37,13 +37,11 @@ defmodule SlaxWeb.UserSettingsLive do
|
|||||||
<.simple_form
|
<.simple_form
|
||||||
for={@password_form}
|
for={@password_form}
|
||||||
id="password_form"
|
id="password_form"
|
||||||
action={~p"/users/log_in?_action=password_updated"}
|
|
||||||
method="post"
|
|
||||||
phx-change="validate_password"
|
|
||||||
phx-submit="update_password"
|
phx-submit="update_password"
|
||||||
|
phx-change="validate_password"
|
||||||
phx-trigger-action={@trigger_submit}
|
phx-trigger-action={@trigger_submit}
|
||||||
>
|
>
|
||||||
<input
|
<.input
|
||||||
name={@password_form[:email].name}
|
name={@password_form[:email].name}
|
||||||
type="hidden"
|
type="hidden"
|
||||||
id="hidden_user_email"
|
id="hidden_user_email"
|
||||||
@ -70,6 +68,7 @@ defmodule SlaxWeb.UserSettingsLive do
|
|||||||
</.simple_form>
|
</.simple_form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ defmodule SlaxWeb.UserAuth do
|
|||||||
conn
|
conn
|
||||||
|> renew_session()
|
|> renew_session()
|
||||||
|> delete_resp_cookie(@remember_me_cookie)
|
|> delete_resp_cookie(@remember_me_cookie)
|
||||||
|> redirect(to: ~p"/")
|
|> redirect(to: ~p"/users/log_in")
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user