mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-18 12:40:41 +01:00
chore: update electron
This commit is contained in:
parent
fa3f3e1fd8
commit
c5eb73ed3f
@ -139,7 +139,7 @@
|
|||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
"css-loader": "^6.5.0",
|
"css-loader": "^6.5.0",
|
||||||
"electron": "^16.0.8",
|
"electron": "^17.0.1",
|
||||||
"electron-builder": "^22.14.11",
|
"electron-builder": "^22.14.11",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
|
@ -13,7 +13,6 @@ Store.initRenderer();
|
|||||||
|
|
||||||
const isDevelopment = process.env.NODE_ENV !== 'production';
|
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||||
const isMacOS = process.platform === 'darwin';
|
const isMacOS = process.platform === 'darwin';
|
||||||
const isWindows = process.platform === 'win32';
|
|
||||||
const gotTheLock = app.requestSingleInstanceLock();
|
const gotTheLock = app.requestSingleInstanceLock();
|
||||||
|
|
||||||
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true';
|
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = 'true';
|
||||||
@ -33,7 +32,6 @@ async function createMainWindow () {
|
|||||||
minHeight: 550,
|
minHeight: 550,
|
||||||
title: 'Antares SQL',
|
title: 'Antares SQL',
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
show: !isWindows, // Temporary workaround to https://github.com/electron/electron/issues/30024
|
|
||||||
icon: nativeImage.createFromDataURL(icon.default),
|
icon: nativeImage.createFromDataURL(icon.default),
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
@ -115,9 +113,6 @@ else {
|
|||||||
mainWindow = await createMainWindow();
|
mainWindow = await createMainWindow();
|
||||||
createAppMenu();
|
createAppMenu();
|
||||||
|
|
||||||
if (isWindows) // Temporary workaround to https://github.com/electron/electron/issues/30024
|
|
||||||
mainWindow.show();
|
|
||||||
|
|
||||||
// if (isDevelopment)
|
// if (isDevelopment)
|
||||||
// mainWindow.webContents.openDevTools();
|
// mainWindow.webContents.openDevTools();
|
||||||
|
|
||||||
|
@ -1,25 +1,11 @@
|
|||||||
const { _electron: electron } = require('playwright');
|
const { _electron: electron } = require('playwright');
|
||||||
const { strict: assert } = require('assert');
|
const { strict: assert } = require('assert');
|
||||||
|
|
||||||
const isWindows = process.platform === 'win32';
|
|
||||||
async function wait (ms) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
setTimeout(resolve, ms);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
if (isWindows) {
|
|
||||||
console.log('Termporary skipping tests on Windows');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('Starting tests');
|
console.log('Starting tests');
|
||||||
// Launch Electron app.
|
// Launch Electron app.
|
||||||
const electronApp = await electron.launch({ args: ['dist/main.js'] });
|
const electronApp = await electron.launch({ args: ['dist/main.js'] });
|
||||||
|
|
||||||
if (isWindows) await wait(5000);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* App main window state
|
* App main window state
|
||||||
* @type {{isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean}}
|
* @type {{isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user