fix: harden app lock system unlock flow

This commit is contained in:
Zheng Liu
2026-06-24 14:42:49 +08:00
parent f6a49dbf0a
commit 0ea707f70f
14 changed files with 114 additions and 26 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ interface AppLockOverlayProps {
onUnlock: (password: string) => Promise<AppLockUnlockResult>;
systemUnlockStatus?: AppLockSystemUnlockStatus;
onSystemUnlock?: () => Promise<AppLockSystemUnlockResult>;
onResetAppLock: () => Promise<void>;
onResetAppLock: (currentPassword: string) => Promise<void>;
}
export function getAppLockReasonMessageKey(reason: AppLockReason | null): string {
@@ -135,7 +135,7 @@ export const AppLockOverlay: React.FC<AppLockOverlayProps> = ({
setIsResetting(true);
setResetError(false);
try {
await onResetAppLock();
await onResetAppLock(password);
} catch {
setResetError(true);
setIsResetting(false);