Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(desktop): simplify backup frequency choices

tianma-iffdb1dfab384d
diff --git a/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx b/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx
index d7ba263f..de76a435 100644
--- a/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx
+++ b/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx
@@ -146,7 +146,8 @@ export const DesktopScheduledBackupCard = () => {
<label className="grid gap-1.5 text-xs font-medium text-slate-700">
<span>{t("desktopBackup.frequency")}</span>
<select className="h-8 rounded-md border border-input bg-card px-2.5 text-xs text-slate-800 outline-none focus:border-slate-900 focus:ring-1 focus:ring-slate-900" value={config.interval} onChange={(event) => patch({ interval: event.target.value as DesktopBackupConfig["interval"] })}>
- {(["daily", "weekly", "biweekly", "monthly"] as const).map((key) => <option key={key} value={key}>{t(`desktopBackup.intervals.${key}`)}</option>)}
+ {(config.interval === "daily" || config.interval === "biweekly") ? <option value={config.interval} disabled>{t(`desktopBackup.intervals.${config.interval}`)}</option> : null}
+ {(["weekly", "monthly"] as const).map((key) => <option key={key} value={key}>{t(`desktopBackup.intervals.${key}`)}</option>)}
</select>
</label>
<label className="grid gap-1.5 text-xs font-medium text-slate-700">
diff --git a/docs/desktop-scheduled-backup-design.md b/docs/desktop-scheduled-backup-design.md
index ed89fa8c..a939a5cd 100644
--- a/docs/desktop-scheduled-backup-design.md
+++ b/docs/desktop-scheduled-backup-design.md
@@ -29,7 +29,7 @@ Desktop Settings → Data and backup uses one “Backup and restore” card inst
| Setting | Initial behavior |
| --- | --- |
| Automatic backups | Initially off; enabling a valid configuration schedules the first run |
-| Frequency | Daily, weekly, every two weeks, or monthly; weekly by default |
+| Frequency | Weekly or monthly; weekly by default. Existing daily and biweekly settings remain valid and are displayed as a disabled option until changed |
| Destination | `EdgeEver Backups` under the OS Documents directory; change through the native directory picker |
| Keep recent | 1, 3, or 5 archives; 1 by default. Existing 10- and 20-archive settings remain valid and are displayed as a disabled option until changed |
| Backup encryption | Optional and initially off; enabling it requires entering and confirming a separate backup password |
diff --git a/docs/desktop-scheduled-backup-design.zh-CN.md b/docs/desktop-scheduled-backup-design.zh-CN.md
index c6273768..d2dd5ecc 100644
--- a/docs/desktop-scheduled-backup-design.zh-CN.md
+++ b/docs/desktop-scheduled-backup-design.zh-CN.md
@@ -29,7 +29,7 @@
| 配置 | 首版行为 |
| --- | --- |
| 自动备份 | 首次关闭;用户开启且配置有效后安排首次备份 |
-| 频率 | 每天、每周、每两周、每月;默认每周 |
+| 频率 | 每周、每月;默认每周。已有每天、每两周配置继续有效,修改前以禁用选项显示 |
| 保存目录 | 系统 Documents 目录下的 `EdgeEver Backups`,允许通过原生目录选择器更改 |
| 保留最近 | 1、3、5;默认 1 份。已有的 10、20 份配置继续有效,修改前以不可选选项显示 |
| 备份加密 | 可选,首次关闭;开启时输入并确认独立的备份密码 |
diff --git a/tests/browser/desktop-backup-import.browser.tsx b/tests/browser/desktop-backup-import.browser.tsx
index 9e76be35..dc1396ff 100644
--- a/tests/browser/desktop-backup-import.browser.tsx
+++ b/tests/browser/desktop-backup-import.browser.tsx
@@ -22,6 +22,8 @@ const status: DesktopBackupStatus = {
],
};
const params = new URLSearchParams(location.search);
+const legacyInterval = params.get("legacy-interval");
+if (legacyInterval === "daily" || legacyInterval === "biweekly") status.config.interval = legacyInterval;
if (params.has("encrypted")) { status.config.encrypted = true; status.passwordSet = true; }
if (params.has("no-secure-storage")) status.secureStorageAvailable = false;
const calls: Array<{ action: string; input?: unknown }> = [];