fix(webui): password strength indicators not updating

修复密码强度指示器不亮起的问题,将后端返回字段从 met 改为 ok 以匹配前端期望

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
H3CoF6
2026-05-08 21:03:28 +08:00
co-authored by Claude Sonnet 4.6
parent 3791addb43
commit d708be4627
+2 -2
View File
@@ -43,8 +43,8 @@ export const PASSWORD_RULES: PasswordRule[] = [
{ id: 'no-space', label: '不包含空格', test: (p) => !/\s/.test(p) && p.length > 0 },
];
export function evaluatePasswordRules(password: string): { id: string; label: string; met: boolean }[] {
return PASSWORD_RULES.map((r) => ({ id: r.id, label: r.label, met: r.test(password) }));
export function evaluatePasswordRules(password: string): { id: string; label: string; ok: boolean }[] {
return PASSWORD_RULES.map((r) => ({ id: r.id, label: r.label, ok: r.test(password) }));
}
export function isStrongPassword(password: string): boolean {