mirror of
https://github.com/plausible/analytics.git
synced 2024-12-21 16:41:31 +03:00
aa7ae87811
* WIP * Actually activate the user * Send email verification codes * Send activation code with email * Only show onboarding steps during first site creation * Add worker to config * Consistent form styles * Send welcome email when user activates account * Add changelog entry * Use https in new site form * Correct spelling in email
44 lines
2.0 KiB
Elixir
44 lines
2.0 KiB
Elixir
<div class="w-full max-w-3xl mt-4 mx-auto flex">
|
|
<%= if @has_pin do %>
|
|
<%= form_for @conn, "/activate", [class: "w-full max-w-lg mx-auto bg-white shadow-md rounded px-8 py-6 mb-4 mt-8"], fn f -> %>
|
|
<h2 class="text-xl font-black">Activate your account</h2>
|
|
|
|
<div class="mt-2 text-sm text-gray-500 leading-tight">
|
|
Please enter the 4-digit code we sent to <b><%= @conn.assigns[:current_user].email %></b>
|
|
</div>
|
|
|
|
<div class="mt-12 flex items-stretch flex-grow">
|
|
<div>
|
|
<%= text_input f, :code, class: "tracking-widest font-medium shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-36 px-8 border-gray-300 rounded-l-md", oninput: "this.value=this.value.replace(/[^0-9]/g, ''); if (this.value.length >= 4) document.getElementById('submit').focus()", onclick: "this.select();", maxlength: "4", placeholder: "••••", style: "letter-spacing: 10px;" %>
|
|
</div>
|
|
<button id="submit" class="button rounded-l-none">Activate →</button>
|
|
</div>
|
|
<%= error_tag(assigns, :error) %>
|
|
|
|
<div class="mt-16 text-sm">
|
|
Didn't receive an email?
|
|
</div>
|
|
<div class="mt-2 text-sm text-gray-500 leading-tight">
|
|
Please check your spam folder and contact <a class="underline text-gray-800" href="mailto:support@plausible.io">support@plausible.io</a> if the problem persists
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<div class="w-full max-w-lg mx-auto bg-white shadow-md rounded px-8 py-6 mb-4 mt-8">
|
|
<h2 class="text-xl font-black">Activate your account</h2>
|
|
|
|
<div class="mt-2 text-sm text-gray-500 leading-tight">
|
|
A 4-digit activation code will be sent to <b><%= @conn.assigns[:current_user].email %></b>
|
|
</div>
|
|
|
|
<%= error_tag(assigns, :error) %>
|
|
|
|
<%= button("Request activation code", to: "/activate/request-code", method: :post, class: "button mt-12") %>
|
|
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="pt-12 pl-8 hidden md:block">
|
|
<%= render(PlausibleWeb.AuthView, "_onboarding_steps.html", current_step: 1) %>
|
|
</div>
|
|
</div>
|