Fix cumcord bug

This commit is contained in:
smartfridge 2021-11-01 17:57:03 +01:00
parent 8c3abc8cf6
commit 6e12b1baa2
2 changed files with 9 additions and 2 deletions

View file

@ -44,7 +44,11 @@
"appId": "com.smartfridge.armcord", "appId": "com.smartfridge.armcord",
"productName": "ArmCord", "productName": "ArmCord",
"mac": { "mac": {
"category": "Network" "category": "Network",
"extraResources": ["./mods/cumcord/*"]
},
"win": {
"extraResources": ["./mods/cumcord/*"]
}, },
"linux": { "linux": {
"category": "Network", "category": "Network",

View file

@ -1,13 +1,16 @@
const { contextBridge, remote, desktopCapturer } = require("electron"); const { contextBridge, remote, desktopCapturer } = require("electron");
const currentWindow = remote.getCurrentWindow(); const currentWindow = remote.getCurrentWindow();
const version = require("../package.json").version;
contextBridge.exposeInMainWorld("electron", { contextBridge.exposeInMainWorld("electron", {
window: { window: {
show: () => currentWindow.show(), show: () => currentWindow.show(),
hide: () => currentWindow.hide(), hide: () => currentWindow.hide(),
minimize: () => currentWindow.minimize(), minimize: () => currentWindow.minimize(),
maximize: () => currentWindow.maximize(), maximize: () => currentWindow.maximize(),
on : () => currentWindow.on(),
}, },
version: process.versions.electron, electron: process.versions.electron,
version: version,
desktopCapturer: desktopCapturer, desktopCapturer: desktopCapturer,
}); });