diff --git a/index.js b/index.js index b9f6463..41e80ea 100644 --- a/index.js +++ b/index.js @@ -87,8 +87,12 @@ app.get("/api/v1/ctrl/timer/pause", function (req, res) { }); app.get("/api/v1/ctrl/timer/play", function (req, res) { - currentState.timerRunState = true - currentState.countdownGoal += new Date().getTime() - currentState.pauseMoment; + + if(currentState.timerRunState == false){ + currentState.timerRunState = true + currentState.countdownGoal += new Date().getTime() - currentState.pauseMoment; + } + res.json({ status: "ok" }); }); diff --git a/package-lock.json b/package-lock.json index a3bd927..f517a32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "countdown": "^2.6.0", "express": "^4.17.3", "jquery": "^3.6.0", + "mdbootstrap": "^4.20.0", "moment": "^2.29.1" } }, @@ -294,6 +295,11 @@ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" }, + "node_modules/mdbootstrap": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/mdbootstrap/-/mdbootstrap-4.20.0.tgz", + "integrity": "sha512-eIxaYsvHct2BKqkJWphh6j7nFQXHh9NjbbN7a+dctfrVsKaydNW5XpKIxmq2tDSb9+XYGm9hK7hMTlHgeV6wdw==" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -775,6 +781,11 @@ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" }, + "mdbootstrap": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/mdbootstrap/-/mdbootstrap-4.20.0.tgz", + "integrity": "sha512-eIxaYsvHct2BKqkJWphh6j7nFQXHh9NjbbN7a+dctfrVsKaydNW5XpKIxmq2tDSb9+XYGm9hK7hMTlHgeV6wdw==" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", diff --git a/package.json b/package.json index 6dfb342..f9686a5 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "countdown": "^2.6.0", "express": "^4.17.3", "jquery": "^3.6.0", + "mdbootstrap": "^4.20.0", "moment": "^2.29.1" } } diff --git a/static/mdbootstrap/css b/static/mdbootstrap/css new file mode 120000 index 0000000..5ada75b --- /dev/null +++ b/static/mdbootstrap/css @@ -0,0 +1 @@ +../../node_modules/mdbootstrap/css/ \ No newline at end of file diff --git a/static/mdbootstrap/js b/static/mdbootstrap/js new file mode 120000 index 0000000..6a0f520 --- /dev/null +++ b/static/mdbootstrap/js @@ -0,0 +1 @@ +../../node_modules/mdbootstrap/js \ No newline at end of file diff --git a/templates/newAdminPanel.html b/templates/newAdminPanel.html index e355de4..f9ab783 100644 --- a/templates/newAdminPanel.html +++ b/templates/newAdminPanel.html @@ -9,14 +9,16 @@ - - - + + - + + + + @@ -142,102 +144,185 @@

Home page

- ToDo: Load current settings +
+
+
+

Preview:

+ +
+
+

Mode

+
+ + -

Preview:

- + + -
-

Mode

-
- - - - - - - - + + - - -
-
-
-

Timer

- - - + + +
+
+
+
+ + - - - - - - - - - - - -
- Time duration picker + + + +
+
+
-
-

Messaging

- - + + + +
+ + +
+ + + +
- +
+
+
+

Timer / Messaging

+
+
+
+

H

+
+ 0
+ +
+
+

M

+
+ 0
+ +
+ +
+

S

+
+ 0
+ +
+
+ +
+
+
+ +
+ +
+
+ + + +
+
+ +

Layout

- + -
+
-
+
-
-
Colors
+
+
+ Colors
-
-
Colors
+
+
+ Colors
- +
@@ -256,6 +341,72 @@ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeColorRemove
Aurelia Vega + +
5000 + +
Guadalupe House + +
Elisa Gallagher + +
+
+
+
+ +