mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
chore: update electron and electron builder #213
This commit is contained in:
parent
5d1a0f86ff
commit
363626477b
4 changed files with 22 additions and 22 deletions
|
|
@ -1,10 +1,11 @@
|
|||
import {BrowserWindow, ipcMain, Menu, shell} from 'electron';
|
||||
import {BrowserWindow, ipcMain, Menu, shell, dialog} from 'electron';
|
||||
import {errorHandler} from './error-handler';
|
||||
import {join, normalize} from 'path';
|
||||
import {format} from 'url';
|
||||
import {getSettings} from './get-settings';
|
||||
import {IPC} from './ipc-events.const';
|
||||
import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
|
||||
import MessageBoxReturnValue = Electron.MessageBoxReturnValue;
|
||||
|
||||
let mainWin;
|
||||
let indicatorMod;
|
||||
|
|
@ -111,22 +112,23 @@ function initWinEventListeners(app: any) {
|
|||
|
||||
getSettings(mainWin, (appCfg) => {
|
||||
if (appCfg && appCfg.misc.isConfirmBeforeExit && !app.isQuiting) {
|
||||
const choice = require('electron').dialog.showMessageBox(mainWin,
|
||||
dialog.showMessageBox(mainWin,
|
||||
{
|
||||
type: 'question',
|
||||
buttons: ['Yes', 'No'],
|
||||
title: 'Confirm',
|
||||
message: 'Are you sure you want to quit?'
|
||||
});
|
||||
if (choice === 1) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
} else if (choice === 0) {
|
||||
app.isQuiting = true;
|
||||
isQuiting = true;
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
}).then((choice: MessageBoxReturnValue) => {
|
||||
if (choice.response === 1) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
} else if (choice.response === 0) {
|
||||
app.isQuiting = true;
|
||||
isQuiting = true;
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
app.isQuiting = true;
|
||||
isQuiting = true;
|
||||
|
|
|
|||
|
|
@ -107,9 +107,7 @@ appIN.on('ready', () => {
|
|||
}
|
||||
};
|
||||
|
||||
const checkIdle = () => powerMonitor.querySystemIdleTime((idleTimeSeconds) => {
|
||||
sendIdleMsgIfOverMin(idleTimeSeconds * 1000);
|
||||
});
|
||||
const checkIdle = () => sendIdleMsgIfOverMin(powerMonitor.getSystemIdleTime() * 1000);
|
||||
|
||||
// init time tracking interval
|
||||
setInterval(checkIdle, CONFIG.IDLE_PING_INTERVAL);
|
||||
|
|
|
|||
|
|
@ -166,8 +166,8 @@
|
|||
"conventional-changelog-cli": "^2.0.21",
|
||||
"core-js": "^3.1.3",
|
||||
"cross-env": "^5.2.0",
|
||||
"electron": "5.0.7",
|
||||
"electron-builder": "^21.1.1",
|
||||
"electron": "6.0.7",
|
||||
"electron-builder": "^21.2.0",
|
||||
"electron-reload": "^1.2.5",
|
||||
"hammerjs": "^2.0.8",
|
||||
"husky": "^2.3.0",
|
||||
|
|
|
|||
10
yarn.lock
10
yarn.lock
|
|
@ -3317,7 +3317,7 @@ ejs@^2.6.2:
|
|||
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.2.tgz#3a32c63d1cd16d11266cd4703b14fec4e74ab4f6"
|
||||
integrity sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==
|
||||
|
||||
electron-builder@^21.1.1:
|
||||
electron-builder@^21.2.0:
|
||||
version "21.2.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-21.2.0.tgz#b68ec4def713fc0b8602654ce842f972432f50c5"
|
||||
integrity sha512-x8EXrqFbAb2L3N22YlGar3dGh8vwptbB3ovo3OF6K7NTpcsmM2zEoJv7GhFyX73rNzSG2HaWpXwGAtOp2JWiEw==
|
||||
|
|
@ -3405,10 +3405,10 @@ electron-to-chromium@^1.3.191:
|
|||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.236.tgz#c7158cbd4d17a3670ac7c9b44da44d752aa193a9"
|
||||
integrity sha512-LWOvuJ80pLO3FtFqTcGuXB0dxdMtzSCkRmbXdY5mHUvXRQGor3sTVmyfU70aD2yF5i+fbHz52ncWr5T3xUYHlA==
|
||||
|
||||
electron@5.0.7:
|
||||
version "5.0.7"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-5.0.7.tgz#a48fcbd13d30f16f7d7887908b68e52156e90259"
|
||||
integrity sha512-OMMz8DhatxLuBFbnW7KYcAUjflGYFn0IQEtKR0iZhMAm89FgNOd9SVbxXWAGNxvRR6C0gORXwhTh6BCqqqcR6Q==
|
||||
electron@6.0.7:
|
||||
version "6.0.7"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-6.0.7.tgz#cf3f02502aa58d1517f3befd9c2da2a95cd2eb46"
|
||||
integrity sha512-W0TFnJrBdYBUhzRnEqZt/CfYFmG9RwSnhhXBbOumn/qLQYr9e7kXb6z4y0XQQLhXKkDhuXp+dNqfzhtId5ZiQw==
|
||||
dependencies:
|
||||
"@types/node" "^10.12.18"
|
||||
electron-download "^4.1.0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue