Skip to content

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

refactor(settings): refine backup and migration layout, copy, and dev preview

tianma-if7cf1e36792be
diff --git a/apps/web/src/components/SettingsPane.tsx b/apps/web/src/components/SettingsPane.tsx
index b1c1e5ae..d4f086ed 100644
--- a/apps/web/src/components/SettingsPane.tsx
+++ b/apps/web/src/components/SettingsPane.tsx
@@ -17,7 +17,7 @@ import {
Users,
Wrench,
} from "lucide-react";
-import { useSyncExternalStore, type ReactNode } from "react";
+import { useState, useSyncExternalStore, type ReactNode } from "react";
import { isDesktopViewport } from "@/lib/workspace-shell";
import { useTranslation } from "react-i18next";
import { useSearchParams } from "react-router";
@@ -125,6 +125,7 @@ export const SettingsPane = ({
const selectTab = (tab: TabKey | null) => setSearchParams(tab ? { tab } : {}, { replace: true });
const { unseen: deployedUpdateUnseen } = useDeployedUpdateNotice();
const canClearLocalData = Boolean(window.edgeeverDesktop?.canClearLocalData);
+ const [devShowWebExport, setDevShowWebExport] = useState(false);
const tabItems: TabItem[] = [
{
@@ -275,7 +276,23 @@ export const SettingsPane = ({
case "data":
return (
<SettingsGroup>
- {window.edgeeverDesktop?.backup ? <DesktopScheduledBackupCard /> : <DataExportCard refreshWorkspaceAfterImport={refreshWorkspaceAfterImport} />}
+ {import.meta.env.DEV && (
+ <div className="flex items-center justify-between rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-1.5 text-xs text-amber-700 dark:text-amber-300">
+ <span>Dev 预览模式:{devShowWebExport ? "当前为 Web 端原生导出卡片" : "当前为桌面端备份与恢复预览"}</span>
+ <button
+ type="button"
+ className="font-medium underline hover:text-amber-900 dark:hover:text-amber-100"
+ onClick={() => setDevShowWebExport((prev) => !prev)}
+ >
+ {devShowWebExport ? "切换到桌面端预览" : "切换到 Web 原生导出"}
+ </button>
+ </div>
+ )}
+ {window.edgeeverDesktop?.backup || (import.meta.env.DEV && !devShowWebExport) ? (
+ <DesktopScheduledBackupCard />
+ ) : (
+ <DataExportCard refreshWorkspaceAfterImport={refreshWorkspaceAfterImport} />
+ )}
<ThirdPartyImportCard controller={noteImport} onOpenMemo={onOpenMemo} />
</SettingsGroup>
);
diff --git a/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx b/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx
index e24cf947..8f51bbb6 100644
--- a/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx
+++ b/apps/web/src/components/settings/DesktopScheduledBackupCard.tsx
@@ -113,15 +113,70 @@ export const DesktopScheduledBackupCard = () => {
<DesktopBackupImport disabled={saving || runOpen || Boolean(deleting)}>{(restore, restoreDisabled) => <>
<div className="flex flex-wrap gap-2">
{busy ? <Button type="button" size="sm" variant="outline" disabled={saving} onClick={() => void attempt(() => bridge.backup("cancel", { backupSetId: status.backupSetId }))}>{t("common.cancel")}</Button> : <Button type="button" size="sm" className="bg-foreground text-background hover:bg-foreground/90" disabled={saving || (!pending && dirty)} onClick={startBackup}>{t(pending ? "desktopBackup.verifyPublication" : "desktopBackup.run")}</Button>}
- <Button type="button" size="sm" variant="outline" disabled={restoreDisabled} onClick={() => restore()}><Upload className="h-4 w-4" />{t("desktopBackup.importButton")}</Button>
- <Button type="button" size="sm" variant="ghost" disabled={saving} onClick={() => void attempt(() => bridge.backup("open-folder", { backupSetId: status.backupSetId }))}><FolderOpen className="h-4 w-4" />{t("desktopBackup.openFolder")}</Button>
+ <Button type="button" size="sm" variant="outline" disabled={restoreDisabled} onClick={() => restore()}><Upload className="mr-1.5 h-4 w-4" />{t("desktopBackup.importButton")}</Button>
+ <Button type="button" size="sm" variant="outline" disabled={saving} onClick={() => void attempt(() => bridge.backup("open-folder", { backupSetId: status.backupSetId }))}><FolderOpen className="mr-1.5 h-4 w-4" />{t("desktopBackup.openFolder")}</Button>
</div>
- <div className="grid gap-1.5 rounded-md bg-muted/40 p-3 text-xs" aria-live="polite" data-backup-status>
- <p className="font-medium text-slate-800">{t("desktopBackup.lastSuccess", { time: date(status.lastSuccessAt) })}</p>
- {lastBackup ? <p className="text-slate-700">{t("desktopBackup.lastBackupSize", { size: formatBytes(lastBackup.size) })}</p> : null}
- {status.task ? <p className="flex items-center gap-2"><Loader2 className="h-3.5 w-3.5 animate-spin" />{t(`desktopBackup.phases.${status.task.phase}`)}{status.task.total > 0 ? ` ${status.task.completed} / ${status.task.total}` : ""}</p> : status.lastCheck ? <p className="text-slate-700">{t(`desktopBackup.checkResults.${status.lastCheck.result}`)}</p> : null}
- <p className="text-muted-foreground">{t("desktopBackup.lastCheck", { time: status.lastCheck ? date(status.lastCheck.at) : t("desktopBackup.notChecked") })}</p>
- <p className={dirty ? "text-amber-700" : "text-muted-foreground"}>{dirty ? t(saving ? "desktopBackup.savingSettings" : "desktopBackup.completePassword") : status.config.enabled ? t("desktopBackup.nextDue", { time: status.nextDueAt ? date(status.nextDueAt) : t("desktopBackup.whenReady") }) : t("desktopBackup.autoOff")}</p>
+ <div className="grid gap-2 rounded-lg border border-border/60 bg-muted/30 p-3.5 text-xs" aria-live="polite" data-backup-status>
+ <div className="flex flex-wrap items-center justify-between gap-2 border-b border-border/40 pb-2">
+ <div className="flex items-center gap-2 font-medium text-slate-800 dark:text-slate-200">
+ {status.task ? (
+ <>
+ <Loader2 className="h-3.5 w-3.5 animate-spin text-primary" />
+ <span>{t(`desktopBackup.phases.${status.task.phase}`)}{status.task.total > 0 ? ` (${status.task.completed} / ${status.task.total})` : ""}</span>
+ </>
+ ) : status.config.enabled ? (
+ <>
+ <span className="relative flex h-2 w-2">
+ <span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75" />
+ <span className="relative inline-flex h-2 w-2 rounded-full bg-emerald-600" />
+ </span>
+ <span>{t("desktopBackup.autoRunning")}</span>
+ <span className="font-normal text-muted-foreground">({t(`desktopBackup.intervals.${config.interval}`)} · {t("desktopBackup.copies", { count: config.retention })})</span>
+ </>
+ ) : (
+ <>
+ <span className="inline-flex h-2 w-2 rounded-full bg-slate-400" />
+ <span>{t("desktopBackup.autoOff")}</span>
+ </>
+ )}
+ </div>
+ {status.lastCheck?.result === "success" ? (
+ <span className="rounded bg-emerald-100/80 px-1.5 py-0.5 text-[11px] font-normal text-emerald-800 dark:bg-emerald-950/60 dark:text-emerald-300">
+ {t("desktopBackup.statusNormal")}
+ </span>
+ ) : null}
+ </div>
+
+ <div className="grid gap-1">
+ <div className="flex flex-wrap items-center gap-x-2 gap-y-0.5 text-slate-700 dark:text-slate-300">
+ <span>{t("desktopBackup.lastSuccess", { time: date(status.lastSuccessAt) })}</span>
+ {lastBackup ? (
+ <>
+ <span className="text-muted-foreground">·</span>
+ <span className="tabular-nums font-medium">{formatBytes(lastBackup.size)}</span>
+ <span className="text-muted-foreground">·</span>
+ <span className="text-muted-foreground">{t(lastBackup.encrypted ? "desktopBackup.encrypted" : "desktopBackup.plain")}</span>
+ </>
+ ) : status.lastSuccessAt ? (
+ <span className="text-muted-foreground">({t("desktopBackup.historyCleanedOrMoved")})</span>
+ ) : null}
+ </div>
+
+ <div className="flex flex-wrap items-center gap-x-3 gap-y-0.5 text-muted-foreground">
+ {status.config.enabled ? (
+ <span>{t("desktopBackup.nextDue", { time: status.nextDueAt ? date(status.nextDueAt) : t("desktopBackup.whenReady") })}</span>
+ ) : null}
+ {status.lastCheck && status.lastCheck.result !== "success" ? (
+ <span className="text-amber-700">{t(`desktopBackup.checkResults.${status.lastCheck.result}`)}</span>
+ ) : null}
+ </div>
+
+ <p className="truncate font-mono text-[11px] text-muted-foreground">
+ {config.directory}/{status.backupSetId}
+ </p>
+ </div>
+
+ {dirty ? <p className="text-amber-700">{t(saving ? "desktopBackup.savingSettings" : "desktopBackup.completePassword")}</p> : null}
{error || status.error ? <p className="break-words text-destructive" role="alert">{error ?? describeDesktopBackupError(t, status.error)}</p> : null}
{status.warning ? <p className="text-amber-700">{describeDesktopBackupError(t, status.warning)}</p> : null}
<DesktopOffsiteStatusLines status={status} disabled={saving} onUpload={() => void attempt(() => bridge.backup("offsite-upload", { backupSetId: status.backupSetId }))} />
@@ -175,11 +230,19 @@ export const DesktopScheduledBackupCard = () => {
</details>
<DesktopOffsiteSettings status={status} disabled={saving} />
<section className="grid gap-2.5 border-t pt-3" aria-label={t("desktopBackup.history", { count: status.history.length })}>
- <h3 className="text-xs font-medium text-slate-700">{t("desktopBackup.history", { count: status.history.length })}</h3>
- {status.history.length ? <ul className="divide-y divide-slate-100">{[...status.history].reverse().map((item) => <li key={item.name} className="flex flex-wrap items-center justify-between gap-x-3 gap-y-2 py-2.5 first:pt-0 last:pb-0">
- <div className="min-w-0 flex-1 basis-60 space-y-0.5"><p className="break-all font-mono text-xs text-slate-800">{item.name}</p><p className="text-xs text-muted-foreground">{date(item.completedAt)} · <span className="whitespace-nowrap tabular-nums">{formatBytes(item.size)}</span> · {t(item.encrypted ? "desktopBackup.encrypted" : "desktopBackup.plain")}</p></div>
- <div className="flex shrink-0 gap-1"><Button size="sm" variant="outline" className="h-7 text-xs font-normal" disabled={restoreDisabled} onClick={() => restore(item.name)}>{t("desktopBackup.restore")}</Button><Button size="sm" variant="ghost" className="h-7 text-xs font-normal text-destructive hover:text-destructive" disabled={busy || saving} onClick={() => { setDeleteError(null); setDeleting(item.name); }}>{t("common.delete")}</Button></div>
- </li>)}</ul> : <p className="text-xs text-muted-foreground">{t("desktopBackup.emptyHistory")}</p>}
+ <div className="flex items-center justify-between">
+ <h3 className="text-xs font-medium text-slate-700 dark:text-slate-300">{t("desktopBackup.history", { count: status.history.length })}</h3>
+ </div>
+ {status.history.length ? <ul className="divide-y divide-border/40 rounded-md border border-border/40 bg-muted/10 px-3">{[...status.history].reverse().map((item) => <li key={item.name} className="flex flex-wrap items-center justify-between gap-x-3 gap-y-2 py-2.5">
+ <div className="min-w-0 flex-1 basis-60 space-y-1">
+ <p className="break-all font-mono text-xs font-medium text-slate-800 dark:text-slate-200">{item.name}</p>
+ <p className="text-xs text-muted-foreground">{date(item.completedAt)} · <span className="whitespace-nowrap tabular-nums font-mono font-medium">{formatBytes(item.size)}</span> · {t(item.encrypted ? "desktopBackup.encrypted" : "desktopBackup.plain")}</p>
+ </div>
+ <div className="flex shrink-0 gap-1.5">
+ <Button size="sm" variant="outline" className="h-7 text-xs font-normal" disabled={restoreDisabled} onClick={() => restore(item.name)}>{t("desktopBackup.restore")}</Button>
+ <Button size="sm" variant="ghost" className="h-7 text-xs font-normal text-destructive hover:text-destructive" disabled={busy || saving} onClick={() => { setDeleteError(null); setDeleting(item.name); }}>{t("common.delete")}</Button>
+ </div>
+ </li>)}</ul> : <div className="rounded-md border border-dashed border-border/60 py-4 text-center"><p className="text-xs text-muted-foreground">{t("desktopBackup.emptyHistory")}</p></div>}
</section>
</>}</DesktopBackupImport>
</CardContent>
diff --git a/apps/web/src/components/settings/ThirdPartyImportCard.tsx b/apps/web/src/components/settings/ThirdPartyImportCard.tsx
index a2632a0a..232fdd8d 100644
--- a/apps/web/src/components/settings/ThirdPartyImportCard.tsx
+++ b/apps/web/src/components/settings/ThirdPartyImportCard.tsx
@@ -14,9 +14,14 @@ export const ThirdPartyImportCard = ({ controller, onOpenMemo }: { controller: N
return <Card className="w-full min-w-0 shadow-none">
<CardHeader className={SETTINGS_CARD_HEADER_CLASSNAME}>
<div className="flex flex-wrap items-center justify-between gap-3">
- <div className="min-w-0 space-y-1">
+ <div className="min-w-0 space-y-1.5">
<CardTitle className={SETTINGS_CARD_TITLE_CLASSNAME}><Upload className={SETTINGS_CARD_ICON_CLASSNAME} />{t("noteImport.title")}</CardTitle>
<CardDescription className={SETTINGS_CARD_DESCRIPTION_CLASSNAME}>{t("noteImport.description")}</CardDescription>
+ <div className="flex flex-wrap gap-1.5 pt-0.5 text-[11px] text-muted-foreground">
+ <span className="rounded bg-muted px-2 py-0.5 font-mono">Evernote (.enex)</span>
+ <span className="rounded bg-muted px-2 py-0.5 font-mono">Obsidian</span>
+ <span className="rounded bg-muted px-2 py-0.5 font-mono">Joplin (.jex)</span>
+ </div>
</div>
<Button size="sm" variant="outline" onClick={controller.open}>{t(running ? "noteImport.viewProgress" : "noteImport.open")}</Button>
</div>
diff --git a/apps/web/src/lib/desktop-backup.ts b/apps/web/src/lib/desktop-backup.ts
index ff63be73..5696ed42 100644
--- a/apps/web/src/lib/desktop-backup.ts
+++ b/apps/web/src/lib/desktop-backup.ts
@@ -1,7 +1,157 @@
import { useEffect, useState } from "react";
-import type { DesktopBackupStatus, DesktopBackupError } from "@edgeever/shared";
+import type { DesktopBackupStatus, DesktopBackupError, DesktopBackupConfig, DesktopOffsiteConfig } from "@edgeever/shared";
import type { TFunction } from "i18next";
+const createDevMockBackupState = (): DesktopBackupStatus => {
+ const now = new Date();
+ const oneHourAgo = new Date(now.getTime() - 3600000).toISOString();
+ const nextMonth = new Date(now.getTime() + 86400000 * 30).toISOString();
+ return {
+ blocked: false,
+ config: {
+ enabled: true,
+ interval: "weekly",
+ retention: 5,
+ directory: "~/Documents/EdgeEver Backups",
+ encrypted: false,
+ },
+ backupSetId: "dev_workspace_preview",
+ actualDirectory: "~/Documents/EdgeEver Backups/dev_workspace_preview",
+ passwordSet: false,
+ secureStorageAvailable: true,
+ lastCheck: { at: oneHourAgo, result: "success" },
+ lastAttemptAt: oneHourAgo,
+ lastSuccessAt: oneHourAgo,
+ lastRestoreAt: null,
+ nextDueAt: nextMonth,
+ pendingPublication: null,
+ target: { baseUrl: "http://localhost:5173", accountId: "dev-user" },
+ error: null,
+ warning: null,
+ importError: null,
+ importWarning: null,
+ history: [
+ {
+ name: "EdgeEver-2026-11-02_130344.zip",
+ directory: "~/Documents/EdgeEver Backups/dev_workspace_preview",
+ completedAt: oneHourAgo,
+ size: 134680210,
+ encrypted: false,
+ },
+ {
+ name: "EdgeEver-2026-10-26_091211.zip",
+ directory: "~/Documents/EdgeEver Backups/dev_workspace_preview",
+ completedAt: new Date(now.getTime() - 86400000 * 7).toISOString(),
+ size: 125120890,
+ encrypted: false,
+ },
+ ],
+ task: null,
+ offsite: {
+ config: { enabled: false, url: "", username: "", folder: "/EdgeEver/backups" },
+ passwordSet: false,
+ secureStorageAvailable: true,
+ lastAttemptAt: null,
+ lastSuccessAt: null,
+ lastUploaded: null,
+ error: null,
+ warning: null,
+ task: null,
+ },
+ };
+};
+
+if (import.meta.env.DEV && typeof window !== "undefined" && !window.edgeeverDesktop?.backup) {
+ let devStatus = createDevMockBackupState();
+ const listeners = new Set<(status: DesktopBackupStatus) => void>();
+ const broadcast = () => {
+ listeners.forEach((listener) => listener(devStatus));
+ };
+
+ const devBridge: Pick<EdgeEverDesktopBridge, "backup" | "onBackupStatus"> = {
+ onBackupStatus(listener) {
+ listeners.add(listener);
+ return () => listeners.delete(listener);
+ },
+ async backup(action, payload) {
+ switch (action) {
+ case "status":
+ return devStatus as any;
+ case "save": {
+ const input = payload as { config: DesktopBackupConfig; password?: string };
+ devStatus = {
+ ...devStatus,
+ config: input.config,
+ passwordSet: Boolean(input.password || devStatus.passwordSet),
+ };
+ broadcast();
+ return devStatus as any;
+ }
+ case "choose-directory":
+ return "~/Documents/EdgeEver Backups" as any;
+ case "open-folder":
+ console.info("[Dev Preview] 打开备份目录:", devStatus.actualDirectory);
+ return true as any;
+ case "run": {
+ const newName = `EdgeEver-${new Date().toISOString().slice(0, 10)}_${Date.now().toString().slice(-6)}.zip`;
+ devStatus = {
+ ...devStatus,
+ lastSuccessAt: new Date().toISOString(),
+ lastCheck: { at: new Date().toISOString(), result: "success" },
+ history: [
+ {
+ name: newName,
+ directory: devStatus.actualDirectory,
+ completedAt: new Date().toISOString(),
+ size: 138900120,
+ encrypted: devStatus.config.encrypted,
+ },
+ ...devStatus.history,
+ ],
+ };
+ broadcast();
+ return devStatus as any;
+ }
+ case "delete-history": {
+ const input = payload as { name: string };
+ devStatus = {
+ ...devStatus,
+ history: devStatus.history.filter((item) => item.name !== input.name),
+ };
+ broadcast();
+ return devStatus as any;
+ }
+ case "cancel":
+ devStatus = { ...devStatus, task: null };
+ broadcast();
+ return devStatus as any;
+ case "offsite-save": {
+ const input = payload as { config: DesktopOffsiteConfig; password?: string };
+ devStatus = {
+ ...devStatus,
+ offsite: devStatus.offsite ? {
+ ...devStatus.offsite,
+ config: input.config,
+ passwordSet: Boolean(input.password || devStatus.offsite.passwordSet),
+ } : null,
+ };
+ broadcast();
+ return devStatus as any;
+ }
+ case "offsite-test":
+ return { ok: true } as any;
+ default:
+ return devStatus as any;
+ }
+ },
+ };
+
+ window.edgeeverDesktop = {
+ ...(window.edgeeverDesktop ?? ({} as any)),
+ ...devBridge,
+ };
+}
+
export const useDesktopBackup = () => {
const [status, setStatus] = useState<DesktopBackupStatus | null>(null);
const bridge = window.edgeeverDesktop;
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index 0aa02891..ddbf154f 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -1335,7 +1335,7 @@ export const enUS = {
ai: "Models and agents",
speech: "Audio/video transcription",
mcp: "API / MCP",
- data: "Import & Export",
+ data: "Backup & Migration",
advanced: "Advanced",
account: "Login Settings",
},
@@ -2115,8 +2115,8 @@ export const enUS = {
privacyNotice: "GitHub Issues are public. Do not include passwords, tokens, instance URLs, or private note content.",
},
desktopBackup: {
- title: "Backup and restore",
- scope: "Back up synced notes and attachments to a local folder.",
+ title: "Backup & Restore",
+ scope: "Packages notes and attachments into standard ZIP archives. Unencrypted backups contain readable Markdown and media that can be inspected directly.",
enable: "Enable automatic backups",
directory: "Backup folder",
choose: "Choose…",
@@ -2141,7 +2141,7 @@ export const enUS = {
verifyPassword: "Enter the original password for {{name}}. It will only be used for this verification.",
partWarning: "An unfinished backup file could not be removed. Check the backup directory permissions and try again.",
run: "Back up now",
- openFolder: "Open folder",
+ openFolder: "Open backup folder",
never: "Not yet",
lastSuccess: "Last successful backup: {{time}}",
lastBackupSize: "Latest backup size: {{size}}",
@@ -2149,10 +2149,10 @@ export const enUS = {
whenReady: "When the app is ready",
stagingWarning: "Private temporary files could not be removed. Check the app data folder permissions and restart.",
cleanupWarning: "Local backup completed, but some older backups could not be removed.",
- history: "Local backups ({{count}})",
- encrypted: "Encrypted",
+ history: "Local snapshots ({{count}})",
+ encrypted: "Encrypted (ENC)",
oncePassword: "This password is used for one backup and is not saved.",
- importButton: "Restore from file",
+ importButton: "Restore from file…",
decryptTitle: "Unlock encrypted backup",
checkFile: "Unlock and check",
confirmRestore: "Confirm restore",
@@ -2168,10 +2168,13 @@ export const enUS = {
restoreRetry: "Your original file is unchanged. If some batches were restored, restoring again will retry with the same IDs.",
fileName: "File name",
savedPasswordPlaceholder: "Leave blank to use the saved password",
- plain: "Not encrypted",
- restore: "Restore",
- emptyHistory: "No local backups yet.",
- settings: "Backup settings",
+ plain: "Unencrypted (Markdown ZIP)",
+ restore: "Restore this version",
+ emptyHistory: "No local backup snapshots yet.",
+ historyCleanedOrMoved: "Historical snapshots have been pruned by retention policy or moved.",
+ autoRunning: "Scheduled backup running",
+ statusNormal: "Healthy",
+ settings: "Backup & encryption settings",
lastCheck: "Latest check: {{time}}",
notChecked: "Not checked yet",
autoOff: "Automatic backup is off",
@@ -2182,7 +2185,7 @@ export const enUS = {
deleteConfirm: "Delete permanently",
checkResults: {
running: "Checking backup…",
- success: "Backup complete",
+ success: "Latest check completed successfully",
unchanged: "Content unchanged. Your existing backup is up to date.",
failed: "The latest backup check failed",
cancelled: "The latest backup was cancelled",
diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.ts
index 8b20b208..e2409168 100644
--- a/packages/shared/src/i18n/ja.ts
+++ b/packages/shared/src/i18n/ja.ts
@@ -1343,7 +1343,7 @@ export const ja = {
ai: "モデルとエージェント",
speech: "音声・動画の文字起こし",
mcp: "API / MCP",
- data: "インポートとエクスポート",
+ data: "バックアップと移行",
advanced: "詳細",
account: "ログイン設定",
},
@@ -2179,6 +2179,9 @@ export const ja = {
plain: "暗号化なし",
restore: "復元",
emptyHistory: "ローカルバックアップはまだありません。",
+ historyCleanedOrMoved: "保持ポリシーにより古いスナップショットが整理されたか、ファイルが移動されました。",
+ autoRunning: "自動バックアップが有効です",
+ statusNormal: "正常",
settings: "バックアップ設定",
lastCheck: "最終確認:{{time}}",
notChecked: "未確認",
diff --git a/packages/shared/src/i18n/note-import.ts b/packages/shared/src/i18n/note-import.ts
index f8f45b5b..e87ea6ee 100644
--- a/packages/shared/src/i18n/note-import.ts
+++ b/packages/shared/src/i18n/note-import.ts
@@ -1,7 +1,7 @@
export const noteImportEnUS = {
- "title": "Import from other apps",
- "description": "Move notes and attachments from Evernote, Obsidian or Joplin.",
- "open": "Import notes",
+ "title": "Migrate from other apps",
+ "description": "Move notes and attachments from Evernote, Obsidian, or Joplin, preserving folders and attachments.",
+ "open": "Start migration",
"viewProgress": "View import progress",
"source": "Source app",
"files": "Choose files",
@@ -71,9 +71,9 @@ export const noteImportEnUS = {
} as const;
export const noteImportZhCN = {
- "title": "从其他应用导入",
- "description": "迁移 Evernote、Obsidian 或 Joplin 的笔记与附件。",
- "open": "导入笔记",
+ "title": "从其他应用迁移",
+ "description": "迁移 Evernote、Obsidian 或 Joplin 的笔记与附件,保留目录结构与媒体资源。",
+ "open": "开始迁移",
"viewProgress": "查看导入进度",
"source": "来源应用",
"files": "选择文件",
@@ -143,9 +143,9 @@ export const noteImportZhCN = {
} as const;
export const noteImportJa = {
- "title": "他のアプリからインポート",
+ "title": "他のアプリから移行",
"description": "Evernote・Obsidian・Joplin のノートと添付ファイルを移行します。",
- "open": "ノートをインポート",
+ "open": "移行を開始",
"viewProgress": "進捗を表示",
"source": "移行元のアプリ",
"files": "ファイルを選択",
@@ -215,9 +215,9 @@ export const noteImportJa = {
} as const;
export const noteImportPl = {
- "title": "Importuj z innych aplikacji",
+ "title": "Migracja z innych aplikacji",
"description": "Przenieś notatki i załączniki z Evernote, Obsidian lub Joplin.",
- "open": "Importuj notatki",
+ "open": "Rozpocznij migrację",
"viewProgress": "Pokaż postęp importu",
"source": "Aplikacja źródłowa",
"files": "Wybierz pliki",
@@ -287,9 +287,9 @@ export const noteImportPl = {
} as const;
export const noteImportRu = {
- "title": "Импорт из других приложений",
+ "title": "Перенос из других приложений",
"description": "Перенесите заметки и вложения из Evernote, Obsidian или Joplin.",
- "open": "Импортировать заметки",
+ "open": "Начать перенос",
"viewProgress": "Показать ход импорта",
"source": "Исходное приложение",
"files": "Выбрать файлы",
diff --git a/packages/shared/src/i18n/pl.ts b/packages/shared/src/i18n/pl.ts
index 8e0ac0ab..041d0159 100644
--- a/packages/shared/src/i18n/pl.ts
+++ b/packages/shared/src/i18n/pl.ts
@@ -1343,7 +1343,7 @@ export const pl = {
ai: "Modele i agenci",
speech: "Transkrypcja audio i wideo",
mcp: "API / MCP",
- data: "Import i eksport",
+ data: "Kopia zapasowa i migracja",
advanced: "Zaawansowane",
account: "Ustawienia logowania",
},
@@ -2179,6 +2179,9 @@ export const pl = {
plain: "Bez szyfrowania",
restore: "Przywróć",
emptyHistory: "Brak lokalnych kopii zapasowych.",
+ historyCleanedOrMoved: "Wcześniejsze migawki zostały usunięte zgodnie z zasadami przechowywania lub przeniesione.",
+ autoRunning: "Automatyczne kopie zapasowe w toku",
+ statusNormal: "W normie",
settings: "Ustawienia kopii zapasowych",
lastCheck: "Ostatnie sprawdzenie: {{time}}",
notChecked: "Jeszcze nie sprawdzono",
diff --git a/packages/shared/src/i18n/ru.ts b/packages/shared/src/i18n/ru.ts
index 03ae6e59..84b13980 100644
--- a/packages/shared/src/i18n/ru.ts
+++ b/packages/shared/src/i18n/ru.ts
@@ -1354,7 +1354,7 @@ export const ru = {
ai: "ИИ и интеграции",
speech: "Расшифровка аудио и видео",
mcp: "API / MCP",
- data: "Импорт и экспорт",
+ data: "Резервное копирование и перенос",
advanced: "Дополнительно",
account: "Вход",
},
@@ -2190,6 +2190,9 @@ export const ru = {
plain: "Не зашифрована",
restore: "Восстановить",
emptyHistory: "Локальных копий пока нет.",
+ historyCleanedOrMoved: "Предыдущие снимки были удалены согласно правилам хранения или перемещены.",
+ autoRunning: "Автоматическое копирование включено",
+ statusNormal: "В норме",
settings: "Настройки резервного копирования",
lastCheck: "Последняя проверка: {{time}}",
notChecked: "Проверок ещё не было",
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index 3320ef7d..6e6eca0c 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -1354,7 +1354,7 @@ export const zhCN = {
ai: "模型与代理",
speech: "音视频转写",
mcp: "API / MCP",
- data: "导入导出",
+ data: "备份与迁移",
advanced: "高级设置",
account: "登录设置",
},
@@ -2134,8 +2134,8 @@ export const zhCN = {
privacyNotice: "GitHub Issue 公开可见,请勿提交密码、Token、实例地址或私人笔记内容。",
},
desktopBackup: {
- title: "备份与恢复",
- scope: "将已同步的笔记和附件备份到本地文件夹。",
+ title: "数据备份与恢复",
+ scope: "将笔记与附件打包为标准 ZIP 归档。未加密时为通用 Markdown 与原图,可直接解压查阅。",
enable: "开启自动备份",
directory: "备份目录",
choose: "选择…",
@@ -2160,7 +2160,7 @@ export const zhCN = {
verifyPassword: "请输入 {{name}} 使用的原密码,仅用于本次核验。",
partWarning: "未完成的备份文件尚未清理。请检查备份目录权限后重试。",
run: "立即备份",
- openFolder: "打开文件夹",
+ openFolder: "打开备份目录",
never: "尚未完成",
lastSuccess: "上次成功备份:{{time}}",
lastBackupSize: "最近备份大小:{{size}}",
@@ -2168,10 +2168,10 @@ export const zhCN = {
whenReady: "应用就绪后",
stagingWarning: "私有临时文件清理失败。请检查应用数据目录权限并重启。",
cleanupWarning: "本地备份已完成,但部分旧备份清理失败。",
- history: "本地备份({{count}})",
- encrypted: "已加密",
+ history: "本地快照({{count}})",
+ encrypted: "已加密 (ENC)",
oncePassword: "密码仅用于本次备份,不会保存。",
- importButton: "从文件恢复",
+ importButton: "从文件还原…",
decryptTitle: "解锁加密备份",
checkFile: "解锁并检查",
confirmRestore: "确认恢复",
@@ -2187,10 +2187,13 @@ export const zhCN = {
restoreRetry: "原备份文件未修改。如果部分批次已恢复,再次恢复会按相同 ID 重试。",
fileName: "文件名",
savedPasswordPlaceholder: "留空使用已保存的密码",
- plain: "未加密",
- restore: "恢复",
- emptyHistory: "还没有本地备份。",
- settings: "备份设置",
+ plain: "未加密 (Markdown ZIP)",
+ restore: "恢复此版本",
+ emptyHistory: "暂无本地备份快照。",
+ historyCleanedOrMoved: "历史快照已按保留策略清理,或文件已被移出备份目录。",
+ autoRunning: "自动备份运行中",
+ statusNormal: "状态正常",
+ settings: "备份与加密设置",
lastCheck: "最近检查:{{time}}",
notChecked: "尚未检查",
autoOff: "自动备份已关闭",
@@ -2201,7 +2204,7 @@ export const zhCN = {
deleteConfirm: "永久删除",
checkResults: {
running: "正在检查备份…",
- success: "备份已完成",
+ success: "最近一次检查正常完成",
unchanged: "内容未变化,现有备份仍为最新",
failed: "最近一次备份检查失败",
cancelled: "最近一次备份已取消",
diff --git a/tests/e2e/large-zip-streaming-restore.spec.ts b/tests/e2e/large-zip-streaming-restore.spec.ts
index 712405fe..65cfce65 100644
--- a/tests/e2e/large-zip-streaming-restore.spec.ts
+++ b/tests/e2e/large-zip-streaming-restore.spec.ts
@@ -172,7 +172,7 @@ test("imports a 600 MiB attachment from an EdgeEver ZIP through streaming multip
await page.goto("/");
await page.getByRole("button", { name: "个人中心", exact: true }).click();
await expect(page.getByRole("heading", { name: "我的", exact: true })).toBeVisible();
- await page.getByRole("button", { name: "导入导出", exact: true }).click();
+ await page.getByRole("button", { name: "备份与迁移", exact: true }).click();
await expect(page.getByText("导入与导出", { exact: true })).toBeVisible();
const chooserPromise = page.waitForEvent("filechooser");