feat(updater): decouple update notice from auto download

Closes #9329
This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-09-16 23:50:18 +08:00
1 parent b891bf80fd
commit 2c97e44d82
20 files changed
+187 -18

No files matched your search

@@ -86,6 +86,7 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = [
"formatSqlOnSqlFileSave",
"showTableDdlHoverPreview",
"updateNotificationsEnabled",
"autoDownloadUpdates",
"sidebarObjectInfoMode",
"sidebarAllowHorizontalScroll",
"sidebarShowTooltips",
@@ -263,6 +263,7 @@ export const SETTINGS_SEARCH_DEFINITIONS: readonly SettingsSearchDefinition[] =
{ id: "about-support", category: "about", titleKey: "settings.supportInfoTitle", descriptionKey: "settings.supportInfoDescription", targetId: "about" },
{ id: "about-transfer", category: "about", titleKey: "settings.settingsTransferTitle", descriptionKey: "settings.settingsTransferDescription", targetId: "about" },
{ id: "about-update-notifications", category: "about", titleKey: "settings.updateNotificationsEnabled", descriptionKey: "settings.updateNotificationsEnabledDescription", targetId: "about" },
{ id: "about-auto-download-updates", category: "about", titleKey: "settings.autoDownloadUpdates", descriptionKey: "settings.autoDownloadUpdatesDescription", targetId: "about" },
{ id: "about-update", category: "about", titleKey: "settings.updateDownloadSource", descriptionKey: "settings.updateDownloadSourceDescription", targetId: "about" },
];
@@ -171,7 +171,7 @@ const SETTINGS_TRANSFER_CATEGORY_KEYS: Record<SettingsTransferCategoryId, readon
],
shortcuts: ["shortcuts", "sqlShortcuts"],
snippets: ["snippets"],
other: ["updateDownloadSource", "updateNotificationsEnabled"],
other: ["updateDownloadSource", "updateNotificationsEnabled", "autoDownloadUpdates"],
};
const KEY_TO_CATEGORY = new Map<string, SettingsTransferCategoryId>();
@@ -267,6 +267,7 @@ const PASS_THROUGH_BOOLEAN_KEYS = [
"sidebarAllowHorizontalScroll",
"sidebarShowTooltips",
"updateNotificationsEnabled",
"autoDownloadUpdates",
] as const satisfies readonly EditorSettingsDraftKey[];
const PASS_THROUGH_FIELD_VALIDATORS: Partial<Record<EditorSettingsDraftKey, (value: unknown) => boolean>> = {