silence electron remote module warning

This commit is contained in:
Labhansh Agrawal 2020-07-15 11:01:58 +05:30 committed by Benjamin Staneck
parent 73f8037eca
commit 5bc4a5c299

View file

@ -24,8 +24,7 @@ export function newWindow(
const classOpts = Object.assign({uid: uuidv4()});
app.plugins.decorateWindowClass(classOpts);
const winOpts = Object.assign(
{
const winOpts: BrowserWindowConstructorOptions = {
minWidth: 370,
minHeight: 190,
backgroundColor: toElectronBackgroundColor(cfg.backgroundColor || '#000'),
@ -35,16 +34,15 @@ export function newWindow(
frame: process.platform === 'darwin',
transparent: process.platform === 'darwin',
icon,
show: process.env.HYPER_DEBUG || process.env.HYPERTERM_DEBUG || isDev,
show: Boolean(process.env.HYPER_DEBUG || process.env.HYPERTERM_DEBUG || isDev),
acceptFirstMouse: true,
webPreferences: {
nodeIntegration: true,
navigateOnDragDrop: true
}
navigateOnDragDrop: true,
enableRemoteModule: true
},
options_
);
...options_
};
const window = new BrowserWindow(app.plugins.getDecoratedBrowserOptions(winOpts));
window.uid = classOpts.uid;