mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 08:44:41 +08:00
feat: add dual-layer versioning to WebDAV sync (protocol v2 + db-v6)
Separate protocol version from database compatibility version in WebDAV sync paths. Upload writes to v2/db-v6/<profile>, download falls back to legacy v2/<profile> when current path has no data. Extend manifest with optional dbCompatVersion field and add legacy layout detection to UI.
This commit is contained in:
+8
-2
@@ -169,7 +169,7 @@ export interface VisibleApps {
|
||||
openclaw: boolean;
|
||||
}
|
||||
|
||||
// WebDAV v2 同步状态
|
||||
// WebDAV 同步状态
|
||||
export interface WebDavSyncStatus {
|
||||
lastSyncAt?: number | null;
|
||||
lastError?: string | null;
|
||||
@@ -179,7 +179,7 @@ export interface WebDavSyncStatus {
|
||||
lastRemoteManifestHash?: string | null;
|
||||
}
|
||||
|
||||
// WebDAV v2 同步配置
|
||||
// WebDAV 同步配置
|
||||
export interface WebDavSyncSettings {
|
||||
enabled?: boolean;
|
||||
autoSync?: boolean;
|
||||
@@ -191,14 +191,20 @@ export interface WebDavSyncSettings {
|
||||
status?: WebDavSyncStatus;
|
||||
}
|
||||
|
||||
export type RemoteSnapshotLayout = "current" | "legacy";
|
||||
|
||||
// 远端快照信息(下载前预览)
|
||||
export interface RemoteSnapshotInfo {
|
||||
deviceName: string;
|
||||
createdAt: string;
|
||||
snapshotId: string;
|
||||
version: number;
|
||||
protocolVersion: number;
|
||||
dbCompatVersion?: number | null;
|
||||
compatible: boolean;
|
||||
artifacts: string[];
|
||||
layout: RemoteSnapshotLayout;
|
||||
remotePath: string;
|
||||
}
|
||||
|
||||
// 应用设置类型(用于设置对话框与 Tauri API)
|
||||
|
||||
Reference in New Issue
Block a user