- Remove default Phoenix branding and create custom layouts - Replace DaisyUI classes with custom Tailwind components throughout - Add authenticated layout with navigation bar for organization pages - Redesign all core components (buttons, forms, tables, alerts) - Make dashboard stat cards clickable to navigate to respective pages - Update alert acknowledge button to only show for equipment down alerts - Add consistent dark mode support across all pages - Implement modern design with zinc color palette and improved spacing
89 lines
3 KiB
Text
89 lines
3 KiB
Text
<Layouts.app flash={@flash} current_scope={@current_scope}>
|
|
<div class="mx-auto max-w-sm">
|
|
<div class="text-center">
|
|
<.header>
|
|
Log in
|
|
<:subtitle>
|
|
<%= if @current_scope do %>
|
|
You need to reauthenticate to perform sensitive actions on your account.
|
|
<% else %>
|
|
Don't have an account?
|
|
<.link
|
|
navigate={~p"/users/register"}
|
|
class="font-semibold text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
|
|
>
|
|
Sign up
|
|
</.link>
|
|
for an account now.
|
|
<% end %>
|
|
</:subtitle>
|
|
</.header>
|
|
</div>
|
|
|
|
<div
|
|
:if={local_mail_adapter?()}
|
|
class="mt-6 rounded-lg bg-blue-50 p-4 dark:bg-blue-950"
|
|
>
|
|
<div class="flex">
|
|
<.icon name="hero-information-circle" class="h-6 w-6 flex-shrink-0 text-blue-600 dark:text-blue-400" />
|
|
<div class="ml-3">
|
|
<p class="text-sm text-blue-700 dark:text-blue-200">
|
|
You are running the local mail adapter.
|
|
</p>
|
|
<p class="mt-1 text-sm text-blue-700 dark:text-blue-200">
|
|
To see sent emails, visit
|
|
<.link href="/dev/mailbox" class="font-medium underline">the mailbox page</.link>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-8 space-y-6">
|
|
<.form :let={f} for={@form} as={:user} id="login_form_magic" action={~p"/users/log-in"}>
|
|
<.input
|
|
readonly={!!@current_scope}
|
|
field={f[:email]}
|
|
type="email"
|
|
label="Email"
|
|
autocomplete="email"
|
|
required
|
|
phx-mounted={JS.focus()}
|
|
/>
|
|
<.button class="w-full" variant="primary">
|
|
Log in with email <span aria-hidden="true">→</span>
|
|
</.button>
|
|
</.form>
|
|
|
|
<div class="relative">
|
|
<div class="absolute inset-0 flex items-center">
|
|
<div class="w-full border-t border-zinc-300 dark:border-zinc-700"></div>
|
|
</div>
|
|
<div class="relative flex justify-center text-sm">
|
|
<span class="bg-zinc-50 px-2 text-zinc-600 dark:bg-zinc-950 dark:text-zinc-400">
|
|
or
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<.form :let={f} for={@form} as={:user} id="login_form_password" action={~p"/users/log-in"}>
|
|
<.input
|
|
readonly={!!@current_scope}
|
|
field={f[:email]}
|
|
type="email"
|
|
label="Email"
|
|
autocomplete="email"
|
|
required
|
|
/>
|
|
<.input field={f[:password]} type="password" label="Password" autocomplete="current-password" />
|
|
<div class="space-y-3">
|
|
<.button class="w-full" variant="primary" name={@form[:remember_me].name} value="true">
|
|
Log in and stay logged in <span aria-hidden="true">→</span>
|
|
</.button>
|
|
<.button class="w-full">
|
|
Log in only this time
|
|
</.button>
|
|
</div>
|
|
</.form>
|
|
</div>
|
|
</div>
|
|
</Layouts.app>
|