main
erb 60 lines 3.18 KB
Raw
1 <% content_for :title, @succeeded ? "Email confirmed" : (@already_confirmed ? "Already confirmed" : "Confirmation failed") %>
2
3 <div class="min-h-screen bg-surface-900 flex flex-col items-center justify-center px-4 py-16">
4
5 <div class="mb-10 flex flex-col items-center gap-3">
6 <%= link_to root_path, class: "flex items-center gap-3 text-gray-100 hover:text-brand-500 transition-colors" do %>
7 <img src="/icon.png" alt="siGit" class="h-9 w-auto">
8 <span class="text-xl font-semibold tracking-tight">Code &amp; Deploy</span>
9 <% end %>
10 </div>
11
12 <div class="w-full max-w-sm">
13 <div class="border border-surface-500 rounded bg-surface-700 px-8 py-8 text-center">
14
15 <% if @succeeded %>
16 <div class="mx-auto mb-5 flex h-12 w-12 items-center justify-center rounded-full bg-green-900/30 text-green-400">
17 <svg class="w-6 h-6" viewBox="0 0 16 16" fill="currentColor">
18 <path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm3.78 5.28-4.5 4.5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47 3.97-3.97a.75.75 0 1 1 1.06 1.06z"/>
19 </svg>
20 </div>
21 <h1 class="text-lg font-semibold text-gray-100">Email confirmed</h1>
22 <p class="mt-2 text-sm text-gray-400 leading-relaxed">
23 Your account is ready. Sign in to start hosting code and models.
24 </p>
25 <%= link_to "Sign in", signin_path, class: "btn-primary w-full justify-center py-2.5 mt-6" %>
26
27 <% elsif @already_confirmed %>
28 <div class="mx-auto mb-5 flex h-12 w-12 items-center justify-center rounded-full bg-brand-500/15 text-brand-400">
29 <svg class="w-6 h-6" viewBox="0 0 16 16" fill="currentColor">
30 <path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm3.78 5.28-4.5 4.5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47 3.97-3.97a.75.75 0 1 1 1.06 1.06z"/>
31 </svg>
32 </div>
33 <h1 class="text-lg font-semibold text-gray-100">You're all set</h1>
34 <p class="mt-2 text-sm text-gray-400 leading-relaxed">
35 This email is already confirmed. Just sign in to continue.
36 </p>
37 <%= link_to "Sign in", signin_path, class: "btn-primary w-full justify-center py-2.5 mt-6" %>
38
39 <% else %>
40 <div class="mx-auto mb-5 flex h-12 w-12 items-center justify-center rounded-full bg-red-900/30 text-red-400">
41 <svg class="w-6 h-6" viewBox="0 0 16 16" fill="currentColor">
42 <path d="M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1zm0 3.75a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0v-3.5A.75.75 0 0 0 8 4.75zm0 7.5a.875.875 0 1 0 0-1.75.875.875 0 0 0 0 1.75z"/>
43 </svg>
44 </div>
45 <h1 class="text-lg font-semibold text-gray-100">Confirmation failed</h1>
46 <p class="mt-2 text-sm text-gray-400 leading-relaxed">
47 <%= @message || "This confirmation link is invalid or has expired. You can request a new one." %>
48 </p>
49 <%= link_to "Resend confirmation email", resend_confirmation_path, class: "btn-primary w-full justify-center py-2.5 mt-6" %>
50 <% end %>
51
52 </div>
53
54 <p class="mt-6 text-center text-xs text-gray-500">
55 Back to
56 <%= link_to "Sign in", signin_path, class: "text-gray-400 hover:text-gray-200 underline underline-offset-2" %>
57 </p>
58 </div>
59
60 </div>