From 64c0e5d04a375270d1925dc53bfde075b9d4beda Mon Sep 17 00:00:00 2001 From: Klemek Date: Fri, 3 May 2024 11:52:25 +0200 Subject: [PATCH 1/6] better text fitting --- index.html | 10 ++++++---- main.js | 53 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/index.html b/index.html index 83ff437..cc39440 100644 --- a/index.html +++ b/index.html @@ -23,9 +23,7 @@
  • Remaining meeting time: {{ timeText(totalRemainingTime) }}
  • -
  • - End estimated at: {{ timeText(estimatedEnd) }} -
  • +
  • End estimated at: {{ timeText(estimatedEnd) }}
  • Total meeting time: {{ timeText(totalTime) }}
  •   line.trim()) @@ -201,29 +210,27 @@ let app = { this.timerEnd = new Date( new Date().getTime() + this.selectedData.time * 60 * 1000 ); - this.beepTimer = setTimeout( - () => { - this.beep(); - }, this.selectedData.time * 60 * 1000 - ); + this.beepTimer = setTimeout(() => { + this.beep(); + }, this.selectedData.time * 60 * 1000); } else { document.title = "Meeting Roulette"; } }, setCookie(cname, cvalue, exdays) { const d = new Date(); - d.setTime(d.getTime() + (exdays*24*60*60*1000)); - let expires = "expires="+ d.toUTCString(); + d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); + let expires = "expires=" + d.toUTCString(); console.log(cname + "=" + cvalue + "; path=/; " + expires); document.cookie = cname + "=" + cvalue + "; path=/; " + expires; }, getCookie(cname, defaultValue) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); - let ca = decodedCookie.split(';'); - for(let i = 0; i { From c53a4f1a19c41b242d91f090118d85adf649555c Mon Sep 17 00:00:00 2001 From: Klemek Date: Mon, 28 Oct 2024 22:50:34 +0100 Subject: [PATCH 2/6] Update main.js --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 4694276..16de2a2 100644 --- a/main.js +++ b/main.js @@ -127,7 +127,7 @@ let app = { }, 150); }, timeText(minutes) { - if (minutes > 60) { + if (minutes >= 60) { return `${Math.floor(minutes / 60)}h${String(minutes % 60).padStart( 2, "0" From dd52c8e8d8bc9e69f7551c1eda3532ac9b827dad Mon Sep 17 00:00:00 2001 From: Klemek Date: Mon, 28 Oct 2024 22:50:49 +0100 Subject: [PATCH 3/6] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index cc39440..af03c7d 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@
  • End estimated at: {{ timeText(estimatedEnd) }}
  • Total meeting time: {{ timeText(totalTime) }}
  • -  Weighted topics  Date: Mon, 28 Oct 2024 23:44:50 +0100 Subject: [PATCH 4/6] Update main.js --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 16de2a2..f62cc37 100644 --- a/main.js +++ b/main.js @@ -126,8 +126,8 @@ let app = { }, 1000); }, 150); }, - timeText(minutes) { - if (minutes >= 60) { + timeText(minutes, hour = false) { + if (hour || minutes >= 60) { return `${Math.floor(minutes / 60)}h${String(minutes % 60).padStart( 2, "0" From 2ed4513b0bb28b1c2f8f5159fc179d1f690006e3 Mon Sep 17 00:00:00 2001 From: Klemek Date: Mon, 28 Oct 2024 23:45:08 +0100 Subject: [PATCH 5/6] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index af03c7d..5562be6 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@
  • Remaining meeting time: {{ timeText(totalRemainingTime) }}
  • -
  • End estimated at: {{ timeText(estimatedEnd) }}
  • +
  • End estimated at: {{ timeText(estimatedEnd, true) }}
  • Total meeting time: {{ timeText(totalTime) }}
  •   Date: Mon, 28 Oct 2024 23:46:29 +0100 Subject: [PATCH 6/6] Update index.html --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 5562be6..2c270ca 100644 --- a/index.html +++ b/index.html @@ -21,12 +21,12 @@