mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 19:33:46 +00:00
small fixes + improvements
- open link in external browser - stop app from running after install - fix lowercase path - fix bug on file upload
This commit is contained in:
@@ -256,5 +256,7 @@ ipcMain.on('send-to-link', (event, arg) => {
|
||||
// send to help URL
|
||||
if (arg === 'help') {
|
||||
shell.openExternal('https://cpvalente.gitbook.io/ontime/');
|
||||
} else {
|
||||
shell.openExternal(arg);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
"createDesktopShortcut": true,
|
||||
"createStartMenuShortcut": true,
|
||||
"deleteAppDataOnUninstall": true,
|
||||
"runAfterFinish": false,
|
||||
"installerIcon": "icon.ico"
|
||||
},
|
||||
"files": [
|
||||
|
||||
@@ -29,7 +29,7 @@ export const initiateOSC = (config) => {
|
||||
if (address !== 'ontime') return;
|
||||
|
||||
// get second part (command)
|
||||
switch (path.toLocaleLowerCase()) {
|
||||
switch (path.toLowerCase()) {
|
||||
case 'start':
|
||||
case 'play':
|
||||
console.log('calling play');
|
||||
|
||||
@@ -120,8 +120,14 @@ const upload = async (file, req, res) => {
|
||||
deleteFile(file);
|
||||
|
||||
// check version
|
||||
if (uploadedJson.settings.version === 1) parsev1(uploadedJson);
|
||||
else {
|
||||
if (uploadedJson.settings.version === 1) {
|
||||
try {
|
||||
parsev1(uploadedJson);
|
||||
global.timer.setupWithEventList(db.data.events);
|
||||
} catch (error) {
|
||||
res.status(400).send({ message: `Error parsing file: ${error}` });
|
||||
}
|
||||
} else {
|
||||
res.status(400).send({ message: 'Error parsing file, version unknown' });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user