feat(slideover): per-entry password strength bar

The entry modal + register already show a strength bar; the slideover
password field didn't. Added one in soPasswordField reusing the existing
.strength-bar/--strength CSS and computeStrength (no zxcvbn). Vault health
already scores weakness via the same function.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-09 22:45:44 +01:00
parent c559e75310
commit 2935b1e9f1
+7
View File
@@ -4364,6 +4364,13 @@ function soPasswordField(plain) {
row.appendChild(copy); row.appendChild(copy);
row.appendChild(gen); row.appendChild(gen);
wrap.appendChild(row); wrap.appendChild(row);
// Live strength bar — same .strength-bar/--strength pattern as the entry
// modal + register, reusing computeStrength (no zxcvbn).
const bar = el('div', { class: 'strength-bar', id: 'soStrengthBar' });
const setStr = () => bar.style.setProperty('--strength', computeStrength(input.value) + '%');
input.addEventListener('input', setStr);
setStr();
wrap.appendChild(bar);
return wrap; return wrap;
} }