04/22 Fix web vault UI is broken

This commit is contained in:
2026-04-23 13:31:17 -04:00
parent 0aa2432942
commit 16fe0e9c62
+817
View File
@@ -440,6 +440,823 @@ ul {
height: 100%;
}
/* ── Vault main ──────────────────────────────────────────────────── */
.vault-main {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--color-bg);
}
#view-vault,
#view-security {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
min-height: 0;
position: relative;
}
#view-vault.hidden,
#view-security.hidden {
display: none;
}
.vault-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 24px;
background: var(--color-surface);
border-bottom: 1px solid var(--color-border);
gap: 16px;
flex-shrink: 0;
}
.vault-header-inner {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
gap: 16px;
}
.vault-title {
font-size: 18px;
font-weight: 600;
white-space: nowrap;
}
.vault-toolbar {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
justify-content: flex-end;
}
.search-wrapper {
display: flex;
align-items: center;
background: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: 20px;
padding: 6px 14px;
gap: 8px;
flex: 1;
max-width: 360px;
}
.search-icon {
color: var(--color-text-muted);
}
#search-input {
border: none;
background: none;
outline: none;
flex: 1;
font-size: 14px;
}
/* ── Sort control ────────────────────────────────────────────────── */
.sort-wrapper select {
padding: 6px 10px;
border: 1px solid var(--color-border);
border-radius: 20px;
background: var(--color-bg);
color: var(--color-text);
font-size: 13px;
cursor: pointer;
outline: none;
}
.sort-wrapper select:focus {
border-color: var(--color-primary);
}
.btn-fab {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--color-primary);
color: #fff;
font-size: 24px;
font-weight: 300;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 8px rgba(208, 2, 27, 0.35);
transition: background var(--transition), box-shadow var(--transition);
flex-shrink: 0;
}
.btn-fab:hover {
background: var(--color-primary-dark);
box-shadow: 0 4px 14px rgba(208, 2, 27, 0.45);
}
/* ── Vault list ──────────────────────────────────────────────────── */
.vault-list {
flex: 1;
overflow-y: auto;
padding: 12px 24px 24px;
}
.vault-list-inner {
max-width: 900px;
}
.vault-group-header {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--color-text-muted);
padding: 16px 0 6px;
border-bottom: 1px solid var(--color-border);
margin-bottom: 4px;
}
.vault-empty {
text-align: center;
color: var(--color-text-muted);
padding: 60px 0;
font-size: 15px;
}
.btn-icon {
width: 30px;
height: 30px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
color: var(--color-text-muted);
transition: background var(--transition), color var(--transition);
flex-shrink: 0;
}
.btn-icon:hover {
background: var(--color-bg);
color: var(--color-text);
}
/* ── Spinner ─────────────────────────────────────────────────────── */
.spinner-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.7);
z-index: 10;
}
.spinner-overlay.hidden {
display: none;
}
.spinner {
width: 36px;
height: 36px;
border: 3px solid var(--color-border);
border-top-color: var(--color-primary);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* ── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.45);
display: none;
align-items: center;
justify-content: center;
z-index: 100;
padding: 16px;
}
.modal-overlay.open {
display: flex;
}
.modal {
background: var(--color-surface);
border-radius: var(--radius);
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
width: 100%;
max-width: 480px;
max-height: 90vh;
overflow-y: auto;
padding: 28px;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.modal-header h3 {
font-size: 18px;
font-weight: 600;
}
.btn-close {
font-size: 18px;
color: var(--color-text-muted);
padding: 4px;
border-radius: 4px;
}
.btn-close:hover {
background: var(--color-bg);
color: var(--color-text);
}
.modal-actions {
display: flex;
gap: 10px;
justify-content: flex-end;
margin-top: 20px;
}
.required {
color: var(--color-primary);
}
/* ── Modal item (wider for address/card forms) ───────────────────── */
.modal-item {
max-width: 540px;
}
/* ── Multi-column form rows ──────────────────────────────────────── */
.form-row {
display: flex;
gap: 12px;
}
.form-row .form-group {
flex: 1;
}
/* ── Btn small ───────────────────────────────────────────────────── */
.btn-sm {
padding: 5px 12px;
font-size: 12px;
border-radius: 6px;
}
/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%) translateY(20px);
background: #1a1a2e;
color: #fff;
padding: 10px 20px;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
opacity: 0;
transition: opacity 0.25s, transform 0.25s;
pointer-events: none;
z-index: 200;
white-space: nowrap;
}
.toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
.toast.toast-error {
background: #c00;
}
/* ── Unlock overlay ──────────────────────────────────────────────── */
.modal-unlock {
max-width: 380px;
}
.unlock-logo {
margin-bottom: 16px;
}
.unlock-title {
margin-bottom: 4px;
}
.unlock-subtitle {
color: var(--color-text-muted);
font-size: 13px;
margin-bottom: 20px;
}
.btn-link {
padding: 10px 20px;
border-radius: var(--radius);
text-decoration: none;
}
/* ── Auth step hint ─────────────────────────────────────────────── */
.auth-step-hint {
color: var(--color-text-muted);
font-size: 13px;
margin-bottom: 16px;
}
#mfa-code {
font-size: 22px;
letter-spacing: 0.2em;
text-align: center;
}
/* ── Panel body (sharing / emergency) ───────────────────────────── */
.panel-body {
flex: 1;
overflow-y: auto;
padding: 20px 24px;
}
/* ── Tabs ────────────────────────────────────────────────────────── */
.panel-tabs {
display: flex;
gap: 4px;
margin-bottom: 16px;
border-bottom: 2px solid var(--color-border);
padding-bottom: 0;
}
.tab-btn {
padding: 8px 16px;
border-radius: 6px 6px 0 0;
font-size: 13px;
font-weight: 500;
color: var(--color-text-muted);
border-bottom: 2px solid transparent;
margin-bottom: -2px;
transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover {
color: var(--color-text);
}
.tab-btn.active {
color: var(--color-primary);
border-bottom-color: var(--color-primary);
}
/* ── Share / Emergency lists ────────────────────────────────────── */
.share-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.share-item {
display: flex;
align-items: center;
gap: 12px;
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius);
padding: 12px 14px;
}
.share-icon {
font-size: 22px;
flex-shrink: 0;
}
.share-info {
flex: 1;
min-width: 0;
}
.share-name {
display: block;
font-weight: 500;
}
.share-meta {
display: block;
font-size: 12px;
color: var(--color-text-muted);
margin-top: 2px;
}
.share-actions {
display: flex;
gap: 6px;
align-items: center;
flex-shrink: 0;
}
/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
display: inline-block;
padding: 3px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
}
.badge-warn {
background: #fff8e1;
color: #e65100;
border: 1px solid #ffb74d;
}
.badge-info {
background: #e3f2fd;
color: #1565c0;
border: 1px solid #90caf9;
}
/* ── Settings modal ──────────────────────────────────────────────── */
.modal-settings {
max-width: 520px;
}
.settings-section {
padding: 16px 0;
border-bottom: 1px solid var(--color-border);
}
.settings-section:last-child {
border-bottom: none;
}
.settings-section-title {
font-size: 15px;
font-weight: 600;
margin-bottom: 8px;
}
.settings-desc {
font-size: 13px;
color: var(--color-text-muted);
margin-bottom: 10px;
line-height: 1.5;
}
.mfa-qr {
display: block;
margin: 12px auto;
max-width: 180px;
border: 1px solid var(--color-border);
border-radius: 4px;
}
.mfa-secret-text {
font-family: monospace;
font-size: 12px;
}
.mfa-secret-text code {
background: var(--color-bg);
padding: 2px 6px;
border-radius: 4px;
user-select: all;
}
/* ── Security dashboard ──────────────────────────────────────────── */
.security-dashboard {
flex: 1;
overflow-y: auto;
padding: 24px;
display: flex;
flex-direction: column;
gap: 24px;
}
.sec-notice {
text-align: center;
color: var(--color-text-muted);
padding: 40px 0;
font-size: 15px;
}
.security-summary {
display: flex;
gap: 20px;
align-items: center;
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius);
padding: 24px;
flex-wrap: wrap;
}
.sec-score-card {
text-align: center;
flex-shrink: 0;
}
.sec-score {
font-size: 56px;
font-weight: 700;
line-height: 1;
}
.sec-score.score-good {
color: #2e7d32;
}
.sec-score.score-fair {
color: #e65100;
}
.sec-score.score-poor {
color: #c62828;
}
.sec-score-label {
font-size: 16px;
font-weight: 600;
margin-top: 4px;
}
.sec-score-desc {
font-size: 12px;
color: var(--color-text-muted);
margin-top: 2px;
}
.sec-stats {
display: flex;
gap: 16px;
flex-wrap: wrap;
}
.sec-stat {
text-align: center;
background: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: var(--radius);
padding: 12px 20px;
min-width: 80px;
}
.sec-stat-warn {
border-color: #ffb74d;
background: #fff8e1;
}
.sec-stat-info {
border-color: #90caf9;
background: #e3f2fd;
}
.sec-stat-ok {
border-color: #a5d6a7;
background: #e8f5e9;
}
.sec-stat-num {
display: block;
font-size: 28px;
font-weight: 700;
}
.sec-stat-label {
display: block;
font-size: 12px;
color: var(--color-text-muted);
margin-top: 2px;
}
.sec-section {
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius);
overflow: hidden;
}
.sec-section-header {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px 20px;
border-bottom: 1px solid var(--color-border);
background: var(--color-bg);
}
.sec-section-icon {
font-size: 20px;
flex-shrink: 0;
}
.sec-section-title {
font-weight: 600;
font-size: 15px;
}
.sec-section-desc {
font-size: 12px;
color: var(--color-text-muted);
margin-top: 2px;
}
.sec-item-list {
padding: 0;
}
.sec-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 20px;
border-bottom: 1px solid var(--color-border);
}
.sec-item:last-child {
border-bottom: none;
}
.sec-item-name {
font-weight: 500;
flex: 1;
}
.sec-item-sub {
font-size: 12px;
color: var(--color-text-muted);
flex: 1;
}
/* ── Item Detail Modal ───────────────────────────────────────────── */
.modal-detail {
max-height: 80vh;
display: flex;
flex-direction: column;
}
.detail-body {
flex: 1;
overflow-y: auto;
padding: 4px 0;
}
.detail-field {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 10px 0;
border-bottom: 1px solid var(--color-border);
}
.detail-field:last-child {
border-bottom: none;
}
.detail-label {
font-size: 12px;
color: var(--color-text-muted);
width: 140px;
flex-shrink: 0;
padding-top: 4px;
}
.detail-val-row {
display: flex;
align-items: center;
gap: 6px;
flex: 1;
flex-wrap: wrap;
}
.detail-val {
font-size: 14px;
word-break: break-all;
}
.detail-sensitive {
display: inline-flex;
align-items: center;
font-family: monospace;
font-size: 14px;
}
.detail-masked {
letter-spacing: 2px;
}
.detail-actual {
word-break: break-all;
}
.btn-reveal,
.btn-copy-field {
background: none;
border: none;
cursor: pointer;
padding: 2px 4px;
font-size: 14px;
color: var(--color-text-muted);
flex-shrink: 0;
}
.btn-reveal:hover,
.btn-copy-field:hover {
color: var(--color-primary);
}
/* ── Emergency Vault Panel ───────────────────────────────────────── */
.em-vault-panel {
padding: 8px 0;
}
.em-vault-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 0 16px;
border-bottom: 2px solid var(--color-border);
margin-bottom: 8px;
}
.em-vault-header h4 {
margin: 0;
font-size: 15px;
font-weight: 600;
}
.em-vault-list {
list-style: none;
padding: 0;
margin: 0;
}
.em-vault-item {
border-bottom: 1px solid var(--color-border);
}
.em-vault-item:last-child {
border-bottom: none;
}
.em-vault-item-header {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
background: none;
border: none;
padding: 12px 4px;
cursor: pointer;
text-align: left;
}
.em-vault-item-header:hover {
background: var(--color-bg);
border-radius: var(--radius);
}
.em-vault-icon {
font-size: 18px;
flex-shrink: 0;
}
.em-vault-name {
font-weight: 500;
flex: 1;
}
.em-vault-type {
font-size: 12px;
color: var(--color-text-muted);
}
.em-vault-chevron {
font-size: 12px;
color: var(--color-text-muted);
flex-shrink: 0;
}
.em-vault-item-body {
padding: 0 8px 12px 36px;
}
.em-detail-body .detail-field {
padding: 8px 0;
}
/* ── Sidebar ─────────────────────────────────────────────────────── */
/* ── Base sidebar styles (shared by mobile and desktop) ─────────── */