mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 18:41:35 +08:00
refactor(settings): split Data accordion into Import/Export and Cloud Sync
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
|||||||
Save,
|
Save,
|
||||||
FolderSearch,
|
FolderSearch,
|
||||||
Database,
|
Database,
|
||||||
|
Cloud,
|
||||||
ScrollText,
|
ScrollText,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
@@ -323,9 +324,28 @@ export function SettingsPage({
|
|||||||
onExport={exportConfig}
|
onExport={exportConfig}
|
||||||
onClear={clearSelection}
|
onClear={clearSelection}
|
||||||
/>
|
/>
|
||||||
<div className="pt-6">
|
</AccordionContent>
|
||||||
<WebdavSyncSection config={settings?.webdavSync} />
|
</AccordionItem>
|
||||||
|
|
||||||
|
<AccordionItem
|
||||||
|
value="cloudSync"
|
||||||
|
className="rounded-xl glass-card overflow-hidden"
|
||||||
|
>
|
||||||
|
<AccordionTrigger className="px-6 py-4 hover:no-underline hover:bg-muted/50 data-[state=open]:bg-muted/50">
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<Cloud className="h-5 w-5 text-blue-500" />
|
||||||
|
<div className="text-left">
|
||||||
|
<h3 className="text-base font-semibold">
|
||||||
|
{t("settings.advanced.cloudSync.title")}
|
||||||
|
</h3>
|
||||||
|
<p className="text-sm text-muted-foreground font-normal">
|
||||||
|
{t("settings.advanced.cloudSync.description")}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</AccordionTrigger>
|
||||||
|
<AccordionContent className="px-6 pb-6 pt-4 border-t border-border/50">
|
||||||
|
<WebdavSyncSection config={settings?.webdavSync} />
|
||||||
</AccordionContent>
|
</AccordionContent>
|
||||||
</AccordionItem>
|
</AccordionItem>
|
||||||
|
|
||||||
|
|||||||
@@ -219,7 +219,11 @@
|
|||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"title": "Data Management",
|
"title": "Data Management",
|
||||||
"description": "Import/export configurations and backup/restore"
|
"description": "Import/export local configurations and backup/restore"
|
||||||
|
},
|
||||||
|
"cloudSync": {
|
||||||
|
"title": "Cloud Sync",
|
||||||
|
"description": "Sync data across devices via WebDAV"
|
||||||
},
|
},
|
||||||
"rectifier": {
|
"rectifier": {
|
||||||
"title": "Rectifier",
|
"title": "Rectifier",
|
||||||
|
|||||||
@@ -219,7 +219,11 @@
|
|||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"title": "データ管理",
|
"title": "データ管理",
|
||||||
"description": "設定のインポート/エクスポートとバックアップ/復元"
|
"description": "ローカル設定のインポート/エクスポートとバックアップ/復元"
|
||||||
|
},
|
||||||
|
"cloudSync": {
|
||||||
|
"title": "クラウド同期",
|
||||||
|
"description": "WebDAV でデバイス間のデータを同期"
|
||||||
},
|
},
|
||||||
"rectifier": {
|
"rectifier": {
|
||||||
"title": "整流器",
|
"title": "整流器",
|
||||||
|
|||||||
@@ -219,7 +219,11 @@
|
|||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"title": "数据管理",
|
"title": "数据管理",
|
||||||
"description": "导入导出配置与备份恢复"
|
"description": "导入导出本地配置与备份恢复"
|
||||||
|
},
|
||||||
|
"cloudSync": {
|
||||||
|
"title": "云同步",
|
||||||
|
"description": "通过 WebDAV 在多设备间同步数据"
|
||||||
},
|
},
|
||||||
"rectifier": {
|
"rectifier": {
|
||||||
"title": "整流器",
|
"title": "整流器",
|
||||||
|
|||||||
Reference in New Issue
Block a user