实现数据库密钥设置页

This commit is contained in:
电摇小子
2026-07-14 11:07:35 +08:00
parent ab24185670
commit f1ceef0e5e
21 changed files with 1264 additions and 77 deletions
+34
View File
@@ -0,0 +1,34 @@
export type DatabaseKeyValidationCode =
| 'INVALID_FORMAT'
| 'DATABASE_OPEN_FAILED'
| 'ACCOUNT_MISMATCH'
| 'ROOT_UNAVAILABLE'
| 'DATABASE_FILE_MISSING'
| 'UNKNOWN_VALIDATION_ERROR'
export interface DatabaseKeyValidationResult {
success: boolean
code?: DatabaseKeyValidationCode
error?: string
accountRoot?: string
wxid?: string
contacts?: { available: boolean; count?: number }
messages?: { available: boolean; count?: number }
}
export interface DatabaseKeyStorageResult {
success: boolean
key?: string
error?: string
saved: boolean
encryptionAvailable: boolean
}
export interface DatabaseKeyEnvironment {
platform: NodeJS.Platform
autoDetectSupported: boolean
wechatRunning: boolean
accountIdentified: boolean
dbConnected: boolean
encryptionAvailable: boolean
}