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