From 7e6116de458608c13ec43c8aee59bd0aa43bc3e6 Mon Sep 17 00:00:00 2001 From: PKC278 <52959804+PKC278@users.noreply.github.com> Date: Sun, 11 Jan 2026 20:02:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E9=80=9A=E8=A1=8C?= =?UTF-8?q?=E5=AF=86=E9=92=A5=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E4=B8=8E?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - feat(login): 优化通行密钥(Passkey)登录逻辑,支持 Conditional UI 自动填充,并改进错误提示。 - feat(userProfile): 优化双重验证弹窗样式。 - feat(qrcode): 优化二维码生成逻辑与显示。 - feat(passkey): 优化通行密钥错误提示,添加最后使用时间显示。 --- package.json | 3 +- src/api/types.ts | 17 + src/components/dialog/OTPAuthDialog.vue | 231 ++++++++++++ src/components/dialog/PasskeyDialog.vue | 312 ++++++++++++++++ src/components/dialog/U115AuthDialog.vue | 18 +- src/locales/en-US.ts | 22 +- src/locales/zh-CN.ts | 20 +- src/locales/zh-TW.ts | 20 +- src/pages/login.vue | 187 +++++----- src/service-worker.ts | 39 +- src/views/user/UserProfileView.vue | 443 +++-------------------- yarn.lock | 132 +++++-- 12 files changed, 870 insertions(+), 574 deletions(-) create mode 100644 src/components/dialog/OTPAuthDialog.vue create mode 100644 src/components/dialog/PasskeyDialog.vue diff --git a/package.json b/package.json index 0ad210f3..4ba137fc 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "nprogress": "^0.2.0", "pinia": "^3.0.1", "pinia-plugin-persistedstate": "^4.2.0", - "qrcode.vue": "^3.6.0", + "qrcode": "^1.5.4", "sass": "^1.83.4", "tailwindcss": "^ 3.4.17", "vue": "^3.5.13", @@ -84,6 +84,7 @@ "@types/mousetrap": "^1.6.15", "@types/node": "^20.1.4", "@types/nprogress": "^0.2.3", + "@types/qrcode": "^1.5.6", "@types/webfontloader": "^1.6.34", "@typescript-eslint/eslint-plugin": "^8.20.0", "@typescript-eslint/parser": "^8.20.0", diff --git a/src/api/types.ts b/src/api/types.ts index 0c4134dc..e9dd2908 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -861,6 +861,16 @@ export interface User { nickname?: string } +// 通行密钥 +export interface PassKey { + id: number + name: string + created_at: string + last_used_at?: string + aaguid?: string + transports?: string +} + // 存储空间 export interface Storage { // 总空间 @@ -1429,3 +1439,10 @@ export interface SubscribeShareStatistics { // 总复用人次 total_reuse_count?: number } + +// 通用API响应 +export interface ApiResponse { + success: boolean + message?: string + data: T +} \ No newline at end of file diff --git a/src/components/dialog/OTPAuthDialog.vue b/src/components/dialog/OTPAuthDialog.vue new file mode 100644 index 00000000..3d873111 --- /dev/null +++ b/src/components/dialog/OTPAuthDialog.vue @@ -0,0 +1,231 @@ + + +