feat: implement QR code scanning with jsQR

Add jsQR for QR detection and update translations for scanning feedback

Co-authored-by: Simon <85533298+handsomezhuzhu@users.noreply.github.com>
This commit is contained in:
v0
2026-01-15 17:21:46 +00:00
parent 16d51ea92c
commit 08a37a72e7
4 changed files with 95 additions and 9 deletions

View File

@@ -108,6 +108,12 @@ const translations = {
importedTokens: "个令牌",
importFailed: "导入失败",
invalidFormat: "无效的文件格式",
scanSuccess: "扫描成功",
qrCodeDetected: "已识别二维码,信息已自动填充",
scanFailed: "扫描失败",
noQrCodeFound: "未能在图片中识别到二维码",
invalidQrCode: "二维码不是有效的 TOTP 格式",
imageLoadFailed: "图片加载失败",
},
en: {
// Header
@@ -211,6 +217,12 @@ const translations = {
importedTokens: "tokens",
importFailed: "Import failed",
invalidFormat: "Invalid file format",
scanSuccess: "Scan successful",
qrCodeDetected: "QR code detected, info auto-filled",
scanFailed: "Scan failed",
noQrCodeFound: "Could not find QR code in image",
invalidQrCode: "QR code is not a valid TOTP format",
imageLoadFailed: "Failed to load image",
},
}