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 @@ + + +