mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
feat:新增了切换账号的功能 (#89)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user