703 lines
19 KiB
Cheetah
703 lines
19 KiB
Cheetah
{{define "onboarding-product"}}
|
|
<div class="onboarding-container">
|
|
<div class="onboarding-card">
|
|
<!-- Progress -->
|
|
<div class="onboarding-progress">
|
|
<div class="progress-step active">
|
|
<div class="progress-box">1</div>
|
|
<span class="progress-label">Product</span>
|
|
</div>
|
|
<div class="progress-line"></div>
|
|
<div class="progress-step">
|
|
<div class="progress-box">2</div>
|
|
<span class="progress-label">Account</span>
|
|
</div>
|
|
<div class="progress-line"></div>
|
|
<div class="progress-step">
|
|
<div class="progress-box">3</div>
|
|
<span class="progress-label">Details</span>
|
|
</div>
|
|
<div class="progress-line"></div>
|
|
<div class="progress-step">
|
|
<div class="progress-box">4</div>
|
|
<span class="progress-label">Terms</span>
|
|
</div>
|
|
<div class="progress-line"></div>
|
|
<div class="progress-step">
|
|
<div class="progress-box">5</div>
|
|
<span class="progress-label">Payment</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Header -->
|
|
<div class="onboarding-header">
|
|
<p class="label accent mb-3">Step 1 of 5</p>
|
|
<h1 class="mb-4">Select your setup</h1>
|
|
<p class="lead">Choose where your vault lives and what you need.</p>
|
|
</div>
|
|
|
|
<form id="productForm" onsubmit="return saveProduct(event)">
|
|
<!-- Product Selection -->
|
|
<div class="product-selection">
|
|
<div class="product-card" data-product="hosted" onclick="selectProduct(this)">
|
|
<div class="product-badge recommended">Recommended</div>
|
|
<div class="product-icon">
|
|
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
|
|
</div>
|
|
<div class="product-content">
|
|
<h3 class="product-title">Clavitor Hosted</h3>
|
|
<p class="product-price">$12<span class="product-period">/year</span></p>
|
|
<p class="product-desc">We run your vault across 4 regions. Zero maintenance. Your encryption keys never leave your browser.</p>
|
|
<ul class="product-features">
|
|
<li>✓ 4 regions worldwide</li>
|
|
<li>✓ Daily encrypted backups</li>
|
|
<li>✓ 99.9% SLA</li>
|
|
<li>✓ Email support</li>
|
|
</ul>
|
|
</div>
|
|
<div class="product-select-indicator">
|
|
<div class="radio-box">
|
|
<span class="radio-check">✓</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Self-hosted removed from signup flow - users should download directly from /download -->
|
|
|
|
<div class="product-card disabled" data-product="enterprise">
|
|
<div class="product-icon">
|
|
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
|
</div>
|
|
<div class="product-content">
|
|
<h3 class="product-title">Enterprise</h3>
|
|
<p class="product-price">Custom</p>
|
|
<p class="product-desc">Dedicated infrastructure, custom regions, SLAs, and advanced security controls.</p>
|
|
<ul class="product-features">
|
|
<li>✓ Dedicated single-tenant infrastructure</li>
|
|
<li>✓ Custom regions (bring your own DC)</li>
|
|
<li>✓ SAML SSO</li>
|
|
<li>✓ Audit logs (1 year retention)</li>
|
|
<li>✓ 99.99% SLA</li>
|
|
<li>✓ Dedicated support engineer</li>
|
|
</ul>
|
|
</div>
|
|
<div class="product-contact">
|
|
<button type="button" class="btn btn-ghost btn-sm" onclick="contactSales()">Contact sales</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Region Selection (only for hosted) -->
|
|
<!--
|
|
NOTE FOR NEXT AGENT: Use the /glass endpoint to get response times
|
|
and order regions by latency from user's location.
|
|
Endpoint: GET /glass/regions returns {regions: [{id, name, flag, latency_ms}]}
|
|
Sort by latency_ms ascending and render in that order.
|
|
-->
|
|
<div id="regionSection" class="region-section">
|
|
<h3 class="form-section-title">Select region</h3>
|
|
<p class="region-desc">Your vault data stays in your chosen region. We never replicate across borders.</p>
|
|
|
|
<div class="region-grid">
|
|
<label class="region-card" data-region="us-east">
|
|
<input type="radio" name="region" value="us-east" checked>
|
|
<div class="region-content">
|
|
<div class="region-flag">🇺🇸</div>
|
|
<div class="region-info">
|
|
<div class="region-name">US-East</div>
|
|
<div class="region-location">Virginia</div>
|
|
</div>
|
|
<div class="region-status">
|
|
<span class="status-dot active"></span>
|
|
<span class="status-text">12ms</span>
|
|
</div>
|
|
</div>
|
|
</label>
|
|
|
|
<label class="region-card" data-region="eu-west">
|
|
<input type="radio" name="region" value="eu-west">
|
|
<div class="region-content">
|
|
<div class="region-flag">🇮🇪</div>
|
|
<div class="region-info">
|
|
<div class="region-name">EU-West</div>
|
|
<div class="region-location">Dublin</div>
|
|
</div>
|
|
<div class="region-status">
|
|
<span class="status-dot active"></span>
|
|
<span class="status-text">89ms</span>
|
|
</div>
|
|
</div>
|
|
</label>
|
|
|
|
<label class="region-card" data-region="eu-central">
|
|
<input type="radio" name="region" value="eu-central">
|
|
<div class="region-content">
|
|
<div class="region-flag">🇩🇪</div>
|
|
<div class="region-info">
|
|
<div class="region-name">EU-Central</div>
|
|
<div class="region-location">Frankfurt</div>
|
|
</div>
|
|
<div class="region-status">
|
|
<span class="status-dot active"></span>
|
|
<span class="status-text">95ms</span>
|
|
</div>
|
|
</div>
|
|
</label>
|
|
|
|
<label class="region-card" data-region="asia-southeast">
|
|
<input type="radio" name="region" value="asia-southeast">
|
|
<div class="region-content">
|
|
<div class="region-flag">🇸🇬</div>
|
|
<div class="region-info">
|
|
<div class="region-name">Asia-Southeast</div>
|
|
<div class="region-location">Singapore</div>
|
|
</div>
|
|
<div class="region-status">
|
|
<span class="status-dot active"></span>
|
|
<span class="status-text">156ms</span>
|
|
</div>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="region-notice">
|
|
<div class="info-box accent">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
|
|
<span>Your choice is permanent. Each vault is an isolated database — we don't migrate between regions for security.</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Actions -->
|
|
<div class="form-actions">
|
|
<button type="button" class="btn btn-ghost" onclick="history.back()">Back</button>
|
|
<button type="submit" class="btn btn-primary" id="continueBtn">Continue →</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.onboarding-container {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
padding: 48px 24px;
|
|
background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
|
|
}
|
|
|
|
.onboarding-container::after {
|
|
content: '';
|
|
flex: 1;
|
|
min-height: 24px;
|
|
}
|
|
|
|
.onboarding-card {
|
|
width: 100%;
|
|
max-width: 520px;
|
|
background: white;
|
|
border-radius: 16px;
|
|
padding: 48px;
|
|
box-shadow: 0 4px 24px rgba(0,0,0,0.06);
|
|
border: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.onboarding-progress {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 48px;
|
|
}
|
|
|
|
.progress-step {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.progress-step.active .progress-dot {
|
|
background: var(--brand-black);
|
|
color: white;
|
|
}
|
|
|
|
.progress-step.completed .progress-dot {
|
|
background: var(--success);
|
|
color: white;
|
|
}
|
|
|
|
.progress-box {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 6px;
|
|
background: var(--bg-secondary);
|
|
color: var(--text-tertiary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
transition: all 0.2s ease;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.progress-step.active .progress-box {
|
|
background: var(--brand-black);
|
|
color: white;
|
|
border-color: var(--brand-black);
|
|
}
|
|
|
|
.progress-step.completed .progress-box {
|
|
background: var(--success);
|
|
color: white;
|
|
border-color: var(--success);
|
|
}
|
|
|
|
.progress-step.clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.progress-step.clickable:hover .progress-box {
|
|
border-color: var(--brand-black);
|
|
color: var(--text);
|
|
}
|
|
|
|
.progress-step.clickable:hover .progress-label {
|
|
color: var(--text);
|
|
}
|
|
|
|
.progress-label {
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
color: var(--text-tertiary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.progress-step.active .progress-label {
|
|
color: var(--text);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.progress-step.completed .progress-label {
|
|
color: var(--success);
|
|
}
|
|
|
|
.progress-line {
|
|
width: 40px;
|
|
height: 2px;
|
|
background: var(--border);
|
|
margin: 0 8px;
|
|
margin-bottom: 24px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.progress-line.completed {
|
|
background: var(--success);
|
|
}
|
|
|
|
.onboarding-header {
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.product-selection {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.product-card {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 24px;
|
|
padding: 24px;
|
|
border: 2px solid var(--border);
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
background: white;
|
|
}
|
|
|
|
.product-card:hover:not(.disabled) {
|
|
border-color: var(--brand-black);
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.06);
|
|
}
|
|
|
|
.product-card.selected {
|
|
border-color: var(--brand-black);
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.product-card.disabled {
|
|
opacity: 0.6;
|
|
cursor: default;
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.product-badge {
|
|
position: absolute;
|
|
top: -10px;
|
|
right: 20px;
|
|
background: var(--brand-black);
|
|
color: white;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
padding: 4px 12px;
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.product-badge.recommended {
|
|
background: var(--brand-black);
|
|
}
|
|
|
|
.product-icon {
|
|
flex-shrink: 0;
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: 12px;
|
|
background: var(--bg-secondary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text);
|
|
}
|
|
|
|
.product-card.selected .product-icon {
|
|
background: var(--brand-black);
|
|
color: white;
|
|
}
|
|
|
|
.product-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.product-title {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.product-price {
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.product-period {
|
|
font-size: 15px;
|
|
font-weight: 400;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.product-desc {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
line-height: 1.5;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.product-features {
|
|
list-style: none;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px 24px;
|
|
}
|
|
|
|
.product-features li {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.product-select-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.radio-box {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 4px;
|
|
border: 2px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s;
|
|
background: white;
|
|
}
|
|
|
|
.product-card.selected .radio-box {
|
|
border-color: var(--brand-black);
|
|
background: var(--brand-black);
|
|
}
|
|
|
|
.radio-check {
|
|
color: white;
|
|
transform: scale(0);
|
|
transition: transform 0.2s;
|
|
font-weight: 700;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.product-card.selected .radio-check {
|
|
transform: scale(1);
|
|
}
|
|
|
|
.product-card.selected .radio-dot {
|
|
transform: scale(1);
|
|
}
|
|
|
|
.product-contact {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 8px 16px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.region-section {
|
|
margin-bottom: 40px;
|
|
padding: 24px;
|
|
background: var(--bg-secondary);
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.form-section-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.region-desc {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.region-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 12px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.region-card {
|
|
position: relative;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.region-card input {
|
|
position: absolute;
|
|
opacity: 0;
|
|
}
|
|
|
|
.region-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 16px;
|
|
background: white;
|
|
border: 2px solid var(--border);
|
|
border-radius: 10px;
|
|
transition: all 0.15s;
|
|
}
|
|
|
|
.region-card:hover .region-content {
|
|
border-color: var(--text-tertiary);
|
|
}
|
|
|
|
.region-card input:checked + .region-content {
|
|
border-color: var(--brand-black);
|
|
background: white;
|
|
}
|
|
|
|
.region-flag {
|
|
font-size: 24px;
|
|
}
|
|
|
|
.region-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.region-name {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
}
|
|
|
|
.region-location {
|
|
font-size: 12px;
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.region-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--success);
|
|
}
|
|
|
|
.status-text {
|
|
font-size: 12px;
|
|
color: var(--text-tertiary);
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
.region-notice .info-box {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
padding: 16px;
|
|
background: white;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.info-box svg {
|
|
flex-shrink: 0;
|
|
color: var(--brand-black);
|
|
}
|
|
|
|
.info-box.accent {
|
|
border-color: var(--brand-black);
|
|
}
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
gap: 16px;
|
|
}
|
|
|
|
.form-actions .btn {
|
|
flex: 1;
|
|
justify-content: center;
|
|
height: 48px;
|
|
}
|
|
|
|
.region-hidden {
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.onboarding-card {
|
|
padding: 32px 24px;
|
|
border-radius: 0;
|
|
border: none;
|
|
box-shadow: none;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.onboarding-container {
|
|
padding: 0;
|
|
background: white;
|
|
}
|
|
|
|
.product-card {
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
.product-select-indicator {
|
|
position: absolute;
|
|
top: 24px;
|
|
right: 24px;
|
|
}
|
|
|
|
.product-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
}
|
|
|
|
.region-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.progress-line {
|
|
width: 24px;
|
|
}
|
|
|
|
.form-actions {
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.form-actions .btn:first-child {
|
|
margin-top: 8px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
function goToStep(url) {
|
|
window.location.href = url;
|
|
}
|
|
|
|
let selectedProduct = 'hosted';
|
|
|
|
function selectProduct(element) {
|
|
if (element.classList.contains('disabled')) return;
|
|
|
|
// Remove selected from all
|
|
document.querySelectorAll('.product-card').forEach(card => {
|
|
card.classList.remove('selected');
|
|
});
|
|
|
|
// Add selected to clicked
|
|
element.classList.add('selected');
|
|
selectedProduct = element.dataset.product;
|
|
|
|
// Show/hide region section
|
|
const regionSection = document.getElementById('regionSection');
|
|
if (selectedProduct === 'hosted') {
|
|
regionSection.classList.remove('region-hidden');
|
|
} else {
|
|
regionSection.classList.add('region-hidden');
|
|
}
|
|
|
|
// Continue button always goes to next step (account/login)
|
|
const continueBtn = document.getElementById('continueBtn');
|
|
continueBtn.textContent = 'Continue →';
|
|
}
|
|
|
|
function contactSales() {
|
|
window.location.href = '/contact-sales';
|
|
}
|
|
|
|
function saveProduct(e) {
|
|
e.preventDefault();
|
|
|
|
const region = document.querySelector('input[name="region"]:checked')?.value;
|
|
|
|
console.log('Selected:', selectedProduct, region);
|
|
|
|
// Continue to account/login (Step 2)
|
|
window.location.href = '/onboarding/login';
|
|
|
|
return false;
|
|
}
|
|
|
|
// Initialize
|
|
selectProduct(document.querySelector('[data-product="hosted"]'));
|
|
</script>
|
|
{{end}}
|