This commit is contained in:
ZacharyZhang-NY committed 2026-03-19 16:04:35 -04:00
1 parent da1fec8f2a
commit b28ed38b8d
116 files changed
+273040 -723

No files matched your search

+6 -1
View File
@@ -430,10 +430,13 @@ export class AppDatabase {
return runLogs.some((run) => run.logPath ? safeRealpath(run.logPath) === resolvedTarget : false);
}
updateSettings(input: { theme?: "system" | "light" | "dark"; updatesEnabled?: boolean; logRetentionDays?: number }) {
updateSettings(input: { theme?: "system" | "light" | "dark"; locale?: "en" | "zh"; updatesEnabled?: boolean; logRetentionDays?: number }) {
if (input.theme) {
this.setSetting("theme", input.theme);
}
if (input.locale) {
this.setSetting("locale", input.locale);
}
if (typeof input.updatesEnabled === "boolean") {
this.setSetting("updates_enabled", input.updatesEnabled ? "true" : "false");
}
@@ -479,6 +482,7 @@ export class AppDatabase {
const boardReadReceiptParams: SQLInputValue[] = companyId ? [BOARD_READER_ID, companyId] : [BOARD_READER_ID];
const connectors = this.readConnectors();
const theme = (this.getSetting("theme") as "system" | "light" | "dark" | null) ?? "system";
const locale = (this.getSetting("locale") as "en" | "zh" | null) ?? "en";
const boardReadReceiptMap = new Map(
this.readAll<{ messageId: string; readAt: string }>(
`select reads.message_id as messageId, reads.read_at as readAt
@@ -493,6 +497,7 @@ export class AppDatabase {
profilePath: this.profileDir,
updatesEnabled: this.getSetting("updates_enabled") !== "false",
theme,
locale,
backend: {
secretBackend: this.vault.getBackendLabel(),
},