Electron forge migration (#2)

Reviewed-on: https://git.internal.vyntehome.com/vynte/vynte-connect/pulls/2
This commit was merged in pull request #2.
This commit is contained in:
2026-05-31 19:28:32 -05:00
parent 980535d682
commit 30bedb9b25
48 changed files with 11388 additions and 4356 deletions
+16
View File
@@ -0,0 +1,16 @@
// See the Electron documentation for details on how to use preload scripts:
// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts
import { contextBridge, ipcRenderer } from "electron";
contextBridge.exposeInMainWorld('vynte', {
getStatus: () => ipcRenderer.invoke('status:get'),
refresh: () => ipcRenderer.invoke('status:refresh'),
connect: () => ipcRenderer.invoke('vpn:connect'),
disconnect: () => ipcRenderer.invoke('vpn:disconnect'),
logout: () => ipcRenderer.invoke('vpn:logout'),
toggleAuto: () => ipcRenderer.invoke('auto:toggle'),
quit: () => ipcRenderer.invoke('app:quit'),
openGateway: () => ipcRenderer.invoke('external:openGateway'),
onStatus: (callback: Function) => ipcRenderer.on('status', (_, status) => callback(status))
})