From 4078377ce544640b00302238f249689fceaee47c Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Thu, 14 Aug 2025 00:02:26 +0200 Subject: [PATCH] disable timer form submit while posting. wait until it returns --- src/components/timer.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/timer.vue b/src/components/timer.vue index 2314a88..b441d66 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -46,6 +46,7 @@ export default { data() { return { + submitting:false, startTime:0, savedPreviousSeconds:0, totalSeconds:0, @@ -68,6 +69,11 @@ formatSeconds, submit(event){ event.preventDefault(); + if(this.submitting){ + return + } else { + this.submitting = true + } const reqBody = { description:description.value, seconds: this.totalSeconds, @@ -97,6 +103,9 @@ this.manualSeconds = 0 window.localStorage.setItem('lastTotalSeconds', this.totalSeconds); this.$emit('loggedTime', reqBody) + this.submitting = false + },()=>{ + this.submitting = false }); }, @@ -238,7 +247,7 @@ - +