20 Commits

Author SHA1 Message Date
a2106f01b1 Merge pull request 'Porintg more fixes' (#4) from language into master
Reviewed-on: #4
2022-07-13 18:27:54 +02:00
22de906767 - add a build command
- fix an error in swagger doc
2022-07-13 18:26:50 +02:00
fcc2172f1f fixing config.json not existing causing a crash 2022-07-13 18:24:17 +02:00
ffcd716038 Merge pull request 'Porting a fix from a wrong branch to main' (#3) from language into master 2022-07-13 18:19:52 +02:00
0ae35590f4 fix progressbar not disappearing 2022-07-12 22:15:27 +02:00
7106bef0bf Add multilanguage support
Reviewed-on: #2
2022-05-12 21:03:13 +02:00
f3bcf63860 Add language settings in UI 2022-05-12 21:01:49 +02:00
c201d6b2e1 fixed german 2022-05-12 17:40:44 +02:00
b790c6ff80 More language support 2022-05-10 21:49:08 +02:00
0b3df97975 work on translation system 2022-04-06 22:17:55 +02:00
3b99939ef3 add logging system 2022-03-30 16:16:59 +02:00
d04998d613 Merge branch 'ui-rework' 2022-03-28 22:15:40 +02:00
292cdebecb clean readme 2022-03-28 22:14:33 +02:00
7e8f3f902a remove unused debug output 2022-03-28 22:12:04 +02:00
104c52b575 - add countdown to function
- small cleanup
2022-03-28 22:11:12 +02:00
7dbe7ed6b1 - make the open buttons float right 2022-03-27 16:41:40 +02:00
da0d79e8ed - reworked admin interface layout
- fixed custom time value entry
- sidebar toggablity
- added links for countdown view
- added helper tooltips
2022-03-27 15:19:23 +02:00
f70bd4e540 Add vscode debug config. 2022-03-27 13:52:24 +02:00
a7b5980a89 - remove old admin interface
- introduce 404 page
- fix chrome display bug
- fixed about not showing version
- removed unused dependecies
- removed dead code from interface.js
- moved layout to dedicated page
2022-03-27 13:50:24 +02:00
ee52bc0482 License in package.json 2022-03-11 08:09:53 +01:00
29 changed files with 1397 additions and 357 deletions

7
.gitignore vendored
View File

@ -1,3 +1,10 @@
node_modules
rename.sh
data-persistence.json
log-journal.json
config.json
log-journal.json
bom.json
log-journal.json
openCountdown
openCountdown.exe

17
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/index.js"
}
]
}

View File

@ -1,5 +1,5 @@
# openCountdown
# ToDo
- [ ] Improve duration picker in table view
- [P] Endpoint docs
- [ ] Better WS frames

1
build.ssh Normal file
View File

@ -0,0 +1 @@
nexe index.js --build --python python3 --resource "./static/*" --resource "./templates/*"

View File

@ -170,7 +170,7 @@ paths:
operationId: "textEnableColoring"
parameters:
- in: path
name: "show"
name: "enable"
required: true
type: boolean
description: "If true the timer will change color by value, else the timer stays white."

View File

@ -29,4 +29,27 @@ function wrapBooleanConverter(stringBoolean, res) {
}
}
module.exports = { convertStringBooleanToBoolean, wrapBooleanConverter };
/**
* Tries to parse a string to a JSON object. Returns false if invalid. Taken from https://stackoverflow.com/a/20392392/11317151
* @param {String} jsonString A JSON String to parse
* @returns {Object/Boolean} JSON Object if valid or false otherwise
*/
function tryToParseJson(jsonString) {
try {
var o = JSON.parse(jsonString);
// Handle non-exception-throwing cases:
// Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking,
// but... JSON.parse(null) returns null, and typeof null === "object",
// so we must check for that, too. Thankfully, null is falsey, so this suffices:
if (o && typeof o === "object") {
return o;
}
}
catch (e) { }
return false;
}
module.exports = { convertStringBooleanToBoolean, wrapBooleanConverter, tryToParseJson };

168
index.js
View File

@ -3,13 +3,19 @@ const fs = require("fs");
const bodyParser = require("body-parser");
const ws = require('ws');
const helper = require("./helpers.js");
const loggy = require("./logging")
const Eta = require("eta");
const _ = require("underscore")
console.log("Preparing server...");
loggy.init(true)
loggy.log("Preparing server", "info", "Server");
const app = express();
loggy.log("Preparing static routes", "info", "Server");
app.use(express.static("static"));
app.use(express.static("node_modules"));
loggy.log("Preparing middlewares", "info", "Server");
app.use(bodyParser.json());
app.use(
bodyParser.urlencoded({
@ -20,6 +26,7 @@ app.use(
let loadedData = {}
loggy.log("Loading config", "info", "Config");
if (fs.existsSync("data-persistence.json")) {
const loadedDataRaw = fs.readFileSync("data-persistence.json", "utf8");
loadedData = JSON.parse(loadedDataRaw);
@ -45,16 +52,38 @@ currentState = {
srvTime: 0,
enableColoredText: true,
debug: false,
sessionToken: Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15),
sessionToken: Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15)
};
const dataToBeWritten = {};
let configObject = {
language: "en_uk"
}
if(!fs.existsSync("config.json")) {
fs.writeFileSync("config.json", "{}");
}
const tempJsonText = JSON.parse(fs.readFileSync("config.json", "utf8"));
configObject = _.extend(configObject, tempJsonText);
fs.writeFileSync("config.json", JSON.stringify(configObject));
currentState = Object.assign({}, currentState, loadedData);
currentState.textColors = currentState.colorSegments
loggy.log("Searching for languages", "info", "Language")
const languagesRaw = fs.readdirSync("./lang");
const languages = [];
for (let i = 0; i < languagesRaw.length; i++) {
if (languagesRaw[i].endsWith(".json")) {
languages.push(languagesRaw[i].replace(".json", ""));
}
}
loggy.log("Found " + languages.length + " languages", "info", "Language")
loggy.log("Reading language file", "info", "Language")
let languageProfile = JSON.parse(fs.readFileSync("lang/" + configObject.language + ".json", "utf8"));
loggy.log("Preparing websocket", "info", "Websocket");
const wsServer = new ws.Server({ noServer: true });
wsServer.on('connection', socket => {
socket.on('message', function incoming(data) {
@ -81,18 +110,29 @@ function updatedData() {
setTimeout(updatedData, 5000);
}
console.log("Preparing routes...");
loggy.log("Preparing routes", "info", "Server");
app.get("/", function (req, res) {
const data = fs.readFileSync("templates/newAdminPanel.html", "utf8");
res.send(data);
try {
res.send(
Eta.render(data, {
lang: languageProfile,
additional: {
languages: languages
}
}));
} catch (e) {
loggy.log("Error rendering template", "error", "Server");
const dataN = fs.readFileSync("templates/brokenTranslation.html", "utf8");
res.send(
Eta.render(dataN, {
additional: {
languages: languages
}
}));
}
});
app.get("/old", function (req, res) {
const data = fs.readFileSync("templates/adminPanel.html", "utf8");
res.send(data);
});
app.get("/timer", function (req, res) {
const data = fs.readFileSync("templates/timerPage.html", "utf8");
res.send(data);
@ -104,6 +144,8 @@ app.get("/api/v1/data", function (req, res) {
});
app.get("/api/v1/system", function (req, res) {
const tempPkgFile = fs.readFileSync("package.json", "utf8");
const tempPkgObj = JSON.parse(tempPkgFile);
const systemData = {
uptime: process.uptime(),
memoryUsage: process.memoryUsage(),
@ -118,6 +160,7 @@ app.get("/api/v1/system", function (req, res) {
nodeEnv: process.env,
nodeConfig: process.config,
nodeTitle: process.title,
systemVersion: tempPkgObj.version
}
res.json(systemData);
});
@ -298,9 +341,97 @@ app.get("/api/v1/storage/delete", function (req, res) {
updatedData()
});
// UI Routes
// Returns an object containg all available languages
app.get("/api/ui/v1/lang/list", function handleLangList(req, res){
const tempRespObject = {
status: "ok",
languages: languages
}
res.json(tempRespObject);
})
app.get("/api/ui/v1/lang/set", function (req, res) {
if(req.query.lang == undefined || req.query.lang == ""){
res.json({ status: "error", reason: "Missing language" });
return;
}
const testLang = req.query.lang;
loggy.log("Reloading language file", "info", "Language")
if(!fs.existsSync("lang/" + testLang + ".json")){
loggy.log("Language reload failed, file does not exist", "error", "Language")
res.status(500).json({ status: "error", reason: "Language file not found" });
return
}
const tempLang = fs.readFileSync("lang/" + testLang + ".json", "utf8");
const tempLangObj = helper.tryToParseJson(tempLang);
if(!tempLangObj){
loggy.log("Language reload failed, file is not valid", "error", "Language")
res.status(500).json({ status: "error", reason: "Language file is not valid" });
return
}
if(tempLangObj._metadata == undefined){
loggy.log("Language reload failed, file is not valid, metadata missing", "error", "Language")
res.status(500).json({ status: "error", reason: "Language file is not valid" });
return
}
loggy.log("Language reloaded, loaded " + tempLangObj._metadata.lang + "@" + tempLangObj._metadata.version, "info", "Language")
configObject.language = req.query.lang;
languageProfile = tempLangObj;
res.status(200).json({ status: "ok" });
fs.writeFileSync("config.json", JSON.stringify(configObject));
});
app.use(function (req, res, next) {
res.status(404);
loggy.log("Server responded with 404 error", "warn", "Server", true);
// respond with html page
if (req.accepts('html')) {
const data = fs.readFileSync("templates/errorPages/404.html", "utf8");
res.status(404)
res.send(data);
return;
}
// respond with json
if (req.accepts('json')) {
res.json({ error: 'Not found' });
return;
}
// default to plain-text. send()
res.type('txt').send('Not found');
});
/*app.use(function(err, req, res, next) {
console.error(err.stack);
if(String(err.stack).includes("TypeError: Cannot read properties of undefined")) {
const data = fs.readFileSync("templates/brokenTranslation.html", "utf8");
res.send(data);
}else{
res.status(500).send('Something broke!');
}
});*/
loggy.log("Starting server", "info", "Server");
const port = 3005;
process.on('SIGINT', function () {
loggy.log("Caught interrupt signal and shutting down gracefully", "info", "Shutdown");
server.close(); // Make the express server stop
loggy.log("Goodbye! 👋", "magic", "Shutdown", true)
loggy.close(); // Close and write log
process.exit(); // Quit the application
});
console.log("Starting server...");
const port = 3006
const server = app.listen(port);
server.on('upgrade', (request, socket, head) => {
wsServer.handleUpgrade(request, socket, head, socket => {
@ -309,7 +440,8 @@ server.on('upgrade', (request, socket, head) => {
});
console.info("Server running on port " + port);
console.info("Visit localhost:" + port + "/timer for the timer page");
console.info("Visit localhost:" + port + " for the admin page");
loggy.log("=======================", "info", "", true);
loggy.log("Server running on port " + port, "magic", "", true);
loggy.log("Visit http://localhost:" + port + "/timer for the timer view", "magic", "", true);
loggy.log("Visit http://localhost:" + port + " for the admin view", "magic", "", true);
loggy.log("=======================", "info", "", true);

69
lang/de_de.json Normal file
View File

@ -0,0 +1,69 @@
{
"titles": {
"home": "Startseite",
"preview": "Vorschau",
"mode": "Modus",
"messaging": "Nachrichten",
"countdownToTime": "Auf Uhrzeit runterzählen",
"attention": "Achtung",
"hostinfo": "Host Informationen"
},
"sidebar": {
"home": "Startseite",
"settings": "Einstellungen",
"debug": "Debug",
"about": "Über"
},
"hints":
{
"previewHint": "Eine Vorschau der Timeransicht.",
"modeHint": "",
"messagingHint": "Zeigt eine Nachricht auf der Timeransicht an.",
"copyHint": "Kopiert den Link zu der Countdown-Seite.",
"openInNewTab": "Öffnet den Link in einem neuen Tab.",
"selectMode": "Wählt einen Modus für die Timeransicht."
},
"placeholders": {
"msgHere": "Message here"
},
"others":
{
"timer": "Timer",
"clock": "Uhr",
"black": "Schwarz",
"test": "Testbild"
},
"labels":
{
"clockOnTimer": "Zeigt die Uhrzeit auf dem Timer:",
"showMillis": "Zeigt Millisekunden auf dem Timer:",
"showProgress": "Zeige Fortschrittsbalken:",
"progbarColors": "Fortschrittsbalken Farben",
"time": "Zeit",
"color": "Farbe",
"remove": "Entfernen",
"enableTextClrs": "Text Farben aktivieren:",
"textClrs": "Text Farben",
"addRow": "Neue Zeile",
"timeVar": "Aktiviere zeitabweichungs display:"
},
"untis":
{
"seconds": "Sekunden",
"minutes": "Minutes",
"hours": "Stunden",
"days": "Tage",
"weeks": "Wochen",
"months": "Monate",
"years": "Jahre"
},
"informationTexts": {
"debugInfo": "Das hier ist eine debug seite welche nur von professionellen Personen verwendet werden sollte. ",
"proceedCaution": "Gehen Sie vorsichtig vor."
},
"_metadata": {
"lang": "de",
"version": "1.0.0",
"authors": ["TheGreydiamond"]
}
}

72
lang/en_uk.json Normal file
View File

@ -0,0 +1,72 @@
{
"titles": {
"home": "Homepage",
"preview": "Preview",
"mode": "Mode",
"messaging": "Messaging",
"countdownToTime": "Countdown to time",
"attention": "Attention",
"hostinfo": "Host information",
"uiSettings": "UI settings"
},
"sidebar": {
"home": "Home",
"settings": "Settings",
"debug": "Debug",
"about": "About"
},
"hints":
{
"previewHint": "A preview of what is currently visible on the countdown view",
"modeHint": "",
"messagingHint": "Shows a given message on the timer view",
"copyHint": "Copies the link to the timer view",
"openInNewTab": "Open the countdown view in a new tab",
"selectMode": "Select what to show on the countdown view"
},
"placeholders": {
"msgHere": "Message here"
},
"others":
{
"timer": "Timer",
"clock": "Clock",
"black": "Black",
"test": "Testimage"
},
"labels":
{
"clockOnTimer": "Show clock on Timer:",
"showMillis": "Show Milliseconds on Timer:",
"showProgress": "Show progressbar:",
"progbarColors": "Progressbar Colors",
"time": "Time",
"color": "Color",
"remove": "Remove",
"enableTextClrs": "Enable Text Colours:",
"textClrs": "Text Colours",
"addRow": "Add Row",
"timeVar": "Enable time variance display:",
"language": "Select a language",
"apply": "Apply"
},
"untis":
{
"seconds": "Seconds",
"minutes": "Minutes",
"hours": "Hours",
"days": "Days",
"weeks": "Weeks",
"months": "Months",
"years": "Years"
},
"informationTexts": {
"debugInfo": "This is a debug page which should only be used by professionals. Changing any options below might impact operation.",
"proceedCaution": "Proceed with caution."
},
"_metadata": {
"lang": "en",
"version": "1.0.0",
"authors": ["TheGreydiamond"]
}
}

70
lang/proto_black.json Normal file
View File

@ -0,0 +1,70 @@
{
"titles": {
"home": "████████",
"preview": "██████",
"mode": "████",
"messaging": "█████████",
"countdownToTime": "█████████ ██ ████",
"attention": "███████████",
"hostinfo": "████ █████████"
},
"sidebar": {
"home": "████",
"settings": "████████",
"debug": "█████",
"about": "█████"
},
"hints":
{
"previewHint": "█ ████ ███████ ████",
"modeHint": "",
"messagingHint": "████ █ ██████ ██ █████",
"copyHint": "██████ ███ ████ ██ ███ █████ ████",
"openInNewTab": "████ ███ ████████ ████ █ █ ███ ███",
"selectMode": "█████ ████ ██ ████ ██ ███ ████████ ████"
},
"placeholders": {
"msgHere": "██████ ████"
},
"others":
{
"timer": "████",
"clock": "█████",
"black": "████",
"test": "███████"
},
"labels":
{
"clockOnTimer": "████ █████ ██ █████:",
"showMillis": "████ ███████████ ██ █████:",
"showProgress": "████ █████████:",
"progbarColors": "████████ ████",
"time": "████",
"color": "█████",
"remove": "██████",
"enableTextClrs": "██████ ████ ███████:",
"textClrs": "████ ██████",
"addRow": "███ ███",
"timeVar": "██████ ████ ███████ ███████:"
},
"untis":
{
"seconds": "Seconds",
"minutes": "Minutes",
"hours": "Hours",
"days": "Days",
"weeks": "Weeks",
"months": "Months",
"years": "Years"
},
"informationTexts": {
"debugInfo": "████ ██ █ █████ ████ █████ █████ ████ ██ ████ ██ ██████████. ████████ ███ ██████ █████ █████ █████ ██████.",
"proceedCaution": "█████ ████ ███████."
},
"_metadata": {
"lang": "none",
"version": "1.0.0",
"authors": ["TheGreydiamond"],
"comment": "A test language without proper text and only black blocks. █"
}
}

1
log-journal.json Normal file
View File

@ -0,0 +1 @@
[{"timestamp":"2022-07-12 18:45:39.044","level":"info","module":"Logging","message":"2022-07-12 18:45:39.044 [info] [Logging] Logging initialized"},{"timestamp":"2022-07-12 18:45:39.046","level":"info","module":"Server","message":"2022-07-12 18:45:39.046 [info] [Server] Preparing server"},{"timestamp":"2022-07-12 18:45:39.047","level":"info","module":"Server","message":"2022-07-12 18:45:39.047 [info] [Server] Preparing static routes"},{"timestamp":"2022-07-12 18:45:39.048","level":"info","module":"Server","message":"2022-07-12 18:45:39.048 [info] [Server] Preparing middlewares"},{"timestamp":"2022-07-12 18:45:39.049","level":"info","module":"Config","message":"2022-07-12 18:45:39.049 [info] [Config] Loading config"},{"timestamp":"2022-07-12 18:45:39.052","level":"info","module":"Language","message":"2022-07-12 18:45:39.052 [info] [Language] Searching for languages"},{"timestamp":"2022-07-12 18:45:39.053","level":"info","module":"Language","message":"2022-07-12 18:45:39.053 [info] [Language] Found 3 languages"},{"timestamp":"2022-07-12 18:45:39.053","level":"info","module":"Language","message":"2022-07-12 18:45:39.053 [info] [Language] Reading language file"},{"timestamp":"2022-07-12 18:45:39.053","level":"info","module":"Websocket","message":"2022-07-12 18:45:39.053 [info] [Websocket] Preparing websocket"},{"timestamp":"2022-07-12 18:45:39.054","level":"info","module":"Server","message":"2022-07-12 18:45:39.054 [info] [Server] Preparing routes"},{"timestamp":"2022-07-12 18:45:39.055","level":"info","module":"Server","message":"2022-07-12 18:45:39.055 [info] [Server] Starting server"},{"timestamp":"2022-07-12 18:54:44.820","level":"info","module":"Language","message":"2022-07-12 18:54:44.820 [info] [Language] Reloading language file"},{"timestamp":"2022-07-12 18:54:44.823","level":"info","module":"Language","message":"2022-07-12 18:54:44.823 [info] [Language] Language reloaded, loaded en@1.0.0"},{"timestamp":"2022-07-12 18:54:48.364","level":"info","module":"Language","message":"2022-07-12 18:54:48.364 [info] [Language] Reloading language file"},{"timestamp":"2022-07-12 18:54:48.365","level":"info","module":"Language","message":"2022-07-12 18:54:48.365 [info] [Language] Language reloaded, loaded none@1.0.0"},{"timestamp":"2022-07-12 18:54:53.171","level":"info","module":"Language","message":"2022-07-12 18:54:53.171 [info] [Language] Reloading language file"},{"timestamp":"2022-07-12 18:54:53.172","level":"info","module":"Language","message":"2022-07-12 18:54:53.172 [info] [Language] Language reloaded, loaded en@1.0.0"},{"timestamp":"2022-07-12 19:47:47.709","level":"info","module":"Shutdown","message":"2022-07-12 19:47:47.709 [info] [Shutdown] Caught interrupt signal and shutting down gracefully"}]

61
logging.js Normal file
View File

@ -0,0 +1,61 @@
const colors = require('colors');
const util = require('util')
const fs = require('fs');
let logToFileJson = false;
let logJournal = [];
function init(logToFile = false) {
logToFileJson = logToFile;
log("Logging initialized", "info", "Logging");
}
function close(){
if(logToFileJson){
const tempString = JSON.stringify(logJournal);
try {
fs.writeFileSync("log-journal.json", tempString);
} catch (error) {
log("Error while closing log file: " + error, "error", "Logging");
}
}
log("Saved log", "info", "Logging");
}
/**
* A simple logging function
* @param {String} message A messaged to be logged
* @param {String} level Logleve, may either be warn, error, magic or info
* @param {String} module Kinda the source
*/
function log(message, level, module, ignore = false) {
if (level == undefined) {
level = "info";
}
if (module == undefined) {
module = "Unknown";
}
if(String(message) == "[object Object]"){
message = util.inspect(message, false, null, false);
}
const timestamp = new Date().toISOString().replace("T", " ").replace("Z", "");
var message = timestamp + " [" + String(level) + "] " + " [" + String(module) + "] " + String(message);
if (level == "warn") {
console.warn(message.yellow);
} else if (level == "error") {
console.error(message.red);
} else if (level == "magic") {
console.error(message.magenta);
} else if (level == "info") {
console.info(message.white);
} else {
console.log(message.gray);
}
if(logToFileJson && ignore == false){
jsonObject = {timestamp: timestamp, level: level, module: module, message: message};
logJournal.push(jsonObject);
}
}
module.exports = { log, init, close};

301
package-lock.json generated
View File

@ -1,25 +1,28 @@
{
"name": "opencountdown",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "opencountdown",
"version": "1.0.0",
"version": "1.0.1",
"license": "LGPL-3.0",
"dependencies": {
"body-parser": "^1.19.2",
"bootstrap": "^5.1.3",
"bootstrap-duration-picker": "^2.1.3",
"bootstrap-icons": "^1.8.1",
"countdown": "^2.6.0",
"colors": "^1.4.0",
"darkreader": "^4.9.44",
"eta": "^1.12.3",
"express": "^4.17.3",
"flatpickr": "^4.6.11",
"jquery": "^3.6.0",
"js-cookie": "^3.0.1",
"less": "^3.13",
"mdbootstrap": "^4.20.0",
"moment": "^2.29.1",
"underscore": "^1.13.3",
"ws": "^8.5.0"
}
},
@ -103,6 +106,14 @@
"node": ">= 0.8"
}
},
"node_modules/colors": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"engines": {
"node": ">=0.1.90"
}
},
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@ -135,10 +146,16 @@
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"node_modules/countdown": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/countdown/-/countdown-2.6.0.tgz",
"integrity": "sha1-Z3+446nUzE52QVkBuiU7UYrzQXc="
"node_modules/copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dependencies": {
"is-what": "^3.14.1"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/darkreader": {
"version": "4.9.44",
@ -183,11 +200,34 @@
"node": ">= 0.8"
}
},
"node_modules/errno": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"optional": true,
"dependencies": {
"prr": "~1.0.1"
},
"bin": {
"errno": "cli.js"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"node_modules/eta": {
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/eta/-/eta-1.12.3.tgz",
"integrity": "sha512-qHixwbDLtekO/d51Yr4glcaUJCIjGVJyTzuqV4GPlgZo1YpgOKG+avQynErZIYrfM6JIJdtiG2Kox8tbb+DoGg==",
"engines": {
"node": ">=6.0.0"
},
"funding": {
"url": "https://github.com/eta-dev/eta?sponsor=1"
}
},
"node_modules/etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
@ -253,6 +293,11 @@
"node": ">= 0.8"
}
},
"node_modules/flatpickr": {
"version": "4.6.11",
"resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.11.tgz",
"integrity": "sha512-/rnbE/hu5I5zndLEyYfYvqE4vPDvI5At0lFcQA5eOPfjquZLcQ0HMKTL7rv5/+DvbPM3/vJcXpXjB/DjBh+1jw=="
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@ -269,6 +314,12 @@
"node": ">= 0.6"
}
},
"node_modules/graceful-fs": {
"version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
"optional": true
},
"node_modules/http-errors": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
@ -295,6 +346,18 @@
"node": ">=0.10.0"
}
},
"node_modules/image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"optional": true,
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
@ -308,6 +371,11 @@
"node": ">= 0.10"
}
},
"node_modules/is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA=="
},
"node_modules/jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
@ -321,6 +389,43 @@
"node": ">=12"
}
},
"node_modules/less": {
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz",
"integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==",
"dependencies": {
"copy-anything": "^2.0.1",
"tslib": "^1.10.0"
},
"bin": {
"lessc": "bin/lessc"
},
"engines": {
"node": ">=6"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"native-request": "^1.0.5",
"source-map": "~0.6.0"
}
},
"node_modules/make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"optional": true,
"dependencies": {
"pify": "^4.0.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/mdbootstrap": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/mdbootstrap/-/mdbootstrap-4.20.0.tgz",
@ -377,19 +482,17 @@
"node": ">= 0.6"
}
},
"node_modules/moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
"engines": {
"node": "*"
}
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node_modules/native-request": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/native-request/-/native-request-1.1.0.tgz",
"integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==",
"optional": true
},
"node_modules/negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
@ -422,6 +525,15 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"optional": true,
"engines": {
"node": ">=6"
}
},
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@ -434,6 +546,12 @@
"node": ">= 0.10"
}
},
"node_modules/prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"optional": true
},
"node_modules/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz",
@ -491,6 +609,15 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"optional": true,
"bin": {
"semver": "bin/semver"
}
},
"node_modules/send": {
"version": "0.17.2",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
@ -538,6 +665,15 @@
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
@ -554,6 +690,11 @@
"node": ">=0.6"
}
},
"node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@ -566,6 +707,11 @@
"node": ">= 0.6"
}
},
"node_modules/underscore": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.3.tgz",
"integrity": "sha512-QvjkYpiD+dJJraRA8+dGAU4i7aBbb2s0S3jA45TFOvg2VgqvdCDd/3N6CqA8gluk1W91GLoXg5enMUx560QzuA=="
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@ -670,6 +816,11 @@
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
},
"colors": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA=="
},
"content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@ -693,10 +844,13 @@
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"countdown": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/countdown/-/countdown-2.6.0.tgz",
"integrity": "sha1-Z3+446nUzE52QVkBuiU7UYrzQXc="
"copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"requires": {
"is-what": "^3.14.1"
}
},
"darkreader": {
"version": "4.9.44",
@ -731,11 +885,25 @@
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
},
"errno": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"optional": true,
"requires": {
"prr": "~1.0.1"
}
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"eta": {
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/eta/-/eta-1.12.3.tgz",
"integrity": "sha512-qHixwbDLtekO/d51Yr4glcaUJCIjGVJyTzuqV4GPlgZo1YpgOKG+avQynErZIYrfM6JIJdtiG2Kox8tbb+DoGg=="
},
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
@ -792,6 +960,11 @@
"unpipe": "~1.0.0"
}
},
"flatpickr": {
"version": "4.6.11",
"resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.11.tgz",
"integrity": "sha512-/rnbE/hu5I5zndLEyYfYvqE4vPDvI5At0lFcQA5eOPfjquZLcQ0HMKTL7rv5/+DvbPM3/vJcXpXjB/DjBh+1jw=="
},
"forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@ -802,6 +975,12 @@
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"graceful-fs": {
"version": "4.2.9",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
"optional": true
},
"http-errors": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
@ -822,6 +1001,12 @@
"safer-buffer": ">= 2.1.2 < 3"
}
},
"image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"optional": true
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
@ -832,6 +1017,11 @@
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
},
"is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA=="
},
"jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
@ -842,6 +1032,32 @@
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
},
"less": {
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz",
"integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==",
"requires": {
"copy-anything": "^2.0.1",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"native-request": "^1.0.5",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
}
},
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"optional": true,
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
}
},
"mdbootstrap": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/mdbootstrap/-/mdbootstrap-4.20.0.tgz",
@ -880,16 +1096,17 @@
"mime-db": "1.51.0"
}
},
"moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"native-request": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/native-request/-/native-request-1.1.0.tgz",
"integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==",
"optional": true
},
"negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
@ -913,6 +1130,12 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"optional": true
},
"proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@ -922,6 +1145,12 @@
"ipaddr.js": "1.9.1"
}
},
"prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"optional": true
},
"qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz",
@ -953,6 +1182,12 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"optional": true
},
"send": {
"version": "0.17.2",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
@ -996,6 +1231,12 @@
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"optional": true
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
@ -1006,6 +1247,11 @@
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
},
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@ -1015,6 +1261,11 @@
"mime-types": "~2.1.24"
}
},
"underscore": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.3.tgz",
"integrity": "sha512-QvjkYpiD+dJJraRA8+dGAU4i7aBbb2s0S3jA45TFOvg2VgqvdCDd/3N6CqA8gluk1W91GLoXg5enMUx560QzuA=="
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",

View File

@ -1,10 +1,11 @@
{
"name": "opencountdown",
"version": "1.0.0",
"version": "1.0.1",
"description": "An opensource countdown",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "nexe index.js --build"
},
"author": "TheGreydiamond",
"license": "LGPL-3.0",
@ -13,13 +14,16 @@
"bootstrap": "^5.1.3",
"bootstrap-duration-picker": "^2.1.3",
"bootstrap-icons": "^1.8.1",
"countdown": "^2.6.0",
"colors": "^1.4.0",
"darkreader": "^4.9.44",
"eta": "^1.12.3",
"express": "^4.17.3",
"flatpickr": "^4.6.11",
"jquery": "^3.6.0",
"js-cookie": "^3.0.1",
"less": "^3.13",
"mdbootstrap": "^4.20.0",
"moment": "^2.29.1",
"underscore": "^1.13.3",
"ws": "^8.5.0"
}
}

View File

@ -0,0 +1,86 @@
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.container {
height: 100%;
width: 100%;
background-color: #0B161E;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: 'Segoe UI';
text-align: center;
}
.color-foreground {
color: #474849 !important;
}
.text-shadow {
text-shadow: 1px 1px 2px;
}
.rainbow {
-webkit-animation:rainbow 16s infinite;
-ms-animation:rainbow 16s infinite;
-o-animation:rainbow 16s infinite;
animation:rainbow 16s infinite;
}
@-webkit-keyframes rainbow {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}
@-ms-keyframes rainbow {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}
@-o-keyframes rainbow {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}
@keyframes rainbow {
0% {color: #ff0000;}
10% {color: #ff8000;}
20% {color: #ffff00;}
30% {color: #80ff00;}
40% {color: #00ff00;}
50% {color: #00ff80;}
60% {color: #00ffff;}
70% {color: #0080ff;}
80% {color: #0000ff;}
90% {color: #8000ff;}
100% {color: #ff0080;}
}

View File

@ -0,0 +1,62 @@
.glitch-wrapper {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.glitch {
@offset1: 2px;
@offset2: -2px;
@highlight1: #49FC00;
@highlight2: spin(@highlight1, 180);
color: white;
font-size: 150px;
text-transform: upercase;
position: relative;
display: inline-block;
&::before,
&::after {
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #0B161E;
}
&::before {
left: @offset1;
text-shadow: -2px 0 @highlight1;
clip: rect(24px, 550px, 90px, 0);
animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
&::after {
left: @offset2;
text-shadow: -2px 0 @highlight2;
clip: rect(85px, 550px, 140px, 0);
animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
}
.glitch-frames (@n: 20, @index: 0) when (@index <= @n) {
@keyframeSel: percentage(@index/@n);
@rand1: unit(round(`Math.random()*150`),px);
@rand2: unit(round(`Math.random()*150`), px);
@{keyframeSel} {
clip: rect(@rand1, 9999px, @rand2, 0);
}
.glitch-frames(@n, (@index + 1));
}
@keyframes glitch-anim {
.glitch-frames(24);
}
@keyframes glitch-anim-2 {
.glitch-frames(30,2);
}

View File

@ -10,7 +10,7 @@ body {
main {
display: flex;
flex-wrap: nowrap;
height: 100vh;
height: 100vh !important;
height: -webkit-fill-available;
max-height: 100vh;
overflow-x: auto;
@ -117,4 +117,13 @@ pre {
.hidden {
display: none !important;
}
.trans {
transition: .5s
}
.helperTip {
opacity: 0.8;
font-size: small;
}

View File

@ -55,7 +55,7 @@ html, body {
.progBar {
appearance: none;
height: 100%;
width: 80%;
width: 0%;
border-radius: 0px;
background-color: darkcyan;
}

1
static/flatpickr/dist Symbolic link
View File

@ -0,0 +1 @@
../../node_modules/flatpickr/dist/

View File

@ -1 +0,0 @@
../../node_modules/countdown/countdown.js

View File

@ -11,7 +11,7 @@ function convertColorSegments(elementId) {
if (raw.children[elm].nodeName == "TR") {
const child = raw.children[elm].children[1].children[0]
let timeVal = parseInt(raw.children[elm].children[0].children[0].value * 1000);
if(Number.isInteger(timeVal)){
if (Number.isInteger(timeVal)) {
segmentData[timeVal] = child.style.color
} else {
segmentData["START"] = child.style.color
@ -40,15 +40,29 @@ $(function () {
}
}
saveOption("/api/v1/system", function systemInfo(event) {
const dataSystem = JSON.parse(event.originalTarget.response)
saveOption("/api/v1/system", function systemInfoLoader(event) {
const dataSystem = JSON.parse(event.target.response)
document.getElementById("nodejsVers").innerHTML = dataSystem.nodeVersion
document.getElementById("nodeSwVers").innerHTML = dataSystem.systemVersion
const tree2 = jsonview.create(dataSystem);
jsonview.render(tree2, document.getElementById("systemInfo"));
jsonview.expand(tree2);
})
$("#applyLang").on("click", function (event) {
const lang = $("#lang").val()
saveOption("/api/ui/v1/lang/set?lang=" + lang, function handleLangSelect(event, xmlHttp) {
const temp = JSON.parse(xmlHttp.responseText)
if(temp.status == "error") {
alert("Request failed reason: " + temp.reason)
} else {
location.reload()
}
console.log(JSON.parse(xmlHttp.responseText))
})
})
$("#addRow").on("click", function (event) {
const tableEntryDom = document.getElementById("tableCopySource").cloneNode(true)
let temp = tableEntryDom.innerHTML
@ -95,35 +109,19 @@ $(function () {
onChanged: function (newVal, test, val2) {
// $('#duration-label2').text(newVal);
val2.days[0].parentElement.parentElement.parentElement.parentElement.children[1].value = newVal
//console.log(val2.days[0].parentElement.parentElement.parentElement.parentElement.children[1].value)
//console.log(val2.days[0].parentElement.parentElement.parentElement.parentElement.children[1])
}
});
});
// Restore settings
saveOption("/api/v1/data", function (event, xmlHttp) {
const tableEntry = ' <tr><td class="pt-3-half numVal" contenteditable="true">#VALUE#</td>\
<td class="pt-3-half full" contenteditable="false"> \
<div class="clr-field" style="color: #bg-COLOR#;"> \
<button aria-labelledby="clr-open-label"></button> \
<input id="demo-input1" type="text" class="coloris" value="#COLOR#"></div> \
</div> \
<td>\
<span class="table-remove"><button type="button"\
class="btn btn-danger btn-rounded btn-sm my-0 deleteRow1">\
Remove\
</button></span>\
</td></tr>'
const jsonResult = JSON.parse(xmlHttp.response)
//.innerHTML = JSON.stringify(jsonResult, null, 4)
const tree = jsonview.create(jsonResult);
jsonview.render(tree, document.getElementById("responeSnippet"));
jsonview.expand(tree);
// Restore mode radio
const currentModeInt = modes.indexOf(jsonResult.mode);
$("#btnradio" + (currentModeInt + 1))[0].checked = true
@ -144,8 +142,8 @@ $(function () {
temp = temp.replace("#bg-COLOR#", jsonResult.colorSegments[item]);
temp = temp.replace("timeValue-ID", "timeValue-1C" + currIndex)
if(item != "START"){
temp = temp.replace("#VALUE#", item/1000);
if (item != "START") {
temp = temp.replace("#VALUE#", item / 1000);
tableEntryDom.innerHTML = temp;
tableEntryDom.firstChild.nextSibling.children[0].classList.add("timeDurPicker")
} else {
@ -154,7 +152,7 @@ $(function () {
tableEntryDom.children[2].children[0].setAttribute("data-toggle", "tooltip")
tableEntryDom.children[2].children[0].setAttribute("data-placement", "right")// 'data-placement="right" title="Tooltip on right"'
tableEntryDom.children[2].children[0].setAttribute("title", "You cannot delete the start time")
tableEntryDom.children[0].innerHTML = '<i class="bi bi-flag-fill"></i> Start'
}
tableEntryDom.id = "1C" + currIndex
@ -163,7 +161,6 @@ $(function () {
currIndex++;
}
// Text colors
currIndex = 0
@ -174,8 +171,8 @@ $(function () {
temp = temp.replace("#bg-COLOR#", jsonResult.textColors[item]);
temp = temp.replace("timeValue-ID", "timeValue-1C" + currIndex)
if(item != "START"){
temp = temp.replace("#VALUE#", item/1000);
if (item != "START") {
temp = temp.replace("#VALUE#", item / 1000);
tableEntryDom.innerHTML = temp;
tableEntryDom.firstChild.nextSibling.children[0].classList.add("timeDurPicker")
} else {
@ -184,11 +181,11 @@ $(function () {
tableEntryDom.children[2].children[0].setAttribute("data-toggle", "tooltip")
tableEntryDom.children[2].children[0].setAttribute("data-placement", "right")// 'data-placement="right" title="Tooltip on right"'
tableEntryDom.children[2].children[0].setAttribute("title", "You cannot delete the start time")
tableEntryDom.children[0].innerHTML = '<i class="bi bi-flag-fill"></i> Start'
}
// timeDurPicker
tableEntryDom.id = "1C" + currIndex
tableEntryDom.style.display = "table-row"
@ -201,10 +198,7 @@ $(function () {
showSeconds: true,
showDays: false,
onChanged: function (newVal, test, val2) {
// $('#duration-label2').text(newVal);
val2.days[0].parentElement.parentElement.parentElement.parentElement.children[1].value = newVal
//console.log(val2.days[0].parentElement.parentElement.parentElement.parentElement.children[1].value)
//console.log(val2.days[0].parentElement.parentElement.parentElement.parentElement.children[1])
}
});
@ -218,7 +212,7 @@ $(function () {
$(".deleteRow1").on("click", function removeRowEntry(event) {
$(event.target).closest("tr").remove();
});
$('[data-toggle="tooltip"]').tooltip({container: "body"})
$('[data-toggle="tooltip"]').tooltip({ container: "body" })
})
$("#copyColors").click(function CopyTextColors(event) {
@ -243,18 +237,15 @@ $(function () {
}
Cookies.set("interfaceColor", darkid)
});
// Presets
$(".pres").click(function (event) {
currentTime = parseInt(event.currentTarget.value)
const times = msToTime(currentTime)
$("#timerHoursV")[0].innerHTML = times[3];
$("#timerMinuteV")[0].innerHTML = times[2];
$("#timerSecondsV")[0].innerHTML = times[1];
$("#customValue").data("durationPicker").setValue(currentTime / 1000)
})
$(".goTimer").click(function (event) {
$(".goTimer").on("click", function (event) {
event.currentTarget.innerHTML = '<div class="spinner-border-sm spinner-border"></div>'
setTimeout(function () {
event.currentTarget.innerHTML = 'Go'
@ -358,7 +349,7 @@ $(function () {
})
$("#timerHourDec").click(function (event) {
if (currentTime > 3600000) {
if (currentTime >= 3600000) {
currentTime -= 3600000
const times = msToTime(currentTime)
$("#timerHoursV")[0].innerHTML = times[3];
@ -375,7 +366,7 @@ $(function () {
$("#timerSecondsV")[0].innerHTML = times[1];
})
$("#timerMinuteDec").click(function (event) {
if (currentTime > 60000) {
if (currentTime >= 60000) {
currentTime -= 60000
const times = msToTime(currentTime)
$("#timerHoursV")[0].innerHTML = times[3];
@ -391,7 +382,7 @@ $(function () {
$("#timerSecondsV")[0].innerHTML = times[1];
})
$("#timerSecondsDec").click(function (event) {
if (currentTime > 1000) {
if (currentTime >= 1000) {
currentTime -= 1000
const times = msToTime(currentTime)
$("#timerHoursV")[0].innerHTML = times[3];
@ -484,6 +475,30 @@ $(function () {
$("#" + event.target.href.split("#")[1]).removeClass("hidden")
// console.log(event.target.href.split("#")[1])
});
$("#customValue").durationPicker({
showSeconds: true,
showDays: false,
onChanged: function (newVal, test, val2) {
currentTime = newVal * 1000
}
})
flatty = flatpickr("#datetimetester", {
enableTime: true,
time_24hr: true,
dateFormat: "H:i d.m.Y",
});
$(".goTimeGoalCountdown").on("click", function handleCountdownToTime() {
const selectTime = flatty.selectedDates[0].getTime()
const timeDiff = selectTime - new Date().getTime()
$(".goTimeGoalCountdown")[0].innerHTML = '<div class="spinner-border-sm spinner-border"></div>'
saveOption("/api/v1/set/addMillisToTimer?time=" + timeDiff, function (ev) {
setTimeout(function () {
$(".goTimeGoalCountdown")[0].innerHTML = '<i class="bi bi-check2-circle"></i>'
}, 200);
})
})
});
function saveOption(path, callback) {
@ -496,4 +511,32 @@ function saveOption(path, callback) {
xmlHttp.onloadend = function (event) {
callback(event, xmlHttp)
}
}
navStatus = true
function openNav() {
document.getElementById("navbarToggleExternalContent").style.width = "250px";
document.getElementById("navbarToggleExternalContent").style.opacity = "1";
document.getElementById("navbarToggleExternalContent").style.display = "block";
document.getElementById("navbarToggleExternalContent").style.zIndex = 999999;
document.getElementById("pageCont").style.marginLeft = "0px";
navStatus = true
}
function closeNav() {
document.getElementById("navbarToggleExternalContent").style.width = "0px";
document.getElementById("navbarToggleExternalContent").style.opacity = "0";
document.getElementById("navbarToggleExternalContent").style.display = "none";
document.getElementById("navbarToggleExternalContent").style.zIndex = -999999;
document.getElementById("pageCont").style.marginLeft = "0";
navStatus = false
}
function toogleNav() {
if (navStatus) {
closeNav()
} else {
openNav()
}
}

1
static/js/less.min.js vendored Symbolic link
View File

@ -0,0 +1 @@
../../node_modules/less/dist/less.min.js

View File

@ -1 +0,0 @@
../../node_modules/moment/dist/moment.js

View File

@ -195,7 +195,12 @@ function handleUpdate() {
timerCountdownFirst = true;
} else if (data.mode == "timer") {
document.getElementById("wholeProgBar").style.display = "block";
if(data.showProgressbar) {
document.getElementById("wholeProgBar").style.display = "block";
} else {
document.getElementById("wholeProgBar").style.display = "none";
}
const now = new Date()
if(timerCountdownFirst){

View File

@ -1,94 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>openCountdown - Admin</title>
<meta name="description" content="openCountdown">
<meta name="author" content="TheGreydiamond">
<link rel="stylesheet" href="css/styles.css?v=1.1">
</head>
<body>
<form action="/api/v1/set/mode" target="hiddenFrame">
<select id="mode" name="mode">
<option value="timer">Timer</option>
<option value="clock">Clock</option>
<option value="black">Black</option>
<option value="test">Test</option>
</select>
<button type="submit">Submit</button>
</form>
<br>
<form action="/api/v1/set/layout/showMillis" target="hiddenFrame">
<select id="show" name="show">
<option value="true">Enable Milliseconds</option>
<option value="false">Disable Milliseconds</option>
</select>
<button type="submit">Submit</button>
</form>
<form action="/api/v1/set/layout/showTime" target="hiddenFrame">
<select id="show" name="show">
<option value="true">Show Clock on Countdown page</option>
<option value="false">Do not show Clock on Countdown page</option>
</select>
<button type="submit">Submit</button>
</form>
<form action="/api/v1/set/addMillisToTimer" target="hiddenFrame">
<input type="time" step="0.001" name="time2" id="time2" onchange="updateHiddenForm()"></input>
<input type="hidden" step="0.001" name="time" id="time"></input>
<button type="submit">Submit</button>
</form>
<form action="/api/v1/set/addMillisToTimer" target="hiddenFrame">
<select id="time" name="time" onchange="">
<option value="20000">debug 1 (20 secs)</option>
<option value="300000">00:05:00</option>
<option value="600000">00:10:00</option>
<option value="900000">00:15:00</option>
<option value="1200000">00:20:00</option>
<option value="1500000">00:25:00</option>
<option value="1800000">00:30:00</option>
<option value="2100000">00:35:00</option>
<option value="2400000">00:40:00</option>
<option value="2700000">00:45:00</option>
</select>
<button type="submit">Submit</button>
</form>
Play controls:
<form action="/api/v1/ctrl/timer/play" target="hiddenFrame">
<button type="submit">Play</button>
</form>
<form action="/api/v1/ctrl/timer/pause" target="hiddenFrame">
<button type="submit">Pause</button>
</form>
<form action="/api/v1/ctrl/timer/restart" target="hiddenFrame">
<button type="submit">Restart</button>
</form>
Message:
<form action="/api/v1/ctrl/message/show" target="hiddenFrame">
<input type="text" name="msg">
<button type="submit">Submit</button>
</form>
<form action="/api/v1/ctrl/message/hide" target="hiddenFrame">
<button type="submit">Hide</button>
</form>
<iframe name="hiddenFrame" style="display: none"></iframe>
<iframe src="/timer?smaller=true" height="80%" width="80%"> </iframe>
</body>
<script src="js/interface.js"></script>
</html>

View File

@ -0,0 +1,146 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>openCountdown - Admin</title>
<meta name="description" content="openCountdown">
<meta name="author" content="TheGreydiamond">
<link rel="stylesheet" href="/css/bootstrap-icons.css">
<link rel="stylesheet" href="/mdbootstrap/css/style.css">
<script src="/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/mdbootstrap/js/mdb.min.js"></script>
<script type="text/javascript" src="/js/darkreader.js"></script>
<script type="text/javascript" src="/js/cookie.js"></script>
<link href="/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/mainStyle.css" rel="stylesheet">
<link rel="stylesheet" href="/coloris/coloris.min.css" />
<link rel="stylesheet" href="/bootstrap-duration-picker/bootstrap-duration-picker.css" />
<link rel="stylesheet" href="/flatpickr/dist/flatpickr.min.css" />
<script src="/bootstrap-duration-picker/bootstrap-duration-picker-debug.js"></script>
<script src="/coloris/coloris.min.js"></script>
<script type="text/javascript" src="/flatpickr/dist/flatpickr.js"> </script>
<link rel="stylesheet" href="/css/bootstrap-icons.css">
</head>
<body>
<main>
<div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark trans" style="width: 250px;"
id="navbarToggleExternalContent">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
<svg class="bi me-2" width="40" height="32">
<use xlink:href="#bootstrap" />
</svg>
<span class="fs-4">Sidebar</span>
</a>
<hr>
<ul class="nav nav-pills flex-column mb-auto">
<li class="nav-item">
<a href="#homeP" class="nav-link active" aria-current="page" id="PageIndex">
<i class="bi bi-house-door"></i>
Home
</a>
</li>
</ul>
<hr>
openCountdown <div class="btn-group" role="group" aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnradio2" id="Mbtnradio1" autocomplete="off" checked>
<label class="btn btn-outline-primary" for="Mbtnradio1"><svg xmlns="http://www.w3.org/2000/svg"
width="16" height="16" fill="currentColor" class="bi bi-brightness-high-fill"
viewBox="0 0 16 16">
<path
d="M12 8a4 4 0 1 1-8 0 4 4 0 0 1 8 0zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" />
</svg>
</label>
<input type="radio" class="btn-check" name="btnradio2" id="Mbtnradio2" autocomplete="off">
<label class="btn btn-outline-primary" for="Mbtnradio2">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-moon-fill" viewBox="0 0 16 16">
<path
d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z" />
</svg>
</label>
<input type="radio" class="btn-check" name="btnradio2" id="Mbtnradio3" autocomplete="off">
<label class="btn btn-outline-primary" for="Mbtnradio3">
Auto
</label>
</div>
</div>
<pages class="d-flex flex-fill" id="pageCont" class="z-index: 50;">
<page id="homeP" class="pageC flex-fill overflow-auto">
<div class="container">
<div class=""
style=" display: flex;align-items: center;justify-content: center; flex-wrap: wrap; flex-direction: column;">
<h1>Oh no!</h1>
<h1>
<i class="bi bi-translate"></i>
</h1>
<h5>
There is a critical error with the current language template. Please select a diffrent
language.
</h5>
<label for="lang">Please choose a language: </label>
<select name="lang" id="lang">
<% it.additional.languages.forEach(function(lang){ %>
<option value="<%= lang %>">
<%= lang %>
</option>
<% }) %>
</select>
<button id="applyLang" class="btn btn-outline-success">
Apply & Reload
</button>
</div>
</div>
</page>
</pages>
</main>
<script type="text/javascript" src="js/jsonview.js"></script>
<script type="text/javascript" src="/js/interface.js"> </script>
<script type="text/javascript">
Coloris({
el: '.coloris',
alpha: false,
});
$(function () {
$('[data-toggle="tooltip"]').tooltip({ container: "body" })
})
$("#applyLang").on("click", function (event) {
const lang = $("#lang").val()
saveOption("/api/ui/v1/lang/set?lang=" + lang, function handleLangSelect(event, xmlHttp) {
const temp = JSON.parse(xmlHttp.responseText)
if (temp.status == "error") {
alert("Request failed reason: " + temp.reason)
} else {
location.reload()
}
console.log(JSON.parse(xmlHttp.responseText))
})
})
</script>
</body>
</html>

View File

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>openCountdown - Not found</title>
<meta name="description" content="openCountdown">
<meta name="author" content="TheGreydiamond">
<script type="text/javascript" src="/js/cookie.js"></script>
<link rel="stylesheet/less" type="text/css" href="/css/errorPage/styles.less" />
<script>
less = {
javascriptEnabled: true
};
</script>
<script src="/js/less.min.js"></script>
<link rel="stylesheet" href="/css/errorPage/style.css">
<link rel="stylesheet" href="/css/bootstrap-icons.css">
</head>
<body>
<div class="container">
<h1 class="rainbow">
<div class="glitch" data-text="404">
404
</div>
</h1>
<h2 class="color-foreground">
We're sorry, the page you were looking for isn't found here.<br>
The link you followed may either be broken or no longer exists. Please
check your spelling.<br>
<a href="/"><i class="bi bi-house-door"></i> Back home</a>
</h2>
</div>
</body>
</html>

View File

@ -23,16 +23,20 @@
<link href="/css/mainStyle.css" rel="stylesheet">
<link rel="stylesheet" href="/coloris/coloris.min.css" />
<link rel="stylesheet" href="/bootstrap-duration-picker/bootstrap-duration-picker.css" />
<link rel="stylesheet" href="/flatpickr/dist/flatpickr.min.css" />
<script src="/bootstrap-duration-picker/bootstrap-duration-picker-debug.js"></script>
<script src="/coloris/coloris.min.js"></script>
<script type="text/javascript" src="/flatpickr/dist/flatpickr.js"> </script>
<link rel="stylesheet" href="/css/bootstrap-icons.css">
</head>
<body>
<main>
<div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark" style="width: 280px;">
<div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark trans" style="width: 250px;"
id="navbarToggleExternalContent">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
<svg class="bi me-2" width="40" height="32">
<use xlink:href="#bootstrap" />
@ -44,19 +48,25 @@
<li class="nav-item">
<a href="#homeP" class="nav-link active" aria-current="page" id="PageIndex">
<i class="bi bi-house-door"></i>
Home
<%= it.lang.sidebar.home %>
</a>
</li>
<li>
<a href="#settings" class="nav-link text-white" id="PageSettings">
<i class="bi bi-gear"></i>
<%= it.lang.sidebar.settings %>
</a>
</li>
<li>
<a href="#debug" class="nav-link text-white" id="PageDebug">
<i class="bi bi-bug"></i>
Debug
<%= it.lang.sidebar.debug %>
</a>
</li>
<li>
<a href="#about" class="nav-link text-white" id="PageAbout">
<i class="bi bi-info-circle"></i>
About
<%= it.lang.sidebar.about %>
</a>
</li>
</ul>
@ -88,33 +98,61 @@
</div>
</div>
<pages class="d-flex flex-fill">
<pages class="d-flex flex-fill" id="pageCont" class="z-index: 50;">
<div class="">
<button type="button"
class="opacity mx-2 svg-center btn btn-outline-transparent rounded-circle border-0"
onclick="toogleNav()">
<i class="bi bi-list"></i>
</button>
</div>
<page id="homeP" class="pageC flex-fill overflow-auto">
<h1>Home page</h1>
<h1><%= it.lang.titles.home %></h1>
<div class="container">
<div class="row">
<div class="col">
<h3>Preview: </h3>
<iframe src="/timer?smaller=true" height="100%" width="100%"> </iframe>
<h3 class="d-flex"><%= it.lang.titles.preview %> <span class="helperTip" data-placement="right" title="<%= it.lang.hints.previewHint %>" data-toggle="tooltip">
<i class="bi bi-question-circle-fill"></i>
</span>
<div class="ms-auto">
<span class="helperTip" data-placement="right"
title="<%= it.lang.hints.copyHint %>" data-toggle="tooltip">
<button class="btn" onclick="navigator.clipboard.writeText(window.location.toString() + 'timer')">
<i class="bi bi-clipboard"></i>
</button>
</span>
<span class="helperTip" data-placement="right"
title="<%= it.lang.hints.openInNewTab %>" data-toggle="tooltip">
<a href="/timer" class="btn " target="_blank"><i
class="bi bi-box-arrow-up-right"></i></a>
</span>
</div>
</h3>
<iframe src="/timer?smaller=true" height="100%" width="100%" style="min-height: 400px;">
</iframe>
</div>
<div class="col">
<h3>Mode</h3>
<h3><%= it.lang.titles.mode %> <span class="helperTip" data-placement="right"
title="<%= it.lang.hints.selectMode %>" data-toggle="tooltip">
<i class="bi bi-question-circle-fill"></i>
</span></h3>
<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnradio" id="btnradio1" autocomplete="off"
checked>
<label class="btn btn-outline-primary" for="btnradio1">Timer</label>
<label class="btn btn-outline-primary" for="btnradio1"><%= it.lang.others.timer %></label>
<input type="radio" class="btn-check" name="btnradio" id="btnradio2" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio2">Clock</label>
<label class="btn btn-outline-primary" for="btnradio2"><%= it.lang.others.clock %></label>
<input type="radio" class="btn-check" name="btnradio" id="btnradio3" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio3">Black</label>
<label class="btn btn-outline-primary" for="btnradio3"><%= it.lang.others.black %></label>
<input type="radio" class="btn-check" name="btnradio" id="btnradio4" autocomplete="off">
<label class="btn btn-outline-primary" for="btnradio4">Testimage</label>
<label class="btn btn-outline-primary" for="btnradio4"><%= it.lang.others.test %></label>
</div>
<br>
<br>
@ -145,72 +183,15 @@
<br>
<br>
<br>
<h3><%= it.lang.titles.messaging %> <span class="helperTip" data-placement="right"
title="<%= it.lang.hints.messagingHint %>" data-toggle="tooltip">
<i class="bi bi-question-circle-fill"></i>
</span></h3>
<presets>
<button class="btn btn-outline-secondary m-1 pres" value="300000">00:05:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="600000">00:10:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="900000">00:15:00</button><br>
<button class="btn btn-outline-secondary m-1 pres" value="1200000">00:20:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="1500000">00:25:00</button>
<button class="btn btn-outline-secondary m-1 pres"
value="1800000">00:30:00</button><button
class="btn btn-outline-primary m-1 mt-0 goTimer">Go</button><br>
<button class="btn btn-outline-secondary m-1 pres" value="2100000">00:35:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="2400000">00:40:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="2700000">00:45:00</button>
</presets>
<input type="text" id="messageContent" class="form-control" placeholder="<%= it.lang.placeholders.msgHere %>"
style="width: 50%;">
</div>
</div>
</div>
<br><br><br>
<h3>Timer / Messaging</h3>
<div class="container">
<div class="row" style="width: 60%;">
<div class="col">
<h4>H</h4>
<button class="btn btn-outline-secondary" id="timerHourInc">
<i class="bi bi-plus"></i>
</button><br>
<b id="timerHoursV">0</b><br>
<button class="btn btn-outline-secondary" id="timerHourDec">
<i class="bi bi-dash"></i>
</button>
</div>
<div class="col">
<h4>M</h4>
<button class="btn btn-outline-secondary" id="timerMinuteInc">
<i class="bi bi-plus"></i>
</button><br>
<b id="timerMinuteV">0</b><br>
<button class="btn btn-outline-secondary" id="timerMinuteDev">
<i class="bi bi-dash"></i>
</button>
</div>
<div class="col">
<h4>S</h4>
<button class="btn btn-outline-secondary" id="timerSecondsInc">
<i class="bi bi-plus"></i>
</button><br>
<b id="timerSecondsV">0</b><br>
<button class="btn btn-outline-secondary" id="timerSecondsDec">
<i class="bi bi-dash"></i>
</button>
</div>
<div class="col">
<button class="btn btn-outline-primary m-1 mt-0 goTimer" id="goJogger">Go</button>
</div>
<div class="col">
<div style="border-left:1px solid #000;height:100%"></div>
</div>
<div class="col">
<br>
<input type="text" id="messageContent" class="form-control" style="width: 200%"
placeholder="Message here">
<button class="btn btn-outline-primary m-1" id="sendMessage"><i
class="bi bi-send"></i></button>
<button class="btn btn-outline-primary m-1" id="ctrlRemoveMessage">
@ -218,23 +199,65 @@
</button>
</div>
</div>
</div>
<hr>
<h3>Layout</h3>
<br><br><br>
<h3><%= it.lang.others.timer %></h3>
<div class="container">
<label for="showTime">Show clock on Timer:</label>
<div class="row">
<presets class="d-inline-flex justify-content-center">
<button class="btn btn-outline-secondary m-1 pres" value="300000">00:05:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="600000">00:10:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="900000">00:15:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="1200000">00:20:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="1500000">00:25:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="1800000">00:30:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="2100000">00:35:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="2400000">00:40:00</button>
<button class="btn btn-outline-secondary m-1 pres" value="2700000">00:45:00</button>
</presets>
<div class="row" style="width: 100%;">
<div class="d-inline-flex justify-content-center p-2 col">
<input type="text" class="form-control m-1" id="customValue">
<button class="btn btn-outline-primary m-1 mt-0 goTimer"><i
class="bi bi-check2-circle"></i></button>
</div>
</div>
<h5>
<%= it.lang.titles.countdownToTime %>
</h5>
<div class="row justify-content-center flex-nowrap d-flex" >
<input id="datetimetester" class="form-control input-sm" style="width: 20%;">
<button class="btn btn-outline-primary goTimeGoalCountdown ms-2" style="width: 5%;"><i
class="bi bi-check2-circle"></i></button>
</input>
</div>
</div>
</div>
</page>
<page id="settings" class="pageC hidden flex-fill overflow-auto">
<h1><%= it.lang.sidebar.settings %></h1>
<label for="showTime"><%= it.lang.labels.clockOnTimer %></label>
<input type="checkbox" name="showTime" id="showTime"><br>
<label for="showMillis">Show Milliseconds on Timer:</label>
<label for="showMillis"><%= it.lang.labels.showMillis %></label>
<input type="checkbox" name="showMillis" id="showMillis"><br>
<label for="progBarShow">Show progressbar:</label>
<label for="progBarShow"><%= it.lang.labels.showProgress %></label>
<input type="checkbox" name="progBarShow" id="progBarShow"><br>
<details>
<summary>Progressbar Colors</summary>
<summary><%= it.lang.labels.progbarColors %></summary>
<p>
<div id="table" class="table-editable">
<span class="table-add float-right mb-3 mr-2"><a href="#!" class="text-success"><i
@ -242,9 +265,9 @@
<table class="table table-bordered table-responsive-md table-striped text-center" id="colors1">
<thead>
<tr>
<th class="text-center">Time</th>
<th class="text-center">Color</th>
<th class="text-center">Remove</th>
<th class="text-center"><%= it.lang.labels.time %></th>
<th class="text-center"><%= it.lang.labels.color %></th>
<th class="text-center"><%= it.lang.labels.remove %></th>
</tr>
</thead>
</tbody>
@ -255,19 +278,19 @@
</p>
</details>
<hr>
<label for="textColors">Enable Text Colors:</label>
<label for="textColors"><%= it.lang.labels.enableTextClrs %></label>
<input type="checkbox" name="textColors" id="textColors"><br>
<details>
<summary>Text Colors</summary>
<summary><%= it.lang.labels.textClrs %></summary>
<p>
<div id="table2" class="table-editable">
<table class="table table-bordered table-responsive-md table-striped text-center" id="colors2">
<thead>
<tr>
<th class="text-center">Time</th>
<th class="text-center">Color</th>
<th class="text-center">Remove</th>
<th class="text-center"><%= it.lang.labels.time %></th>
<th class="text-center"><%= it.lang.labels.color %></th>
<th class="text-center"><%= it.lang.labels.remove %></th>
</tr>
</thead>
</tbody>
@ -276,7 +299,7 @@
<button type="button" class="btn btn-outline-success" id="copyColors">Copy from progressbar
colors</button>
<button type="button" class="btn btn-outline-success" id="addRow2">Add row</button>
<button type="button" class="btn btn-outline-success" id="addRow2"><%= it.lang.labels.row %></button>
</p>
</details>
<br>
@ -289,78 +312,93 @@
startup settings (Layout
only)</button>
<hr>
<h2><%= it.lang.titles.uiSettings %></h2>
<label for="lang"><%= it.lang.labels.language %>:</label>
<select name="lang" id="lang">-
<% it.additional.languages.forEach(function(lang){ %>
<option value="<%= lang %>"><%= lang %></option>
<% }) %>
</select>
<button id="applyLang" class="btn btn-outline-success">
<%= it.lang.labels.apply %>
</button>
</page>
<page id="debug" class="pageC hidden flex-fill overflow-auto">
<h1>Debug page</h1>
<div class="alert alert-warning" role="alert">
<h4 class="alert-heading">Attention</h4>
<p>This is a debug page which should only be used by professionals. Changing any options below might
impact operation.</p>
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading"><%= it.lang.titles.attention %></h4>
<p><%= it.lang.informationTexts.debugInfo %></p>
<hr>
<p class="mb-0">Proceed with caution.</p>
<p class="mb-0"><b><%= it.lang.informationTexts.proceedCaution %></b></p>
</div>
<label for="debugMode">Enable time variance display:</label>
<label for="debugMode"><%= it.lang.labels.timeVar %></label>
<input type="checkbox" name="debugMode" id="debugModeEnable" value="true"><br><br>
<button type="button" class="btn btn-outline-success" id="applyDebug">Apply settings</button>
<br>
<div class="full">
<p>Full size thumbnail</p>
<div class="clr-field" style="color: rgb(255, 204, 0);">
<button aria-labelledby="clr-open-label"></button>
<input type="text" class="coloris" value="#ffcc00">
</div>
</div>
<br><br>
<i class="bi-alarm"></i>
<hr>
<br>
<h3><%= it.lang.titles.hostinfo %></h3>
<code id="systemInfo" class="overflow-auto">
</code>
<h3>Raw server reponse</h3>
<code id="responeSnippet" style="width: 40%; display: inline-block;" class="overflow-auto">
</code>
<br>
<hr>
<br>
<templateObj>
<table class="table table-bordered table-responsive-md table-striped text-center" id="colors1">
<thead>
<tr>
<th class="text-center">Time</th>
<th class="text-center">Color</th>
<th class="text-center">Remove</th>
<tr><%= it.lang.labels.time %>
<th class="text-center"><%= it.lang.labels.time %></th>
<th class="text-center"><%= it.lang.labels.color %></th>
<th class="text-center"><%= it.lang.labels.remove %></th>
</tr>
</thead>
<tr id="tableCopySource">
<td contenteditable="false" class="time">
<input type="text" class="form-control " id="timeValue-ID" value="#VALUE#">
<value></value>
<input type="text" class="form-control " id="timeValue-ID" value="#VALUE#">
<value></value>
</td>
<td class="pt-3-half full" contenteditable="false">
<div class="clr-field" style="color: #bg-COLOR#;">
<button aria-labelledby="clr-open-label"></button>
<input type="text" class="coloris" value="#COLOR#">
</div>
</div>
</td>
<td>
<span class="table-remove"><button type="button"
class="btn btn-danger btn-rounded btn-sm my-0 deleteRow1">
Remove
</button></span>
</td>
<td class="pt-3-half full" contenteditable="false">
<div class="clr-field" style="color: #bg-COLOR#;">
<button aria-labelledby="clr-open-label"></button>
<input type="text" class="coloris" value="#COLOR#"></div>
</div>
</td>
<td>
<span class="table-remove"><button type="button"
class="btn btn-danger btn-rounded btn-sm my-0 deleteRow1">
Remove
</button></span>
</td>
</tr>
</tbody>
</table>
<tr><td class="pt-3-half numVal" contenteditable="true">#VALUE#</td>
<td class="pt-3-half full" contenteditable="false">
<div class="clr-field" style="color: #bg-COLOR#;">
<button aria-labelledby="clr-open-label"></button>
<input id="demo-input1" type="text" class="coloris" value="#COLOR#"></div>
</div>
</td>
<td>
<span class="table-remove"><button type="button"
class="btn btn-danger btn-rounded btn-sm my-0 deleteRow1">
Remove
</button></span>
</td>
</tr>
<tr>
<td class="pt-3-half numVal" contenteditable="true">#VALUE#</td>
<td class="pt-3-half full" contenteditable="false">
<div class="clr-field" style="color: #bg-COLOR#;">
<button aria-labelledby="clr-open-label"></button>
<input id="demo-input1" type="text" class="coloris" value="#COLOR#">
</div>
</div>
</td>
<td>
<span class="table-remove"><button type="button"
class="btn btn-danger btn-rounded btn-sm my-0 deleteRow1">
Remove
</button></span>
</td>
</tr>
</templateObj>
<script>
$('#duration2').durationPicker({
@ -375,24 +413,15 @@
</script>
<br><br>
<h3>Raw server reponse</h3>
<code id="responeSnippet" style="width: 40%; display: inline-block;" class="overflow-auto">
</code>
<div class="demo">
test
<input id="demo-input" class="colorPicky" type="button" value="rgb(255, 128, 0)" />
</div>
</page>
<page id="about" class="pageC hidden flex-fill overflow-auto">
<h1>About</h1>
Version: 1.0.0<br>
NodeJS Version: <i id="nodejsVers"></i><br>
<code id="systemInfo" class="overflow-auto">
</code>
Version: <b id="nodeSwVers"></b><br>
NodeJS Version: <b id="nodejsVers"></b><br>
<h2>About the translation</h2>
Author: <%= it.lang._metadata.authors %><br>
Language: <%= it.lang._metadata.lang %><br>
Version: <%= it.lang._metadata.version %><br>
</page>
</pages>
</main>
@ -403,10 +432,10 @@
Coloris({
el: '.coloris',
alpha: false,
});
$(function () {
$('[data-toggle="tooltip"]').tooltip({container: "body"})
})
});
$(function () {
$('[data-toggle="tooltip"]').tooltip({ container: "body" })
})
</script>
</body>

View File

@ -46,8 +46,7 @@
</div>
</div>
<script src="js/reconnecting-websocket.min.js" async defer></script>
<script src="js/countdown.js"></script>
<script src="js/reconnecting-websocket.min.js"></script>
<script src="js/script.js"></script>
</body>