- fixed issue with faulty progress bar

- fixed issue with config-safe-states
This commit is contained in:
Sören Oesterwind 2023-08-09 15:25:29 +02:00
parent cec31d81f0
commit f32790706e
2 changed files with 14 additions and 11 deletions

View File

@ -46,6 +46,7 @@ const allowsURLs = [
];
let loadedData = {};
let dataToBeWritten = {}
loggy.log("Loading config", "info", "Config");
if (fs.existsSync("data-persistence.json")) {
@ -236,7 +237,7 @@ app.get("/api/v1/set/addMillisToTimer", function (req, res) {
app.get("/api/v1/set/relativAddMillisToTimer", function (req, res) {
currentState.timeAmountInital += parseInt(req.query.time);
currentState.timeAmountInital = parseInt(req.query.time) + parseInt(currentState.timeAmountInital);
currentState.countdownGoal = currentState.countdownGoal + parseInt(req.query.time);
// currentState.pauseMoment = new Date().getTime();
@ -305,7 +306,8 @@ app.get("/api/v1/set/progressbar/colors", function (req, res) {
try {
let data = req.query.colors;
if (req.query.isBase64 === "true") {
data = atob(data);
let buff = new Buffer(data, 'base64');
data = buff.toString('ascii');
}
currentState.colorSegments = JSON.parse(data);
if (req.query.persist === "true") {
@ -327,7 +329,8 @@ app.get("/api/v1/set/text/colors", function (req, res) {
} else {
let data = req.query.colors;
if (req.query.isBase64 === "true") {
data = atob(data);
let buff = new Buffer(data, 'base64');
let data = buff.toString('ascii');
}
console.debug(data);
currentState.textColors = JSON.parse(data);

View File

@ -10,26 +10,26 @@
"author": "TheGreydiamond",
"license": "LGPL-3.0",
"dependencies": {
"body-parser": "^1.20.1",
"bootstrap": "^5.2.2",
"body-parser": "^1.20.2",
"bootstrap": "^5.3.1",
"bootstrap-duration-picker": "^2.1.3",
"bootstrap-icons": "^1.10.1",
"bootstrap-icons": "^1.10.5",
"colors": "^1.4.0",
"darkreader": "^4.9.58",
"eta": "^1.12.3",
"eta": "^1.14.2",
"express": "^4.18.2",
"flatpickr": "^4.6.13",
"jquery": "^3.6.1",
"jquery": "^3.7.0",
"js-cookie": "^3.0.1",
"less": "^4.1.3",
"mdbootstrap": "^4.20.0",
"open": "^8.4.0",
"underscore": "^1.13.6",
"ws": "^8.11.0"
"ws": "^8.13.0"
},
"devDependencies": {
"electron": "^21.2.3",
"electron-builder": "^23.6.0"
"electron": "^25.4.0",
"electron-builder": "^24.6.3"
},
"build": {
"extraMetadata": {