mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
update + cleanup
- update electron - cleanup unused function calls - close websocket on process end - style fix on splash screen
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
||||||
}
|
}
|
||||||
.lds-ellipsis div:nth-child(1) {
|
.lds-ellipsis div:nth-child(1) {
|
||||||
|
left: 8px;
|
||||||
animation: lds-ellipsis1 0.6s infinite;
|
animation: lds-ellipsis1 0.6s infinite;
|
||||||
}
|
}
|
||||||
.lds-ellipsis div:nth-child(2) {
|
.lds-ellipsis div:nth-child(2) {
|
||||||
|
|||||||
+8
-4
@@ -10,11 +10,11 @@ const {
|
|||||||
Notification,
|
Notification,
|
||||||
} = require('electron');
|
} = require('electron');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { electron } = require('process');
|
|
||||||
|
|
||||||
const env = process.env.NODE_ENV || 'prod';
|
const env = process.env.NODE_ENV || 'prod';
|
||||||
|
|
||||||
let loaded = 'Nothing loaded';
|
let loaded = 'Nothing loaded';
|
||||||
|
let isQuitting = false;
|
||||||
|
|
||||||
const nodePath =
|
const nodePath =
|
||||||
env != 'prod'
|
env != 'prod'
|
||||||
@@ -173,9 +173,12 @@ app.whenReady().then(() => {
|
|||||||
// Hide on close
|
// Hide on close
|
||||||
win.on('close', function (event) {
|
win.on('close', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
showNotification('App running in background');
|
if (!isQuitting) {
|
||||||
win.hide();
|
showNotification('App running in background');
|
||||||
return false;
|
win.hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// create tray
|
// create tray
|
||||||
@@ -224,6 +227,7 @@ ipcMain.on('shutdown', (event, arg) => {
|
|||||||
await shutdown();
|
await shutdown();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
isQuitting = true;
|
||||||
tray.destroy();
|
tray.destroy();
|
||||||
win.destroy();
|
win.destroy();
|
||||||
app.quit();
|
app.quit();
|
||||||
|
|||||||
+8
-9
@@ -4,12 +4,12 @@
|
|||||||
"author": "Carlos Valente",
|
"author": "Carlos Valente",
|
||||||
"description": "Time keeping for live events",
|
"description": "Time keeping for live events",
|
||||||
"repository": "https://github.com/cpvalente/ontime",
|
"repository": "https://github.com/cpvalente/ontime",
|
||||||
"keywords": ["lighdev", "ontime"],
|
"keywords": [ "lighdev", "ontime", "timer" ],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^6.1.0",
|
"concurrently": "^6.1.0",
|
||||||
"electron": "^12.0.7",
|
"electron": "^13.1.2",
|
||||||
"electron-builder": "^22.11.3",
|
"electron-builder": "^22.11.3",
|
||||||
"eslint": "^7.26.0",
|
"eslint": "^7.26.0",
|
||||||
"eslint-config-airbnb": "^18.2.1",
|
"eslint-config-airbnb": "^18.2.1",
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
"eslint-plugin-react-hooks": "^4.2.0",
|
"eslint-plugin-react-hooks": "^4.2.0",
|
||||||
"eslint-plugin-simple-import-sort": "^7.0.0"
|
"eslint-plugin-simple-import-sort": "^7.0.0"
|
||||||
},
|
},
|
||||||
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"nodestart": "NODE_ENV=development node app.js",
|
"nodestart": "NODE_ENV=development node app.js",
|
||||||
"start": "NODE_ENV=development electron .",
|
"start": "NODE_ENV=development electron .",
|
||||||
@@ -35,12 +34,12 @@
|
|||||||
"category": "your.app.category.type"
|
"category": "your.app.category.type"
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
"target": "nsis"
|
"target": "nsis"
|
||||||
},
|
},
|
||||||
"nsis": {
|
"nsis": {
|
||||||
"createDesktopShortcut": true,
|
"createDesktopShortcut": true,
|
||||||
"createStartMenuShortcut": true,
|
"createStartMenuShortcut": true,
|
||||||
"deleteAppDataOnUninstall": true,
|
"deleteAppDataOnUninstall": true,
|
||||||
"installerIcon": "icon.ico"
|
"installerIcon": "icon.ico"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
@@ -48,8 +47,8 @@
|
|||||||
"assets/"
|
"assets/"
|
||||||
],
|
],
|
||||||
"directories": {
|
"directories": {
|
||||||
"buildResources": "./assets/"
|
"buildResources": "./assets/"
|
||||||
},
|
},
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
{
|
{
|
||||||
"from": "../client/build",
|
"from": "../client/build",
|
||||||
|
|||||||
@@ -128,4 +128,7 @@ export const shutdown = () => {
|
|||||||
// shutdown OSC Server
|
// shutdown OSC Server
|
||||||
shutdownOSCServer();
|
shutdownOSCServer();
|
||||||
// shutdown OSC Client
|
// shutdown OSC Client
|
||||||
|
|
||||||
|
// shutdown timer
|
||||||
|
global.timer.shutdown();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,6 +81,14 @@ export class EventTimer extends Timer {
|
|||||||
this._listenToConnections();
|
this._listenToConnections();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Shutdown process
|
||||||
|
*/
|
||||||
|
shutdown() {
|
||||||
|
console.log('Closing socket server');
|
||||||
|
this.io.close();
|
||||||
|
}
|
||||||
|
|
||||||
// send current timer
|
// send current timer
|
||||||
broadcastTimer() {
|
broadcastTimer() {
|
||||||
this.io.emit('timer', this.getObject());
|
this.io.emit('timer', this.getObject());
|
||||||
|
|||||||
+4
-4
@@ -920,10 +920,10 @@ electron-publish@22.11.5:
|
|||||||
lazy-val "^1.0.5"
|
lazy-val "^1.0.5"
|
||||||
mime "^2.5.2"
|
mime "^2.5.2"
|
||||||
|
|
||||||
electron@^12.0.7:
|
electron@^13.1.2:
|
||||||
version "12.0.10"
|
version "13.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-12.0.10.tgz#d0879ff005a200d5b08dbfb3e5bbea744d38c71a"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-13.1.2.tgz#8c9abf9015766c9cbc16f10c99282d00d6ae1b90"
|
||||||
integrity sha512-qaNvFG4AgeuT3PkSljQ9MlY7hz87wIwJ5cmSZ1453IVsUd0BV7pcaLViSpR1bRSqxetDDWxCLtCp0N9RXeDZww==
|
integrity sha512-aNT9t+LgdQaZ7FgN36pN7MjSEoj+EWc2T9yuOqBApbmR4HavGRadSz7u9N2Erw2ojdIXtei2RVIAvVm8mbDZ0g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.0.1"
|
"@electron/get" "^1.0.1"
|
||||||
"@types/node" "^14.6.2"
|
"@types/node" "^14.6.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user