<.icon name="hero-signal" class="size-7 text-blue-600 dark:text-blue-400" /> TowerOps

{t_auth("Log in")}

<%= if @current_scope do %>

{t_auth("You need to reauthenticate to perform sensitive actions on your account.")}

<% else %>
<.link navigate={~p"/users/register"}> <.button class="w-full" variant="secondary"> {t_auth("Create an account")}
<% end %>
<.icon name="hero-information-circle" class="h-6 w-6 flex-shrink-0 text-blue-600 dark:text-blue-400" />

{t_auth("You are running the local mail adapter.")}

{t_auth("To see sent emails, visit")} {t_auth("the mailbox page")}.

<.form :let={f} for={@form} as={:user} id="login_form_password" action={~p"/users/log-in"} > <.input readonly={!!@current_scope} field={f[:email]} id="user_email_password" type="email" label={t_auth("Email")} autocomplete="email" required phx-mounted={JS.focus()} /> <.input field={f[:password]} id="user_password" type="password" label={t_auth("Password")} autocomplete="current-password" required />
<.link navigate={~p"/users/reset-password"} class="text-sm font-semibold text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300" > {t_auth("Forgot password?")}
<.button class="w-full" variant="primary"> {t_auth("Log in")}
{t("or")}
<.form :let={f} for={@form} as={:user} id="login_form_magic" action={~p"/users/log-in"}> <.input readonly={!!@current_scope} field={f[:email]} id="user_email_magic" type="email" label={t_auth("Email")} autocomplete="email" required /> <.button class="w-full" variant="secondary"> <.icon name="hero-envelope" class="size-4" /> {t_auth("Send me a login link instead")}

<.link href={~p"/users/confirm"} class="text-blue-600 hover:text-blue-700 dark:text-blue-400 hover:underline" > {t_auth("Didn't receive confirmation instructions?")}