From ca3e550fb59af89a2ddc0e1e0e59a3025edbece7 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Tue, 11 Nov 2025 22:59:59 +0100 Subject: Fixed timer notifications and the title --- court.mjs | 2 +- index.html | 43 +++++++++++++++++++++++-------------------- index.js | 13 +++++++++++++ player.mjs | 2 +- timer.js | 11 +++-------- 5 files changed, 41 insertions(+), 30 deletions(-) diff --git a/court.mjs b/court.mjs index 8721bc5..e252cb5 100644 --- a/court.mjs +++ b/court.mjs @@ -13,7 +13,7 @@ export class Court { console.log(this.name + " is currently " + status); } render() { - let type = this.status ? `class="button is-large is-success"` : 'class="button is-large is-dark"'; + let type = this.status ? `class="button is-medium is-success"` : 'class="button is-medium is-dark"'; return ``; } } diff --git a/index.html b/index.html index 0e84b96..7ff4652 100644 --- a/index.html +++ b/index.html @@ -1,32 +1,25 @@ - + Match Up! - + +
-
-
-
-

Match Up!

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

Games

@@ -34,10 +27,10 @@
- +
-
+
+ + + +
+

Courts

@@ -78,5 +80,6 @@
+ \ No newline at end of file diff --git a/index.js b/index.js index 28b2f05..949ea80 100644 --- a/index.js +++ b/index.js @@ -50,4 +50,17 @@ document.getElementById("confirm").addEventListener("click", () => { session.push(new Round(proposal, session.length)); // Need to update the number of games played here document.getElementById("game_list").innerHTML = session.at(-1).render(); + document.getElementById("timer-start").click(); + const notification = new Notyf({ + duration: 30 * 1000, + position: {x: 'center', y: 'top'}, + types: [{ + type: 'success', + background: 'green', + duration: 1000 * 1000, + dismissible: true + }] + }); + notification.success("Round confirmed!"); + }) \ No newline at end of file diff --git a/player.mjs b/player.mjs index ef10e03..da94e42 100644 --- a/player.mjs +++ b/player.mjs @@ -15,7 +15,7 @@ export class Player { console.log(this.name + " has a level of " + this.level + " and is currently " + status); } render() { - let type = this.status ? `class="button is-large is-success"` : 'class="button is-large is-danger"'; + let type = this.status ? `class="button is-medium is-success"` : 'class="button is-medium is-danger"'; return ``; } } diff --git a/timer.js b/timer.js index 25d4610..2049d0f 100644 --- a/timer.js +++ b/timer.js @@ -38,16 +38,11 @@ function refreshTimer() { } resetTimer(); const notification = new Notyf({ - duration: 30 * 1000, + duration: 0, position: {x: 'center', y: 'top'}, - types: [{ - type: 'success', - background: 'indianred', - duration: 1000 * 1000, - dismissible: true - }] + dismissible: true, }); - notification.success("Round completed"); + notification.error("Round completed"); } function startTimer(fresh) { -- cgit v1.3.1