forked from Nixius/authelia
1
0
Fork 0
ATLAS/docker/ss-atlas/templates/pages/dashboard.html

162 lines
5.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>a250.ca - Dashboard</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0f1117;
--surface: #1a1d27;
--border: #2a2d3a;
--text: #e4e4e7;
--muted: #a1a1aa;
--accent: #6366f1;
--accent-hover: #818cf8;
--green: #22c55e;
--red: #ef4444;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
padding: 2rem;
}
.header {
max-width: 720px;
margin: 0 auto 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.header .logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; }
.header .user-info {
display: flex;
align-items: center;
gap: 1rem;
color: var(--muted);
font-size: 0.9rem;
}
.container { max-width: 720px; margin: 0 auto; }
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.5rem 2rem;
margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.status-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
}
.status-label { color: var(--muted); font-size: 0.9rem; }
.status-value { font-weight: 600; font-size: 0.9rem; }
.badge {
display: inline-block;
padding: 0.2rem 0.7rem;
border-radius: 100px;
font-size: 0.8rem;
font-weight: 600;
}
.badge-active { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-inactive { background: rgba(239,68,68,0.15); color: var(--red); }
.stack-link {
display: block;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.75rem 1rem;
color: var(--accent);
text-decoration: none;
font-weight: 500;
margin-top: 0.75rem;
transition: border-color 0.2s;
}
.stack-link:hover { border-color: var(--accent); }
.btn {
display: inline-block;
background: var(--accent);
color: #fff;
border: none;
border-radius: 8px;
padding: 0.6rem 1.25rem;
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
text-decoration: none;
transition: background 0.2s;
}
.btn:hover { background: var(--accent-hover); }
.btn-outline {
background: transparent;
border: 1px solid var(--border);
color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.actions { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state p { margin-bottom: 1.5rem; }
</style>
</head>
<body>
<div class="header">
<div class="logo">a250.ca</div>
<div class="user-info">
{{if .User}}{{.User}}{{else}}Not logged in{{end}}
</div>
</div>
<div class="container">
{{if .IsSubscribed}}
<div class="card">
<h2>Subscription</h2>
<div class="status-row">
<span class="status-label">Status</span>
<span class="badge badge-active">Active</span>
</div>
<div class="status-row">
<span class="status-label">Email</span>
<span class="status-value">{{.Email}}</span>
</div>
</div>
<div class="card">
<h2>Your Stack</h2>
<p style="color: var(--muted); font-size: 0.9rem;">Your dedicated environment is live and accessible at:</p>
<a class="stack-link" href="http://{{.User}}.{{.Domain}}">{{.User}}.{{.Domain}}</a>
</div>
<div class="card">
<h2>Manage</h2>
<div class="actions">
<form method="POST" action="/portal" style="margin:0">
<input type="hidden" name="customer_id" value="">
<button type="submit" class="btn">Manage Subscription</button>
</form>
<a href="{{.AutheliaURL}}" class="btn btn-outline">Account Settings</a>
</div>
<p style="color: var(--muted); font-size: 0.8rem; margin-top: 1rem;">
No refunds for the current billing period. Access continues until the end of your paid month.
</p>
</div>
{{else}}
<div class="card">
<div class="empty-state">
{{if .User}}
<h2>No Active Subscription</h2>
<p>You're signed in as <strong>{{.User}}</strong>, but you don't have an active subscription.</p>
<a href="/" class="btn">Subscribe Now</a>
{{else}}
<h2>Sign In Required</h2>
<p>Sign in to access your dashboard.</p>
<a href="{{.AutheliaURL}}" class="btn">Sign In</a>
{{end}}
</div>
</div>
{{end}}
</div>
</body>
</html>