feat: 提交

This commit is contained in:
Wxw-Gu
2026-07-27 20:34:57 +08:00
parent 95e517eca5
commit f626d89a1a
7 changed files with 154 additions and 42 deletions
+2 -3
View File
@@ -2,7 +2,6 @@ import { app } from 'electron'
import fs from 'fs-extra'
import path from 'path'
import os from 'os'
import { discoverWindowsDbRoots } from '../windows-db-root-discovery'
/**
* 把 V3 时代的 "...\\Documents\\WeChat Files" 路径重定向到
@@ -29,6 +28,7 @@ export interface AppSettings {
imageXorKey: string
imageAesKey: string
imageKeyFallbackDisabled: boolean
recallProtectionEnabled: boolean
autoLogin: boolean
autoLoginPreferenceSet: boolean
}
@@ -55,8 +55,6 @@ function getDefaultDbRootCandidates(home: string): string[] {
path.join(os.homedir(), 'AppData', 'Roaming', 'Tencent', 'xwechat_files')
]
candidates.push(...discoverWindowsDbRoots())
return unique(candidates)
}
@@ -106,6 +104,7 @@ const DEFAULT_SETTINGS: AppSettings = {
imageXorKey: '',
imageAesKey: '',
imageKeyFallbackDisabled: false,
recallProtectionEnabled: false,
autoLogin: ['1', 'true', 'yes', 'on'].includes(
String(import.meta.env.VITE_AUTO_LOGIN || '')
.trim()