feat: add TOTP QR code scanning functionality and related UI components

This commit is contained in:
shuaiplus
2026-05-04 01:44:27 +08:00
parent 851c9c4080
commit 45f0387526
10 changed files with 366 additions and 3 deletions
+16
View File
@@ -8,3 +8,19 @@ declare module 'qrcode-generator' {
}
export default function qrcode(typeNumber: number, errorCorrectionLevel: 'L' | 'M' | 'Q' | 'H'): QrCode;
}
interface BarcodeDetectorResult {
rawValue: string;
}
interface BarcodeDetector {
detect(image: ImageBitmapSource): Promise<BarcodeDetectorResult[]>;
}
interface BarcodeDetectorConstructor {
new (options?: { formats?: string[] }): BarcodeDetector;
}
interface Window {
BarcodeDetector?: BarcodeDetectorConstructor;
}