feat:新增了切换账号的功能 (#89)

This commit is contained in:
xuncha
2026-01-24 12:43:09 +08:00
committed by GitHub
parent 16cbc6adb1
commit 3a10aeb23e
13 changed files with 300 additions and 86 deletions

View File

@@ -185,9 +185,15 @@ function App() {
const decryptKey = await configService.getDecryptKey()
const wxid = await configService.getMyWxid()
const onboardingDone = await configService.getOnboardingDone()
const wxidConfig = wxid ? await configService.getWxidConfig(wxid) : null
const effectiveDecryptKey = wxidConfig?.decryptKey || decryptKey
if (wxidConfig?.decryptKey && wxidConfig.decryptKey !== decryptKey) {
await configService.setDecryptKey(wxidConfig.decryptKey)
}
// 如果配置完整,自动测试连接
if (dbPath && decryptKey && wxid) {
if (dbPath && effectiveDecryptKey && wxid) {
if (!onboardingDone) {
await configService.setOnboardingDone(true)
}