更新若干功能

This commit is contained in:
李琦
2026-08-15 07:29:45 +08:00
parent ce00c9d193
commit 4954295961
9 changed files with 164 additions and 44 deletions

3
app.go
View File

@@ -111,6 +111,7 @@ func (a *App) startup(ctx context.Context) {
}
a.store = s
a.bootstrap = BootstrapStatus{State: BootstrapReady, DefaultPath: defaultPath, DatabasePath: c.DatabasePath}
a.applyPackagedSyncConfig()
a.store.Log("info", "系统", "应用程序启动", "")
a.store.Log("info", "数据库", "桌面运行时已连接", s.path)
}
@@ -146,6 +147,7 @@ func (a *App) InitializeDatabase(path string) (BootstrapStatus, error) {
return a.bootstrap, e
}
a.bootstrap = BootstrapStatus{State: BootstrapReady, DefaultPath: a.bootstrap.DefaultPath, DatabasePath: s.path}
a.applyPackagedSyncConfig()
a.store.Log("info", "数据库", "数据库初始化成功", s.path)
return a.bootstrap, nil
}
@@ -604,6 +606,7 @@ func (a *App) MigrateDatabase(target string) error {
return coded("BOOTSTRAP_WRITE_FAILED", e)
}
a.bootstrap = BootstrapStatus{State: BootstrapReady, DefaultPath: a.bootstrap.DefaultPath, DatabasePath: target}
a.applyPackagedSyncConfig()
a.store.Log("info", "数据库", "数据库迁移成功", target)
return nil
}