Skip to content

Commit f84524e

Browse files
committed
refactor(settings): split Data Transfer into Backup and Import folds
1 parent 5536a61 commit f84524e

32 files changed

Lines changed: 449 additions & 271 deletions

apps/desktop/src/components/views/settings/SettingsDataPage.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { AttachmentsCleanupSection } from './sync/AttachmentsCleanupSection';
2-
import { DataTransferSection } from './sync/DataTransferSection';
2+
import { BackupSection, ImportSection } from './sync/DataTransferSections';
33
import { DiagnosticsSection } from './sync/DiagnosticsSection';
44
import type { SettingsDataPageProps } from './sync/types';
55

66
export function SettingsDataPage(props: SettingsDataPageProps) {
77
return (
88
<div className="space-y-8">
9-
<DataTransferSection {...props} />
9+
<BackupSection {...props} />
10+
<ImportSection {...props} />
1011
<AttachmentsCleanupSection {...props} />
1112
{props.isTauri && <DiagnosticsSection {...props} />}
1213
</div>

apps/desktop/src/components/views/settings/labels.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ const reportedZhHantLabels = {
5252
taskEditorPresentationInlineDesc: '在當前視圖內打開編輯器,適合快速編輯。',
5353
taskEditorPresentationModal: '彈窗',
5454
taskEditorPresentationModalDesc: '在居中的彈窗中打開編輯器,適合專注編輯。',
55-
dataTransfer: '數據傳輸',
56-
dataTransferDesc: '導出完整備份、從備份恢復本地數據,或導入 Todoist、DGT GTD、OmniFocus 與 Mindwtr CSV 導出文件。',
55+
backup: '備份',
56+
backupDesc: '導出完整備份,或從備份文件恢復或合併本地數據。',
57+
importData: '導入數據',
58+
importDataDesc: '導入 Todoist、TickTick、DGT GTD、OmniFocus 與 Mindwtr CSV 導出文件。',
5759
exportBackupDesc: '將當前本地數據保存為 JSON 備份文件。',
5860
restoreBackup: '恢復備份',
5961
restoreBackupDesc: '從 Mindwtr 備份 JSON 文件替換本地數據。',

apps/desktop/src/components/views/settings/labels.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,10 @@ export const SETTINGS_LABEL_KEYS = [
295295
'visible',
296296
'hidden',
297297
'manage',
298-
'dataTransfer',
299-
'dataTransferDesc',
298+
'backup',
299+
'backupDesc',
300+
'importData',
301+
'importDataDesc',
300302
'gettingStartedContentAction',
301303
'gettingStartedContentDesc',
302304
'gettingStartedContentConfirmTitle',

apps/desktop/src/components/views/settings/sync/DataTransferSection.test.tsx

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)