Joiner desktop windows (#89)
* base classes/logic from a playground * fix sandbox * add vk support
This commit is contained in:
1 parent
1308361eb6
commit
30ed29a161
34 files changed
+7056
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
import { IPC, JoinerSettings } from '../constants';
|
||||
|
||||
contextBridge.exposeInMainWorld('bridge', {
|
||||
start: (settings: JoinerSettings) => ipcRenderer.invoke(IPC.START, settings),
|
||||
stop: () => ipcRenderer.invoke(IPC.STOP),
|
||||
onLog(cb: (text: string) => void) {
|
||||
ipcRenderer.on(IPC.LOG, (_e, text) => cb(text));
|
||||
},
|
||||
onStatus(cb: (status: string) => void) {
|
||||
ipcRenderer.on(IPC.STATUS, (_e, status) => cb(status));
|
||||
},
|
||||
onRunning(cb: (running: boolean) => void) {
|
||||
ipcRenderer.on(IPC.RUNNING, (_e, v) => cb(v));
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user