add sidebar

This commit is contained in:
Anton Bracke
2022-02-18 01:51:35 +01:00
parent a11d19a457
commit c891fcb1bd
12 changed files with 211 additions and 78 deletions
+10
View File
@@ -0,0 +1,10 @@
import { contextBridge, ipcRenderer } from "electron";
contextBridge.exposeInMainWorld("WorkAdventureDesktopApi", {
desktop: true,
getServers: () => ipcRenderer.invoke("sidebar:getServers"),
selectServer: (serverId: string) =>
ipcRenderer.invoke("sidebar:selectServer", serverId),
addServer: (serverName: string, serverUrl: string) =>
ipcRenderer.invoke("sidebar:addServer", serverName, serverUrl),
});