Feature(custom): optimize UI of config sync panel and dialog

This commit is contained in:
Kuingsmile
2025-12-31 11:47:42 +08:00
parent 07c4bd75a9
commit edff735328
5 changed files with 655 additions and 146 deletions

View File

@@ -683,8 +683,10 @@
"sync": {
"allConfig": "All Configuration",
"commonConfig": "Common Configuration",
"configureSync": "Platform Config",
"downloadSettings": "Download Settings",
"fileManagement": "File Management",
"fileManagementDesc": "Access and manage configuration files",
"galleryDB": "Gallery Database Sync",
"gitea": {
"branch": "Branch Name",
@@ -706,25 +708,29 @@
"username": "GitHub Username"
},
"manageConfig": "Manage Configuration",
"migrateDesc": "Import configuration and gallery data from PicGo",
"migrateFromPicGo": "Migrate from PicGo",
"mirgrateContent": "You are about to import configuration files and albums from PicGo, which will overwrite the current configuration files and albums. Do you want to continue?",
"mirgrateFailed": "Import Failed",
"mirgrateSuccess": "Import Successful, Please Restart PicList to Take Effect",
"mirgrateTitle": "Notification",
"notConfigured": "Not configured",
"openConfigFile": "Open Configuration File",
"openConfigFileDir": "Open Configuration File Directory",
"selectType": "Please select sync type",
"syncConfigNote": "The files to be synced are configuration files",
"selectType": "Please select sync platform",
"syncActions": "Sync Actions",
"syncConfigProxy": "Proxy",
"syncConfiguration": "Sync Configuration",
"syncConfiguration": "Sync Platform",
"syncEndpointConfig": "Endpoint Configuration",
"syncResult": { "failed": "Sync Failed", "success": "Sync Successful" },
"title": "Sync",
"upDownloadDesc": "Sync configuration files and gallery data to cloud",
"upDownloadSettings": "Sync Config & Gallery",
"uploadSettings": "Upload Settings",
"webdav": {
"authType": "WebDAV Auth Type",
"enableSSL": "Enable SSL/TLS",
"enableSSLDesc": "Use secure connection (recommended)",
"password": "WebDAV Password",
"savePath": "WebDAV Save Path",
"username": "WebDAV Username"

View File

@@ -683,8 +683,10 @@
"sync": {
"allConfig": "所有配置",
"commonConfig": "通用配置",
"configureSync": "平台设置",
"downloadSettings": "下载配置",
"fileManagement": "文件管理",
"fileManagementDesc": "访问和管理配置文件",
"galleryDB": "相册数据库同步",
"gitea": { "branch": "分支名", "repo": "仓库名", "token": "访问令牌", "username": "用户名" },
"giteaHost": "Gitea 地址",
@@ -701,25 +703,29 @@
"username": "GitHub 用户名"
},
"manageConfig": "管理配置",
"migrateDesc": "从 PicGo 导入配置和相册数据",
"migrateFromPicGo": "从PicGo迁移",
"mirgrateContent": "即将导入PicGo的配置文件和相册, 这将覆盖当前的配置文件和相册, 是否继续?",
"mirgrateFailed": "导入失败",
"mirgrateSuccess": "导入成功, 请重启PicList生效",
"mirgrateTitle": "通知",
"notConfigured": "未配置",
"openConfigFile": "打开配置文件",
"openConfigFileDir": "打开配置文件目录",
"selectType": "请选择同步类型",
"syncConfigNote": "同步的文件为配置文件",
"selectType": "请选择平台",
"syncActions": "同步操作",
"syncConfigProxy": "代理",
"syncConfiguration": "同步配置",
"syncConfiguration": "同步平台",
"syncEndpointConfig": "平台设置",
"syncResult": { "failed": "同步失败", "success": "同步成功" },
"title": "配置/相册同步",
"upDownloadDesc": "同步配置文件和相册数据到云端",
"upDownloadSettings": "同步配置和相册",
"uploadSettings": "上传配置",
"webdav": {
"authType": "WebDAV 认证类型",
"enableSSL": "启用 SSL/TLS",
"enableSSLDesc": "使用安全连接 (推荐)",
"password": "WebDAV 密码",
"savePath": "WebDAV 保存路径",
"username": "WebDAV 用户名"

View File

@@ -683,8 +683,10 @@
"sync": {
"allConfig": "所有配置",
"commonConfig": "通用配置",
"configureSync": "平台配置",
"downloadSettings": "下載配置",
"fileManagement": "文件管理",
"fileManagementDesc": "訪問和管理配置文件",
"galleryDB": "相冊數據庫同步",
"gitea": { "branch": "分支名", "repo": "倉庫名", "token": "訪問令牌", "username": "用戶名" },
"giteaHost": "Gitea 地址",
@@ -701,25 +703,29 @@
"username": "GitHub 用戶名"
},
"manageConfig": "管理配置",
"migrateDesc": "從 PicGo 導入配置和相冊數據",
"migrateFromPicGo": "從PicGo遷移",
"mirgrateContent": "即將導入PicGo的配置文件和相冊, 這將覆蓋當前的配置文件和相冊, 是否繼續?",
"mirgrateFailed": "導入失敗",
"mirgrateSuccess": "導入成功, 請重啟PicList生效",
"mirgrateTitle": "通知",
"notConfigured": "未配置",
"openConfigFile": "打開配置文件",
"openConfigFileDir": "打開配置文件目錄",
"selectType": "請選擇同步類型",
"syncConfigNote": "同步的文件為配置文件",
"selectType": "請選擇同步平台類型",
"syncActions": "同步操作",
"syncConfigProxy": "代理",
"syncConfiguration": "同步配置",
"syncConfiguration": "同步平台",
"syncEndpointConfig": "平台配置",
"syncResult": { "failed": "同步失敗", "success": "同步成功" },
"title": "配置/相冊同步",
"upDownloadDesc": "同步配置文件和相冊數據到雲端",
"upDownloadSettings": "同步配置和相冊",
"uploadSettings": "上傳配置",
"webdav": {
"authType": "WebDAV 認證類型",
"enableSSL": "啟用 SSL/TLS",
"enableSSLDesc": "使用安全連接 (推薦)",
"password": "WebDAV 密碼",
"savePath": "WebDAV 保存路徑",
"username": "WebDAV 用戶名"

View File

@@ -183,57 +183,92 @@
<!-- Sync & Configure Tab -->
<div v-if="activeName === 'sync'" class="tab-content">
<div class="settings-section">
<!-- Sync Status Overview -->
<div class="sync-overview-card">
<div class="sync-overview-header">
<div class="sync-overview-icon">
<RotateCcw :size="28" />
</div>
<div class="sync-overview-info">
<h2>{{ t('pages.settings.sync.syncConfiguration') }}</h2>
<p>{{ ' ' }}</p>
<div class="form-grid">
<div class="form-group">
<label>{{ t('pages.settings.sync.syncEndpointConfig') }}</label>
<button class="btn btn-primary" @click="syncVisible = true">
<RotateCcw :size="16" />
{{ t('pages.settings.clickToSet') }}
<p class="sync-status-text">
<span class="sync-type-badge">{{ sync.type?.toUpperCase() || 'N/A' }}</span>
<span v-if="sync.type !== 'webdav' && sync.username"
>{{ sync.username }}/{{ sync.repo || '...' }}</span
>
<span v-else-if="sync.type === 'webdav' && sync.webdavEndpoint">{{ sync.webdavEndpoint }}</span>
<span v-else class="sync-not-configured">{{ t('pages.settings.sync.notConfigured') }}</span>
</p>
</div>
</div>
<button class="btn btn-primary sync-config-btn" @click="syncVisible = true">
<Settings :size="16" />
{{ t('pages.settings.sync.configureSync') }}
</button>
</div>
<div class="form-group">
<label>{{ t('pages.settings.sync.upDownloadSettings') }}</label>
<button class="btn btn-primary" @click="upDownConfigVisible = true">
<Download :size="16" />
{{ t('pages.settings.clickToSet') }}
</button>
<!-- Sync Actions Section -->
<div class="settings-section sync-actions-section">
<div class="section-header-with-icon">
<CloudUpload :size="20" class="section-icon" />
<div>
<h2>{{ t('pages.settings.sync.syncActions') }}</h2>
</div>
</div>
<div class="form-group">
<label>{{ t('pages.settings.sync.migrateFromPicGo') }}</label>
<button class="btn btn-secondary" @click="handleMigrateFromPicGo">
<Import :size="16" />
{{ t('pages.settings.clickToSet') }}
</button>
<div class="sync-action-cards">
<div class="sync-action-card" @click="upDownConfigVisible = true">
<div class="sync-action-icon upload">
<CloudUpload :size="24" />
</div>
<div class="sync-action-content">
<h4>{{ t('pages.settings.sync.upDownloadSettings') }}</h4>
<p>{{ t('pages.settings.sync.upDownloadDesc') }}</p>
</div>
<div class="sync-action-arrow">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M9 18l6-6-6-6" />
</svg>
</div>
</div>
<div class="sync-action-card" @click="handleMigrateFromPicGo">
<div class="sync-action-icon migrate">
<Import :size="24" />
</div>
<div class="sync-action-content">
<h4>{{ t('pages.settings.sync.migrateFromPicGo') }}</h4>
<p>{{ t('pages.settings.sync.migrateDesc') }}</p>
</div>
<div class="sync-action-arrow">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M9 18l6-6-6-6" />
</svg>
</div>
</div>
</div>
</div>
<div class="settings-section">
<!-- File Management Section -->
<div class="settings-section file-management-section">
<div class="section-header-with-icon">
<FolderOpen :size="20" class="section-icon" />
<div>
<h2>{{ t('pages.settings.sync.fileManagement') }}</h2>
<p>{{ ' ' }}</p>
<div class="form-grid">
<div class="form-group">
<label>{{ t('pages.settings.sync.openConfigFile') }}</label>
<button class="btn btn-secondary" @click="openFile('data.json')">
<FileText :size="16" />
{{ t('pages.settings.clickToOpen') }}
</button>
<p>{{ t('pages.settings.sync.fileManagementDesc') }}</p>
</div>
</div>
<div class="form-group">
<label>{{ t('pages.settings.sync.openConfigFileDir') }}</label>
<button class="btn btn-secondary" @click="openDirectory()">
<FolderOpen :size="16" />
{{ t('pages.settings.clickToOpen') }}
<div class="file-action-grid">
<button class="file-action-btn" @click="openFile('data.json')">
<FileText :size="20" />
<span>{{ t('pages.settings.sync.openConfigFile') }}</span>
</button>
<button class="file-action-btn" @click="openDirectory()">
<FolderOpen :size="20" />
<span>{{ t('pages.settings.sync.openConfigFileDir') }}</span>
</button>
</div>
</div>
</div>
</div>
@@ -1109,27 +1144,42 @@
<!-- Sync Configuration Dialog -->
<div v-if="syncVisible" class="dialog-overlay">
<div class="dialog large" @click.stop>
<div class="dialog sync-config-dialog" @click.stop>
<div class="dialog-header">
<h3 class="dialog-title">
{{ t('pages.settings.sync.syncEndpointConfig') }}
</h3>
<div class="dialog-header-content">
<div class="sync-dialog-icon">
<RotateCcw :size="24" />
</div>
<div>
<h3 class="dialog-title">{{ t('pages.settings.sync.syncEndpointConfig') }}</h3>
</div>
</div>
<button class="dialog-close" @click="cancelSyncSetting">×</button>
</div>
<div class="dialog-content">
<div class="notice-text">
{{ t('pages.settings.sync.syncConfigNote') }}
<div class="dialog-content sync-dialog-content">
<div class="sync-type-selector">
<label class="sync-type-label">{{ t('pages.settings.sync.selectType') }}</label>
<div class="sync-type-grid">
<button
v-for="typeitem of syncType"
:key="typeitem"
:class="['sync-type-btn', { active: sync.type === typeitem }]"
@click="sync.type = typeitem"
>
<GitBranch v-if="typeitem.includes('git')" :size="20" />
<Store v-else-if="typeitem === 'webdav'" :size="20" />
<span>{{ typeitem.slice(0, 1).toUpperCase() + typeitem.slice(1) }}</span>
</button>
</div>
<div class="form-group">
<label>{{ t('pages.settings.sync.selectType') }}</label>
<select v-model="sync.type" class="form-select">
<option v-for="typeitem of syncType" :key="typeitem" :value="typeitem">
{{ typeitem.slice(0, 1).toUpperCase() + typeitem.slice(1) }}
</option>
</select>
</div>
<div v-if="sync.type === 'gitea'" class="form-group">
<label>{{ t('pages.settings.sync.giteaHost') }}</label>
<!-- Configuration Fields -->
<div class="sync-config-fields">
<div v-if="sync.type === 'gitea'" class="sync-field-group">
<label>
<Server :size="16" />
{{ t('pages.settings.sync.giteaHost') }}
</label>
<input
v-model.trim="sync.endpoint"
type="text"
@@ -1137,8 +1187,13 @@
:placeholder="t('pages.settings.sync.giteaHost')"
/>
</div>
<div v-if="sync.type === 'webdav'" class="form-group">
<label>{{ t('pages.settings.sync.webdavEndpoint') }}</label>
<!-- WebDAV Endpoint -->
<div v-if="sync.type === 'webdav'" class="sync-field-group">
<label>
<Globe :size="16" />
{{ t('pages.settings.sync.webdavEndpoint') }}
</label>
<input
v-model.trim="sync.webdavEndpoint"
type="text"
@@ -1146,9 +1201,18 @@
:placeholder="t('pages.settings.sync.webdavEndpoint')"
/>
</div>
<!-- Git-based fields -->
<template v-if="sync.type !== 'webdav'">
<div v-for="inputItem in ['username', 'repo', 'branch', 'token']" :key="inputItem" class="form-group">
<label>{{ t(`pages.settings.sync.${sync.type.toLowerCase()}.${inputItem.toLowerCase()}`) }}</label>
<div class="sync-fields-grid">
<div
v-for="inputItem in ['username', 'repo', 'branch', 'token']"
:key="inputItem"
class="sync-field-group"
>
<label>
{{ t(`pages.settings.sync.${sync.type.toLowerCase()}.${inputItem.toLowerCase()}`) }}
</label>
<input
v-model.trim="sync[inputItem as any]"
type="text"
@@ -1156,9 +1220,13 @@
:placeholder="t(`pages.settings.sync.${sync.type.toLowerCase()}.${inputItem.toLowerCase()}`)"
/>
</div>
</div>
</template>
<!-- WebDAV fields -->
<template v-if="sync.type === 'webdav'">
<div class="form-group">
<div class="sync-fields-grid">
<div class="sync-field-group">
<label>{{ t('pages.settings.sync.webdav.username') }}</label>
<input
v-model.trim="sync.webdavUsername"
@@ -1167,15 +1235,16 @@
:placeholder="t('pages.settings.sync.webdav.username')"
/>
</div>
<div class="form-group">
<div class="sync-field-group">
<label>{{ t('pages.settings.sync.webdav.password') }}</label>
<input
v-model.trim="sync.webdavPassword"
type="text"
class="form-input"
:placeholder="t('pages.settings.sync.webdav.password')"
/>
</div>
<div class="form-group">
<div class="sync-field-group">
<label>{{ t('pages.settings.sync.webdav.savePath') }}</label>
<input
v-model.trim="sync.webdavSavePath"
@@ -1184,25 +1253,32 @@
:placeholder="t('pages.settings.sync.webdav.savePath')"
/>
</div>
<div class="form-group">
<div class="sync-field-group">
<label>{{ t('pages.settings.sync.webdav.authType') }}</label>
<select v-model="sync.webdavAuthType" class="form-select">
<option value="basic">Basic</option>
<option value="digest">Digest</option>
</select>
</div>
<div class="form-group">
</div>
<div class="sync-ssl-toggle">
<label class="switch-label">
<input v-model="sync.webdavSslEnabled" type="checkbox" class="switch-input" />
<span class="switch-slider" />
<div class="switch-content">
<div class="switch-title">{{ t('pages.settings.sync.webdav.enableSSL') }}</div>
<div class="switch-description">{{ t('pages.settings.sync.webdav.enableSSLDesc') }}</div>
</div>
</label>
</div>
</template>
<div v-if="sync.type === 'github'" class="form-group">
<label>{{ t('pages.settings.sync.syncConfigProxy') }}</label>
<!-- GitHub Proxy -->
<div v-if="sync.type === 'github'" class="sync-field-group">
<label>
<Globe :size="16" />
{{ t('pages.settings.sync.syncConfigProxy') }}
</label>
<input
v-model.trim="sync.proxy"
type="text"
@@ -1211,6 +1287,7 @@
/>
</div>
</div>
</div>
<div class="dialog-footer">
<button class="btn btn-secondary" @click="cancelSyncSetting">
{{ t('common.cancel') }}
@@ -1248,7 +1325,7 @@
class="config-button"
@click="syncTaskFn(item.task, item.number)"
>
<Import :size="16" class="button-icon" />
<CloudUpload :size="16" class="button-icon" />
<span>{{ item.label }}</span>
</button>
</div>
@@ -1326,6 +1403,7 @@ import {
Edit,
FileText,
FolderOpen,
GitBranch,
Globe,
Image as ImageIcon,
Import,
@@ -1336,6 +1414,7 @@ import {
RotateCcw,
Server,
Settings,
Store,
} from 'lucide-vue-next'
import type { IConfig } from 'piclist'
import pkg from 'root/package.json'

View File

@@ -1082,3 +1082,415 @@ small {
max-width: 95%;
}
}
/* ==================== Sync Panel Styles ==================== */
/* Sync Overview Card */
.sync-overview-card {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid var(--color-border);
border-radius: 16px;
padding: 1.5rem;
background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-background-primary) 100%);
box-shadow: 0 4px 16px rgb(0 0 0 / 8%);
gap: 1.5rem;
}
.sync-overview-header {
display: flex;
align-items: center;
gap: 1rem;
}
.sync-overview-icon {
display: flex;
justify-content: center;
align-items: center;
border-radius: 14px;
width: 46px;
height: 46px;
color: white;
background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
box-shadow: 0 4px 12px rgb(64 158 255 / 30%);
}
.sync-overview-info h2 {
margin: 0 0 0.25rem;
font-size: 1.125rem;
font-weight: 600;
color: var(--color-text-primary);
}
.sync-status-text {
display: flex;
align-items: center;
font-size: 0.875rem;
color: var(--color-text-secondary);
gap: 0.5rem;
}
.sync-type-badge {
display: inline-flex;
align-items: center;
border-radius: 6px;
padding: 0.2rem 0.5rem;
font-size: 0.75rem;
font-weight: 600;
color: #409eff;
background: rgb(64 158 255 / 15%);
letter-spacing: 0.02em;
}
.sync-not-configured {
font-style: italic;
color: var(--color-text-tertiary);
}
.sync-config-btn {
white-space: nowrap;
flex-shrink: 0;
}
/* Section Header with Icon */
.section-header-with-icon {
display: flex;
align-items: flex-start;
margin-bottom: 0.5rem;
gap: 0.75rem;
}
.section-icon {
margin-top: 0.125rem;
color: var(--color-accent);
flex-shrink: 0;
}
.section-header-with-icon h2 {
margin: 0 0 0.25rem;
font-size: 1.125rem;
font-weight: 600;
color: var(--color-text-primary);
}
.section-header-with-icon p {
margin: 0;
font-size: 0.875rem;
color: var(--color-text-secondary);
}
/* Sync Action Cards */
.sync-action-cards {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.sync-action-card {
display: flex;
align-items: center;
border: 1px solid var(--color-border);
border-radius: 12px;
padding: 0.5rem 1.25rem;
background: var(--color-background-tertiary);
transition: all 0.25s ease;
cursor: pointer;
gap: 1rem;
}
.sync-action-card:hover {
border-color: var(--color-accent);
background: var(--color-background-secondary);
transform: translateX(4px);
box-shadow: 0 4px 16px rgb(64 158 255 / 15%);
}
.sync-action-icon {
display: flex;
justify-content: center;
align-items: center;
border-radius: 10px;
width: 38px;
height: 38px;
color: white;
flex-shrink: 0;
}
.sync-action-icon.upload {
background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
}
.sync-action-icon.migrate {
background: linear-gradient(135deg, #67c23a 0%, #95d475 100%);
}
.sync-action-content {
flex: 1;
}
.sync-action-content h4 {
margin: 0 0 0.25rem;
font-size: 0.95rem;
font-weight: 600;
color: var(--color-text-primary);
}
.sync-action-content p {
margin: 0;
font-size: 0.8rem;
color: var(--color-text-secondary);
line-height: 1.4;
}
.sync-action-arrow {
color: var(--color-text-tertiary);
transition: all 0.25s ease;
flex-shrink: 0;
}
.sync-action-card:hover .sync-action-arrow {
color: var(--color-accent);
transform: translateX(4px);
}
/* File Management Section */
.file-action-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
.file-action-btn {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 1px dashed var(--color-border);
border-radius: 12px;
padding: 1.5rem 1rem;
background: var(--color-background-tertiary);
transition: all 0.25s ease;
cursor: pointer;
gap: 0.75rem;
}
.file-action-btn:hover {
border-style: solid;
border-color: var(--color-accent);
color: var(--color-accent);
background: rgb(64 158 255 / 8%);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgb(64 158 255 / 15%);
}
.file-action-btn svg {
color: var(--color-text-secondary);
transition: color 0.25s ease;
}
.file-action-btn:hover svg {
color: var(--color-accent);
}
.file-action-btn span {
font-size: 0.875rem;
font-weight: 500;
text-align: center;
color: var(--color-text-primary);
}
/* ==================== Sync Configuration Dialog ==================== */
.sync-config-dialog {
width: 90%;
max-width: 560px;
}
.sync-dialog-icon {
display: flex;
justify-content: center;
align-items: center;
border-radius: 10px;
width: 34px;
height: 34px;
color: white;
background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
box-shadow: 0 4px 12px rgb(64 158 255 / 25%);
flex-shrink: 0;
}
.dialog-subtitle {
margin: 0.25rem 0 0;
font-size: 0.8rem;
color: var(--color-text-secondary);
}
.sync-dialog-content {
padding: 0.5rem;
}
/* Sync Type Selector */
.sync-type-selector {
margin-bottom: 1.5rem;
}
.sync-type-label {
display: block;
margin-bottom: 0.75rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--color-text-primary);
}
.sync-type-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0.75rem;
}
.sync-type-btn {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 2px solid var(--color-border);
border-radius: 12px;
padding: 1rem 0.5rem;
background: var(--color-background-tertiary);
transition: all 0.2s ease;
cursor: pointer;
gap: 0.5rem;
}
.sync-type-btn:hover {
border-color: var(--color-accent);
background: rgb(64 158 255 / 8%);
}
.sync-type-btn.active {
border-color: #409eff;
color: #409eff;
background: rgb(64 158 255 / 12%);
box-shadow: 0 0 0 3px rgb(64 158 255 / 15%);
}
.sync-type-btn svg {
color: var(--color-text-secondary);
transition: color 0.2s ease;
}
.sync-type-btn.active svg,
.sync-type-btn:hover svg {
color: #409eff;
}
.sync-type-btn span {
font-size: 0.75rem;
font-weight: 600;
color: inherit;
}
/* Sync Config Fields */
.sync-config-fields {
display: flex;
flex-direction: column;
gap: 1rem;
}
.sync-fields-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
.sync-field-group {
display: flex;
flex-direction: column;
}
.sync-field-group label {
display: flex;
align-items: center;
margin-bottom: 0.5rem;
font-size: 0.825rem;
font-weight: 500;
color: var(--color-text-primary);
gap: 0.4rem;
}
.sync-field-group label svg {
color: var(--color-accent);
}
.sync-ssl-toggle {
margin-top: 0.5rem;
}
/* Dark Mode Adjustments for Sync Panel */
:root.dark .sync-overview-card,
:root.auto.dark .sync-overview-card {
background: linear-gradient(135deg, var(--color-background-secondary) 0%, var(--color-background-tertiary) 100%);
box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
}
:root.dark .sync-action-card,
:root.auto.dark .sync-action-card {
border-color: var(--color-border);
background: var(--color-background-secondary);
}
:root.dark .sync-action-card:hover,
:root.auto.dark .sync-action-card:hover {
background: var(--color-background-tertiary);
}
:root.dark .file-action-btn,
:root.auto.dark .file-action-btn {
background: var(--color-background-secondary);
}
:root.dark .file-action-btn:hover,
:root.auto.dark .file-action-btn:hover {
background: rgb(64 158 255 / 12%);
}
:root.dark .sync-type-btn,
:root.auto.dark .sync-type-btn {
border-color: var(--color-border);
background: var(--color-background-secondary);
}
:root.dark .sync-type-btn:hover,
:root.auto.dark .sync-type-btn:hover {
background: rgb(64 158 255 / 15%);
}
:root.dark .sync-type-btn.active,
:root.auto.dark .sync-type-btn.active {
background: rgb(64 158 255 / 20%);
}
/* Responsive Adjustments */
@media (width <= 768px) {
.sync-overview-card {
flex-direction: column;
text-align: center;
}
.sync-overview-header {
flex-direction: column;
}
.file-action-grid {
grid-template-columns: 1fr;
}
.sync-type-grid {
grid-template-columns: repeat(2, 1fr);
}
.sync-fields-grid {
grid-template-columns: 1fr;
}
}