76 lines
5.0 KiB
Cheetah
76 lines
5.0 KiB
Cheetah
{{define "signup"}}
|
|
<div class="container-sm" style="padding:4rem 1remm">
|
|
<div class="logo-lockup-square" style="width:48px;height:48px;margin:0 auto 2rem"></div>
|
|
<h1 class="mb-4" style="text-align:center">Create your vault</h1>
|
|
<p class="lead mb-8" style="text-align:center">One vault. Every agent. Your secrets stay yours.</p>
|
|
|
|
<div id="signup-error" class="mb-4" style="display:none;color:var(--brand-red);text-align:center"></div>
|
|
|
|
<!-- Social providers (real flow when env vars are configured) -->
|
|
<div style="display:flex;flex-direction:column;gap:10px;margin-bottom:24px">
|
|
<a href="/auth/google/start" id="btn-google" class="btn btn-ghost" style="display:flex;align-items:center;justify-content:center;gap:10px;padding:12px">
|
|
<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844a4.14 4.14 0 0 1-1.796 2.716v2.258h2.908c1.702-1.567 2.684-3.874 2.684-6.615z" fill="#4285F4"/><path d="M9 18c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332A8.997 8.997 0 0 0 9 18z" fill="#34A853"/><path d="M3.964 10.71A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.71V4.958H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.042l3.007-2.332z" fill="#FBBC05"/><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0A8.997 8.997 0 0 0 .957 4.958L3.964 7.29C4.672 5.163 6.656 3.58 9 3.58z" fill="#EA4335"/></svg>
|
|
Continue with Google
|
|
</a>
|
|
<a href="/auth/apple/start" id="btn-apple" class="btn btn-ghost" style="display:flex;align-items:center;justify-content:center;gap:10px;padding:12px">
|
|
<svg width="16" height="18" viewBox="0 0 14 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M11.34 8.51c.02 2.27 1.99 3.02 2.01 3.03-.02.05-.31 1.07-1.03 2.13-.62.92-1.27 1.83-2.29 1.85-1 .02-1.32-.59-2.46-.59s-1.5.58-2.45.61c-.98.04-1.73-1-2.36-1.91C1.5 11.79.5 8.4 1.83 6.12c.66-1.13 1.85-1.85 3.13-1.87.97-.02 1.89.65 2.48.65.59 0 1.71-.81 2.88-.69.49.02 1.86.2 2.74 1.49-.07.04-1.64.96-1.62 2.86M9.31 3.06C9.83 2.43 10.18 1.55 10.08.68 9.34.71 8.43 1.18 7.9 1.81c-.47.55-.89 1.45-.78 2.31.83.06 1.67-.42 2.19-1.06"/></svg>
|
|
Continue with Apple
|
|
</a>
|
|
<a href="/auth/meta/start" id="btn-meta" class="btn btn-ghost" style="display:flex;align-items:center;justify-content:center;gap:10px;padding:12px">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="#1877F2"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>
|
|
Continue with Meta
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Divider -->
|
|
<div style="display:flex;align-items:center;gap:12px;margin:24px 0;color:var(--text-tertiary);font-size:0.75rem;text-transform:uppercase;letter-spacing:0.08em">
|
|
<div style="flex:1;height:1px;background:var(--border)"></div>
|
|
or
|
|
<div style="flex:1;height:1px;background:var(--border)"></div>
|
|
</div>
|
|
|
|
<!-- Email -->
|
|
<form id="signup-email-form">
|
|
<input type="email" name="email" required placeholder="you@example.com" autocomplete="email"
|
|
style="width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:6px;font-family:inherit;font-size:0.9rem;margin-bottom:12px">
|
|
<button type="submit" class="btn btn-primary" style="width:100%;padding:12px">Continue with email</button>
|
|
</form>
|
|
|
|
<p class="mt-6" style="text-align:center;font-size:0.75rem;color:var(--text-tertiary)">
|
|
By continuing you agree to our <a href="/terms">Terms</a> and <a href="/privacy">Privacy Policy</a>.
|
|
</p>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{define "signup-script"}}
|
|
<script>
|
|
document.getElementById('signup-email-form').addEventListener('submit', async function(e) {
|
|
e.preventDefault();
|
|
const email = this.email.value.trim();
|
|
const errEl = document.getElementById('signup-error');
|
|
const btn = this.querySelector('button');
|
|
errEl.style.display = 'none';
|
|
btn.disabled = true; btn.textContent = 'Creating account...';
|
|
try {
|
|
const r = await fetch('/onboarding/email', {
|
|
method: 'POST',
|
|
headers: {'Content-Type':'application/json'},
|
|
body: JSON.stringify({email})
|
|
});
|
|
const d = await r.json();
|
|
if (d.ok) {
|
|
window.location = d.next || '/onboarding/profile';
|
|
} else {
|
|
errEl.textContent = d.error || 'Could not create account.';
|
|
errEl.style.display = 'block';
|
|
btn.disabled = false; btn.textContent = 'Continue with email';
|
|
}
|
|
} catch(err) {
|
|
errEl.textContent = 'Connection error. Try again.';
|
|
errEl.style.display = 'block';
|
|
btn.disabled = false; btn.textContent = 'Continue with email';
|
|
}
|
|
});
|
|
</script>
|
|
{{end}}
|