Add titlebar related stuff to context bridge

This commit is contained in:
smartfrigde 2022-01-16 19:14:26 +01:00
parent b1c9631c95
commit 3c4056a0fc

View file

@ -1,6 +1,6 @@
import { contextBridge, ipcRenderer } from "electron";
import { getDisplayMediaSelector } from "./capturer";
import { injectTitlebar } from "./titlebar";
contextBridge.exposeInMainWorld("armcord", {
window: {
@ -9,6 +9,9 @@ contextBridge.exposeInMainWorld("armcord", {
minimize: () => ipcRenderer.send("win-minimize"),
maximize: () => ipcRenderer.send("win-maximize"),
},
titlebar: {
injectTitlebar: () => injectTitlebar(),
},
electron: process.versions.electron,
channel: ipcRenderer.sendSync("channel"),
version: ipcRenderer.sendSync("get-app-version", "app-version"),