mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
refactor(settings): split Data accordion into Import/Export and Cloud Sync
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
Save,
|
||||
FolderSearch,
|
||||
Database,
|
||||
Cloud,
|
||||
ScrollText,
|
||||
} from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
@@ -323,9 +324,28 @@ export function SettingsPage({
|
||||
onExport={exportConfig}
|
||||
onClear={clearSelection}
|
||||
/>
|
||||
<div className="pt-6">
|
||||
<WebdavSyncSection config={settings?.webdavSync} />
|
||||
</AccordionContent>
|
||||
</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>
|
||||
</AccordionTrigger>
|
||||
<AccordionContent className="px-6 pb-6 pt-4 border-t border-border/50">
|
||||
<WebdavSyncSection config={settings?.webdavSync} />
|
||||
</AccordionContent>
|
||||
</AccordionItem>
|
||||
|
||||
|
||||
@@ -219,7 +219,11 @@
|
||||
},
|
||||
"data": {
|
||||
"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": {
|
||||
"title": "Rectifier",
|
||||
|
||||
@@ -219,7 +219,11 @@
|
||||
},
|
||||
"data": {
|
||||
"title": "データ管理",
|
||||
"description": "設定のインポート/エクスポートとバックアップ/復元"
|
||||
"description": "ローカル設定のインポート/エクスポートとバックアップ/復元"
|
||||
},
|
||||
"cloudSync": {
|
||||
"title": "クラウド同期",
|
||||
"description": "WebDAV でデバイス間のデータを同期"
|
||||
},
|
||||
"rectifier": {
|
||||
"title": "整流器",
|
||||
|
||||
@@ -219,7 +219,11 @@
|
||||
},
|
||||
"data": {
|
||||
"title": "数据管理",
|
||||
"description": "导入导出配置与备份恢复"
|
||||
"description": "导入导出本地配置与备份恢复"
|
||||
},
|
||||
"cloudSync": {
|
||||
"title": "云同步",
|
||||
"description": "通过 WebDAV 在多设备间同步数据"
|
||||
},
|
||||
"rectifier": {
|
||||
"title": "整流器",
|
||||
|
||||
Reference in New Issue
Block a user