From 4f559f0a2ee046a492ac2edebda68e481b4b06b5 Mon Sep 17 00:00:00 2001 From: Martin Betz Date: Mon, 1 Apr 2024 14:10:56 +0200 Subject: [PATCH] Fix: Add minutes via button when countdown is not running --- src/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 178e885..84f6480 100644 --- a/src/index.html +++ b/src/index.html @@ -221,7 +221,13 @@ }, addMinutes(minutes) { - this.remainingSeconds += minutes * 60; + if (!this.isRunning) { + this.durationMinutes += minutes; + this.remainingSeconds = this.durationMinutes * 60; + this.updateSliderValue(); + } else { + this.remainingSeconds += minutes * 60; + } }, stopTimer() {