mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-04-17 16:45:54 +00:00
UI shortcut on desktop restore app from tray if the app is already running
This commit is contained in:
parent
d15b2f7e57
commit
746d8a4873
13
electron.js
13
electron.js
@ -120,9 +120,16 @@ const isLock = app.requestSingleInstanceLock()
|
|||||||
if (!isLock) {
|
if (!isLock) {
|
||||||
app.quit()
|
app.quit()
|
||||||
} else {
|
} else {
|
||||||
|
app.on('second-instance', (event, commandLine, workingDirectory) => {
|
||||||
|
if (myWindow) {
|
||||||
|
if (myWindow.isMinimized())
|
||||||
|
myWindow.maximize()
|
||||||
|
myWindow.show()
|
||||||
|
}
|
||||||
|
})
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
createWindow();
|
createWindow()
|
||||||
createTray();
|
createTray()
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
app.setAppUserModelId("org.qortal.QortalUI")
|
app.setAppUserModelId("org.qortal.QortalUI")
|
||||||
}
|
}
|
||||||
@ -143,7 +150,7 @@ 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', (event) => {
|
autoUpdater.on('update-available', (event) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user