[TEST] selective sync

This commit is contained in:
olcxja 2026-10-19 11:02:52 +02:00
commit aee4d3d1f2
15 changed files with 1228 additions and 182 deletions

View file

@ -22,6 +22,8 @@ const onOpenWith = singleSlot('openwith:file')
// one sync (and one pending consent request, enforced server-side) at a time
const onLanSyncProgress = singleSlot('lansync:progress')
const onLanSyncIncoming = singleSlot('lansync:incoming')
// the receiver's deletion review: an answer here decides what may be removed
const onLanSyncReview = singleSlot('lansync:review')
const fs = require('fs')
const path = require('path')
@ -96,6 +98,10 @@ contextBridge.exposeInMainWorld('plwl', {
lansyncClearHashCache: () => ipcRenderer.invoke('lansync:clearHashCache'),
lansyncSync: payload => ipcRenderer.invoke('lansync:sync', payload),
lansyncRespondIncoming: (requestId, accept) => ipcRenderer.invoke('lansync:respondIncoming', requestId, accept),
lansyncItems: () => ipcRenderer.invoke('lansync:items'),
lansyncReviewTree: (id, rel) => ipcRenderer.invoke('lansync:reviewTree', id, rel),
lansyncReviewDecide: (id, decision) => ipcRenderer.invoke('lansync:reviewDecide', id, decision),
onLanSyncReview: onLanSyncReview,
onLanSyncDevices: cb => ipcRenderer.on('lansync:devices', (e, data) => cb(data)),
onLanSyncProgress: onLanSyncProgress,
onLanSyncIncoming: onLanSyncIncoming,