Add Auth0 login gate for admin actions
Show login status in header, guard manage actions behind allowed emails, and add Auth0 SPA SDK with CDN fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
60
styles.css
60
styles.css
@@ -138,6 +138,54 @@ html[data-theme="light"] .topbar {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.user {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
user-select: none;
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
.user-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
html[data-theme="light"] .user-dot {
|
||||
background: rgba(0, 0, 0, 0.38);
|
||||
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.user[data-auth="ok"] {
|
||||
color: rgba(180, 255, 210, 0.9);
|
||||
border-color: rgba(34, 197, 94, 0.28);
|
||||
background: rgba(34, 197, 94, 0.06);
|
||||
}
|
||||
|
||||
html[data-theme="light"] .user[data-auth="ok"] {
|
||||
color: rgba(0, 120, 70, 0.92);
|
||||
}
|
||||
|
||||
.user[data-auth="ok"] .user-dot {
|
||||
background: rgba(34, 197, 94, 0.9);
|
||||
box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
|
||||
}
|
||||
|
||||
.user-text {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.btn {
|
||||
appearance: none;
|
||||
border: 1px solid var(--border);
|
||||
@@ -155,6 +203,18 @@ html[data-theme="light"] .topbar {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.btn[disabled],
|
||||
.icon-btn[disabled] {
|
||||
opacity: 0.55;
|
||||
cursor: not-allowed;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
.btn[disabled]:hover,
|
||||
.icon-btn[disabled]:hover {
|
||||
background: var(--panel);
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: var(--panel2);
|
||||
transform: translateY(-1px);
|
||||
|
||||
Reference in New Issue
Block a user