diff --git a/core/template/cdowntime/control/control.js b/core/template/cdowntime/control/control.js index f952b8a..cbfd37d 100644 --- a/core/template/cdowntime/control/control.js +++ b/core/template/cdowntime/control/control.js @@ -147,12 +147,12 @@ selectorLang.addEventListener('change', () => { }) timeData.addEventListener('change', () => { + test.textContent = `${timeData.value} [ ${new Date(timeData.value).getTime()} ]` socket.send(JSON.stringify({ action: 'changeTimeCdownTime', time: new Date(timeData.value).getTime(), classElement })) }) timezoneSelector.addEventListener('change', () => { socket.send(JSON.stringify({ action: 'changeTimezoneTime', timezone: timezoneSelector.value, classElement })) - window.location.reload() }) // Add an event listener to the main container diff --git a/package-lock.json b/package-lock.json index 7d47a78..1d509cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obs-timer-controller", - "version": "1.0.7", + "version": "1.0.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "obs-timer-controller", - "version": "1.0.7", + "version": "1.0.8", "license": "ISC", "dependencies": { "axios": "^1.5.1", diff --git a/package.json b/package.json index 0c1d72e..cfbaa26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obs-timer-controller", - "version": "1.0.7", + "version": "1.0.8", "description": "Handling browser sources for OBS related to timers and countdowns.", "main": "server.js", "repository": { @@ -24,9 +24,9 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "node": "node . test", - "pkg-win": "electron-packager . OBS-Timer-Controller --platform=win32 --arch=x64 --app-version=1.0.7 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"", - "pkg-linux": "electron-packager . OBS-Timer-Controller --platform=linux --arch=x64 --app-version=1.0.7 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"", - "pkg-mac": "electron-packager . OBS-Timer-Controller --platform=darwin --arch=x64 --app-version=1.0.7 --out=dist --overwrite --icon=icon.icns --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"", + "pkg-win": "electron-packager . OBS-Timer-Controller --platform=win32 --arch=x64 --app-version=1.0.8 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"", + "pkg-linux": "electron-packager . OBS-Timer-Controller --platform=linux --arch=x64 --app-version=1.0.8 --out=dist --overwrite --icon=icon.ico --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"", + "pkg-mac": "electron-packager . OBS-Timer-Controller --platform=darwin --arch=x64 --app-version=1.0.8 --out=dist --overwrite --icon=icon.icns --author=\"XtoManuel\" --description=\"Handling browser sources for OBS related to timers and countdowns.\"", "pkg-all": "npm run pkg-win && npm run pkg-linux" }, "author": "XtoManuel", diff --git a/server.js b/server.js index 57e74fc..975e4f0 100644 --- a/server.js +++ b/server.js @@ -98,7 +98,10 @@ const actions = { changeTimeCdown: (ws, data) => handleChangeTimeCdown(data), changeTimeCdownTime: (ws, data) => handleChangeTimeCdownTime(data), changeTimeExtensible: (ws, data) => handleChangeTimeExtensible(data), - changeTimezoneTime: (ws, data) => handleChangeTimezoneTime(data), + changeTimezoneTime: (ws, data) => { + handleChangeTimezoneTime(data) + sendToAllClients({ action: 'reload' }) + }, editMsg: (ws, data) => editMsg(data), checkboxStopAdd: (ws, data) => changeCheckboxStopAdd(data), checkboxPauseAdd: (ws, data) => changeCheckboxPauseAdd(data), @@ -114,7 +117,10 @@ const actions = { getVariables: (ws, data) => sendVariableData(ws, GlobalVariables, Config, data.classElement), createData: (ws, data) => createData(data), removeData: (ws, data) => removeData(data), - stopCode: () => stopCode() + stopCode: () => { + console.log('The code has stopped successfully') + process.exit() + } } function sendToAllClients (data) { @@ -292,11 +298,6 @@ function removeData (data) { saveVariablesToYAML(GlobalVariables) } -function stopCode () { - console.log('The code has stopped successfully') - process.exit() -} - // WebSocket connections handling wss.on('connection', (ws) => { ws.send(JSON.stringify({ fonts: fontOptions }))