<%= if @live_action in [:edit_email] do %>
<.live_component
module={ClaperWeb.ModalComponent}
class="hidden"
id="modal-wrapper"
title={@page_title}
description={@page_description}
return_to={~p"/users/settings"}
>
<.form
:let={f}
for={@email_changeset}
phx-submit="save"
id="update_email"
class="mt-5 md:flex md:items-end"
>
<%= hidden_input(f, :action, name: "action", value: "update_email") %>
<%= submit(gettext("Save"),
phx_disable_with: "Saving...",
class:
"mt-2 w-full h-14 inline-flex transition-all items-center justify-center px-4 py-2 shadow-sm font-medium rounded-md text-white bg-black hover:bg-primary-500 md:mt-0 md:ml-3 md:w-auto md:text-sm"
) %>
<% end %>
<%= if @live_action in [:edit_password] do %>
<.live_component
module={ClaperWeb.ModalComponent}
class="hidden"
id="modal-wrapper"
title={@page_title}
description={@page_description}
return_to={~p"/users/settings"}
>
<.form
:let={f}
for={@password_changeset}
phx-submit="save"
id="update_password"
class="mt-5 md:flex md:items-end gap-x-2"
>
<%= hidden_input(f, :action, name: "action", value: "update_password") %>
<%= submit(gettext("Save"),
phx_disable_with: "Saving...",
class:
"mt-2 w-full h-14 inline-flex transition-all items-center justify-center px-4 py-2 shadow-sm font-medium rounded-md text-white bg-black hover:bg-primary-500 md:mt-0 md:ml-3 md:w-auto md:text-sm"
) %>
<% end %>
<%= gettext("Personal informations") %>
<%= gettext("Your personal informations only visible by you") %>
<%= gettext("Email address") %>
<%= @current_user.email %>
<.link
patch={~p"/users/settings/edit/email"}
class="rounded-md font-medium text-purple-600 hover:text-purple-500"
>
<%= gettext("Change") %>
<%= gettext("Password") %>
********
<.link
patch={~p"/users/settings/edit/password"}
class="rounded-md font-medium text-purple-600 hover:text-purple-500"
>
<%= gettext("Change") %>
<%= gettext("Danger zone") %>
<%= gettext("Be careful, these actions are irreversible") %>
<%= gettext("Delete account") %>