Setup wizard step 3 now has self-explanatory passphrase feedback: - Strength meter: 5 segments with smooth color transitions (very-weak/weak/fair/good/strong). Tier 4 gets a subtle glow. - Nuanced label (lowercase, tracked): "very weak" / "weak" / "fair" / "good" / "strong" — color-matched to each tier. - Entropy readout line: "~10^N guesses — <time to crack>" with tiered shorthand (trivial / minutes-on-GPU / hours-to-days / years-on-consumer / beyond consumer / uncrackable). - Live char counter in the strength row. - Eye toggle buttons on both passphrase fields. Flip type="password" <-> type="text" without re-render, preserving focus + cursor. - Live match indicator (✓ / ✗) between the confirm field and its eye toggle. Updates per keystroke. - Create button gate widened: now requires score >= 3 AND confirm field filled AND confirm matches. Disabled button carries a tooltip saying which condition failed. - Contextual help box above the passphrase field explaining the "long phrase > complex password" idea + the score >= 3 threshold. All live-update paths (counter, label, entropy, match indicator, button gate) go through updateStrengthUi() which targets the DOM directly — no full re-render, so focus/cursor survive every keystroke. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
216 lines
5.0 KiB
HTML
216 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.0">
|
|
<title>relicario — vault setup</title>
|
|
<link rel="stylesheet" href="styles.css">
|
|
<style>
|
|
body {
|
|
width: auto;
|
|
max-width: 560px;
|
|
margin: 40px auto;
|
|
padding: 0 20px;
|
|
max-height: none;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.step-instructions {
|
|
background: #161b22;
|
|
border: 1px solid #30363d;
|
|
border-radius: 6px;
|
|
padding: 16px;
|
|
margin: 12px 0;
|
|
font-size: 12px;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.step-instructions ol {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.step-instructions li {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.step-instructions code {
|
|
background: #21262d;
|
|
padding: 1px 5px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.image-preview {
|
|
max-width: 200px;
|
|
max-height: 150px;
|
|
border-radius: 4px;
|
|
border: 1px solid #30363d;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.strength-bar {
|
|
display: flex;
|
|
gap: 3px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.strength-bar .seg {
|
|
flex: 1;
|
|
height: 5px;
|
|
background: #21262d;
|
|
border-radius: 3px;
|
|
transition: background 0.25s ease, box-shadow 0.25s ease;
|
|
}
|
|
|
|
/* zxcvbn score-driven colors. Higher-scored bars light up earlier bars too. */
|
|
.strength-bar.s0 .seg.i0 { background: #f85149; }
|
|
.strength-bar.s1 .seg.i0,
|
|
.strength-bar.s1 .seg.i1 { background: #f08d49; }
|
|
.strength-bar.s2 .seg.i0,
|
|
.strength-bar.s2 .seg.i1,
|
|
.strength-bar.s2 .seg.i2 { background: #d29922; }
|
|
.strength-bar.s3 .seg.i0,
|
|
.strength-bar.s3 .seg.i1,
|
|
.strength-bar.s3 .seg.i2,
|
|
.strength-bar.s3 .seg.i3 { background: #3fb950; }
|
|
.strength-bar.s4 .seg {
|
|
background: #56d364;
|
|
box-shadow: 0 0 4px rgba(86, 211, 100, 0.4);
|
|
}
|
|
|
|
.strength-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: baseline;
|
|
margin-top: 5px;
|
|
}
|
|
.strength-label {
|
|
font-size: 11px;
|
|
margin: 0;
|
|
text-transform: lowercase;
|
|
letter-spacing: 0.03em;
|
|
transition: color 0.2s ease;
|
|
}
|
|
.strength-label.s-very-weak { color: #f85149; }
|
|
.strength-label.s-weak { color: #f08d49; }
|
|
.strength-label.s-fair { color: #d29922; }
|
|
.strength-label.s-good { color: #3fb950; }
|
|
.strength-label.s-strong { color: #56d364; font-weight: 600; }
|
|
|
|
.char-counter {
|
|
font-size: 10px;
|
|
color: #6e7681;
|
|
margin: 0;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.entropy-line {
|
|
font-size: 10px;
|
|
color: #8b949e;
|
|
margin-top: 2px;
|
|
font-family: "SF Mono", "JetBrains Mono", monospace;
|
|
min-height: 1em;
|
|
}
|
|
|
|
.pass-help {
|
|
background: #0d1117;
|
|
border: 1px solid #21262d;
|
|
border-left: 2px solid #1f6feb;
|
|
border-radius: 4px;
|
|
padding: 8px 12px;
|
|
font-size: 11px;
|
|
color: #8b949e;
|
|
line-height: 1.55;
|
|
margin: 10px 0;
|
|
}
|
|
.pass-help strong { color: #c9d1d9; }
|
|
|
|
.passphrase-field {
|
|
position: relative;
|
|
}
|
|
.passphrase-field input {
|
|
padding-right: 76px; /* room for match indicator + eye button */
|
|
}
|
|
.eye-btn {
|
|
position: absolute;
|
|
right: 6px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
height: 24px;
|
|
padding: 0 8px;
|
|
background: transparent;
|
|
border: 1px solid #30363d;
|
|
border-radius: 3px;
|
|
color: #8b949e;
|
|
cursor: pointer;
|
|
font-size: 10px;
|
|
font-family: inherit;
|
|
text-transform: lowercase;
|
|
letter-spacing: 0.03em;
|
|
}
|
|
.eye-btn:hover { color: #c9d1d9; border-color: #484f58; }
|
|
|
|
.match-indicator {
|
|
position: absolute;
|
|
right: 50px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
font-size: 16px;
|
|
line-height: 1;
|
|
pointer-events: none;
|
|
transition: color 0.15s ease, opacity 0.15s ease;
|
|
}
|
|
.match-indicator.ok { color: #3fb950; }
|
|
.match-indicator.bad { color: #f85149; }
|
|
|
|
/* Primary button explicitly dims when disabled so the gate is obvious. */
|
|
.btn-primary:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.success-box {
|
|
background: #0d1b0e;
|
|
border: 1px solid #238636;
|
|
border-radius: 6px;
|
|
padding: 20px;
|
|
margin: 16px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.success-box h3 {
|
|
color: #3fb950;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.config-blob {
|
|
background: #161b22;
|
|
border: 1px solid #30363d;
|
|
border-radius: 4px;
|
|
padding: 12px;
|
|
font-size: 11px;
|
|
word-break: break-all;
|
|
user-select: all;
|
|
margin: 12px 0;
|
|
max-height: 120px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.test-result {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-top: 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.test-result.pass { color: #3fb950; }
|
|
.test-result.fail { color: #f85149; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script src="setup.js"></script>
|
|
</body>
|
|
</html>
|