mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 13:22:41 +02:00
15 lines
496 B
TypeScript
15 lines
496 B
TypeScript
import { contextBridge, ipcRenderer } from 'electron';
|
|
import { IPC_CHANNELS } from '../../ipc/channels';
|
|
|
|
contextBridge.exposeInMainWorld('surfsenseWindowPick', {
|
|
list: () =>
|
|
ipcRenderer.invoke(IPC_CHANNELS.WINDOW_PICK_LIST) as Promise<
|
|
{ id: string; name: string; thumbDataUrl: string }[]
|
|
>,
|
|
submit: (sourceId: string) => {
|
|
ipcRenderer.send(IPC_CHANNELS.WINDOW_PICK_SUBMIT, sourceId);
|
|
},
|
|
cancel: () => {
|
|
ipcRenderer.send(IPC_CHANNELS.WINDOW_PICK_CANCEL);
|
|
},
|
|
});
|