mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-17 18:25:42 +02:00
11 lines
417 B
JavaScript
11 lines
417 B
JavaScript
// The pill page's only powers: hand its text up, ask to be hidden, learn when it was shown.
|
|
'use strict';
|
|
|
|
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('overlay', {
|
|
submit: (text) => ipcRenderer.send('overlay:submit', String(text || '')),
|
|
dismiss: () => ipcRenderer.send('overlay:dismiss'),
|
|
onShown: (cb) => { ipcRenderer.on('overlay:shown', () => cb()); },
|
|
});
|