refactor: update import of custom-electron-titlebar lib

This commit is contained in:
4gray committed 2022-07-21 16:59:07 +02:00
1 parent 528515be46
commit 8610104749
1 file changed
+6
+6
View File
@@ -4,8 +4,13 @@ import * as path from 'path';
import * as url from 'url';
import { Api } from './api';
import { AppMenu } from './menu';
const {
setupTitlebar,
attachTitlebarToWindow,
} = require('custom-electron-titlebar/main');
const contextMenu = require('electron-context-menu');
setupTitlebar();
let win: BrowserWindow | null = null;
const args = process.argv.slice(1),
serve = args.some((val) => val === '--serve');
@@ -35,6 +40,7 @@ function createWindow(): BrowserWindow {
minHeight: 700,
title: 'IPTVnator',
});
attachTitlebarToWindow(win);
require('@electron/remote/main').enable(win.webContents);