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