Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d4bb6113c | ||
|
|
136120b831 | ||
|
|
cd299c06d6 |
@@ -6,6 +6,12 @@ The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1
|
|||||||
|
|
||||||
Every Agent version includes the most recent firmware version. See the [firmware changelog](https://github.com/UltimateHackingKeyboard/firmware/blob/master/CHANGELOG.md).
|
Every Agent version includes the most recent firmware version. See the [firmware changelog](https://github.com/UltimateHackingKeyboard/firmware/blob/master/CHANGELOG.md).
|
||||||
|
|
||||||
|
## [1.1.5] - 2018-04-10
|
||||||
|
|
||||||
|
Firmware: 8.1.5 [[release](https://github.com/UltimateHackingKeyboard/firmware/releases/tag/v8.1.5)] | Device Protocol: 4.2.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|
||||||
|
- Don't allow to run multiple instances of Agent at the same time, but rather focus the already existing Agent window.
|
||||||
|
|
||||||
## [1.1.4] - 2018-04-09
|
## [1.1.4] - 2018-04-09
|
||||||
|
|
||||||
Firmware: 8.1.5 [[release](https://github.com/UltimateHackingKeyboard/firmware/releases/tag/v8.1.5)] | Device Protocol: 4.2.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
Firmware: 8.1.5 [[release](https://github.com/UltimateHackingKeyboard/firmware/releases/tag/v8.1.5)] | Device Protocol: 4.2.0 | User Config: 4.0.0 | Hardware Config: 1.0.0
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"author": "Ultimate Gadget Laboratories",
|
"author": "Ultimate Gadget Laboratories",
|
||||||
"main": "electron/dist/electron-main.js",
|
"main": "electron/dist/electron-main.js",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"firmwareVersion": "8.1.5",
|
"firmwareVersion": "8.1.5",
|
||||||
"deviceProtocolVersion": "4.2.0",
|
"deviceProtocolVersion": "4.2.0",
|
||||||
"userConfigVersion": "4.0.0",
|
"userConfigVersion": "4.0.0",
|
||||||
|
|||||||
@@ -60,7 +60,25 @@ if (console.debug) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isSecondInstance = app.makeSingleInstance(function (commandLine, workingDirectory) {
|
||||||
|
// Someone tried to run a second instance, we should focus our window.
|
||||||
|
if (win) {
|
||||||
|
if (win.isMinimized()) {
|
||||||
|
win.restore();
|
||||||
|
}
|
||||||
|
win.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isSecondInstance) {
|
||||||
|
app.quit();
|
||||||
|
}
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
|
if (isSecondInstance) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
logger.info('[Electron Main] Create new window.');
|
logger.info('[Electron Main] Create new window.');
|
||||||
let packagesDir;
|
let packagesDir;
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
@@ -133,13 +151,13 @@ app.on('ready', createWindow);
|
|||||||
|
|
||||||
// Quit when all windows are closed.
|
// Quit when all windows are closed.
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
app.quit();
|
|
||||||
});
|
|
||||||
|
|
||||||
app.on('will-quit', () => {
|
|
||||||
if (appUpdateService) {
|
if (appUpdateService) {
|
||||||
appUpdateService.saveFirtsRun();
|
appUpdateService.saveFirtsRun();
|
||||||
}
|
}
|
||||||
|
app.exit();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on('will-quit', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.on('activate', () => {
|
app.on('activate', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user