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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user