feat: dropbox sync for filesystem content

This commit is contained in:
2026-02-10 16:21:27 +01:00
parent 8c118b8b38
commit 008346a93f
10 changed files with 2372 additions and 1 deletions

View File

@@ -63,6 +63,22 @@ contextBridge.exposeInMainWorld('electronAPI', {
stopAutoSync: () => ipcRenderer.invoke('sync:stopAutoSync'),
},
// Dropbox File Sync
dropbox: {
configure: (config: unknown) => ipcRenderer.invoke('dropbox:configure', config),
isConfigured: () => ipcRenderer.invoke('dropbox:isConfigured'),
getStatus: () => ipcRenderer.invoke('dropbox:getStatus'),
syncAll: () => ipcRenderer.invoke('dropbox:syncAll'),
startWatching: () => ipcRenderer.invoke('dropbox:startWatching'),
stopWatching: () => ipcRenderer.invoke('dropbox:stopWatching'),
startPolling: () => ipcRenderer.invoke('dropbox:startPolling'),
stopPolling: () => ipcRenderer.invoke('dropbox:stopPolling'),
getConflicts: () => ipcRenderer.invoke('dropbox:getConflicts'),
resolveConflict: (conflictId: string, resolution: string) =>
ipcRenderer.invoke('dropbox:resolveConflict', conflictId, resolution),
getLastSyncTime: () => ipcRenderer.invoke('dropbox:getLastSyncTime'),
},
// Tasks
tasks: {
getAll: () => ipcRenderer.invoke('tasks:getAll'),
@@ -138,6 +154,19 @@ export interface ElectronAPI {
getLog: (limit?: number) => Promise<unknown[]>;
stopAutoSync: () => Promise<void>;
};
dropbox: {
configure: (config: unknown) => Promise<void>;
isConfigured: () => Promise<boolean>;
getStatus: () => Promise<string>;
syncAll: () => Promise<unknown>;
startWatching: () => Promise<void>;
stopWatching: () => Promise<void>;
startPolling: () => Promise<void>;
stopPolling: () => Promise<void>;
getConflicts: () => Promise<unknown[]>;
resolveConflict: (conflictId: string, resolution: string) => Promise<void>;
getLastSyncTime: () => Promise<string | null>;
};
tasks: {
getAll: () => Promise<unknown[]>;
getRunning: () => Promise<unknown[]>;