feat: settings panel

This commit is contained in:
2026-02-10 16:38:20 +01:00
parent 192969e75a
commit 3f0c767809
14 changed files with 1482 additions and 88 deletions

View File

@@ -85,6 +85,27 @@ export interface SyncResult {
errors: string[];
}
export interface DropboxConfig {
accessToken: string;
appKey: string;
remotePath?: string;
}
export interface DropboxSyncResult {
uploaded: number;
downloaded: number;
conflicts: number;
errors?: string[];
}
export interface DropboxConflict {
id: string;
localPath: string;
remotePath: string;
localModified: string;
remoteModified: string;
}
export interface ElectronAPI {
projects: {
create: (data: { name: string; description?: string; slug?: string }) => Promise<ProjectData>;
@@ -142,6 +163,19 @@ export interface ElectronAPI {
cancel: (taskId: string) => Promise<boolean>;
clearCompleted: () => Promise<void>;
};
dropbox: {
configure: (config: DropboxConfig) => Promise<void>;
isConfigured: () => Promise<boolean>;
getStatus: () => Promise<string>;
syncAll: () => Promise<DropboxSyncResult>;
startWatching: () => Promise<void>;
stopWatching: () => Promise<void>;
startPolling: () => Promise<void>;
stopPolling: () => Promise<void>;
getConflicts: () => Promise<DropboxConflict[]>;
resolveConflict: (conflictId: string, resolution: 'local-wins' | 'remote-wins') => Promise<void>;
getLastSyncTime: () => Promise<string | null>;
};
app: {
getDataPaths: () => Promise<{ database: string; posts: string; media: string }>;
openFolder: (folderPath: string) => Promise<string>;