This commit is contained in:
@@ -51,6 +51,17 @@ contextBridge.exposeInMainWorld('updateAPI', {
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('lifecycleAPI', {
|
||||
get: () => ipcRenderer.invoke('lifecycle:get'),
|
||||
set: (patch) => ipcRenderer.invoke('lifecycle:set', patch),
|
||||
show: () => ipcRenderer.send('window:show'),
|
||||
onTrayAction: (callback) => {
|
||||
const handler = (_event, action) => callback(action);
|
||||
ipcRenderer.on('tray:action', handler);
|
||||
return () => ipcRenderer.removeListener('tray:action', handler);
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('sessionPersistence', {
|
||||
save: (data) => ipcRenderer.invoke('save-session', data),
|
||||
load: () => ipcRenderer.invoke('load-session'),
|
||||
@@ -72,6 +83,16 @@ contextBridge.exposeInMainWorld('idleAPI', {
|
||||
// Voice recording — per-participant audio capture that writes
|
||||
// append-only WebM files to the user's chosen folder. See
|
||||
// apps/electron/main.cjs for the main-process implementation.
|
||||
// Discord backup importer — exposes a native file picker for the
|
||||
// backup SQLite file plus file-read helpers the renderer uses to
|
||||
// load the db bytes (parsed in-renderer with sql.js) and to read
|
||||
// individual attachment files off disk during import.
|
||||
contextBridge.exposeInMainWorld('importerAPI', {
|
||||
pickDatabase: () => ipcRenderer.invoke('importer:pick-database'),
|
||||
readDatabase: (dbPath) => ipcRenderer.invoke('importer:read-database', dbPath),
|
||||
readAttachment: (payload) => ipcRenderer.invoke('importer:read-attachment', payload),
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('recordingAPI', {
|
||||
getDefaultFolder: () => ipcRenderer.invoke('recording-get-default-folder'),
|
||||
pickFolder: () => ipcRenderer.invoke('recording-pick-folder'),
|
||||
|
||||
Reference in New Issue
Block a user