mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-03-27 15:55:55 +00:00
Deps update , wait 300 seconds before quit and update
This commit is contained in:
parent
7a78ba24e6
commit
1ffae3e9aa
13
electron.js
13
electron.js
@ -90,7 +90,7 @@ const createTray = () => {
|
|||||||
const isLock = app.requestSingleInstanceLock();
|
const isLock = app.requestSingleInstanceLock();
|
||||||
|
|
||||||
if (!isLock) {
|
if (!isLock) {
|
||||||
app.quit()
|
app.quit()
|
||||||
} else {
|
} else {
|
||||||
app.on('second-instance', (event, cmd, dir) => {
|
app.on('second-instance', (event, cmd, dir) => {
|
||||||
if (myWindow) {
|
if (myWindow) {
|
||||||
@ -119,13 +119,13 @@ if (!isLock) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
ipcMain.on('app_version', (event) => {
|
ipcMain.on('app_version', (event) => {
|
||||||
log.info(app.getVersion());
|
log.info(app.getVersion());
|
||||||
mainWindow.webContents.send('app_version', { version: app.getVersion() });
|
mainWindow.webContents.send('app_version', { version: app.getVersion() });
|
||||||
});
|
});
|
||||||
autoUpdater.on('update-available', () => {
|
autoUpdater.on('update-available', () => {
|
||||||
const n = new Notification({
|
const n = new Notification({
|
||||||
title: 'Update Available!',
|
title: 'Update Available!',
|
||||||
body: 'It will be downloaded in the background and installed after download.'
|
body: 'It will be downloaded ⌛️ in the background and installed after download.'
|
||||||
})
|
})
|
||||||
n.show();
|
n.show();
|
||||||
})
|
})
|
||||||
@ -139,9 +139,12 @@ if (!isLock) {
|
|||||||
autoUpdater.on('update-downloaded', () => {
|
autoUpdater.on('update-downloaded', () => {
|
||||||
const n = new Notification({
|
const n = new Notification({
|
||||||
title: 'Update Downloaded!',
|
title: 'Update Downloaded!',
|
||||||
body: 'Restarting to Update'
|
body: 'Restarting in 30 secounds to Update. Please finish your tasks!'
|
||||||
})
|
})
|
||||||
n.show();
|
setTimeout(() => {
|
||||||
|
n.show();
|
||||||
|
}, 30000);
|
||||||
autoUpdater.quitAndInstall();
|
autoUpdater.quitAndInstall();
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
10
package.json
10
package.json
@ -17,7 +17,7 @@
|
|||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "node server.js",
|
"dev": "node server.js",
|
||||||
"prebuild": "node -p \"'export const UI_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > qortal-ui-core/src/redux/app/version.js",
|
"prebuild": "node -p \"'export const UI_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > qortal-ui-core/src/redux/app/version.js",
|
||||||
"build-dev": "node build.js",
|
"build-dev": "node build.js",
|
||||||
"build": "NODE_ENV=production node build.js",
|
"build": "NODE_ENV=production node build.js",
|
||||||
"server": "NODE_ENV=production node server.js",
|
"server": "NODE_ENV=production node server.js",
|
||||||
@ -32,16 +32,16 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-updater": "4.3.9",
|
"electron-updater": "4.3.9",
|
||||||
"electron-log": "4.4.1"
|
"electron-log": "4.4.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "11.5.0",
|
"electron": "11.5.0",
|
||||||
"electron-builder": "22.14.5",
|
"electron-builder": "22.14.5",
|
||||||
"electron-notarize": "1.1.1",
|
"electron-notarize": "1.1.1",
|
||||||
"electron-packager": "15.4.0",
|
"electron-packager": "15.4.0",
|
||||||
"shelljs": "0.8.4"
|
"shelljs": "0.8.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.17.0"
|
"node": ">=14.17.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user