Skip to content

Commit 7669d2d

Browse files
committed
only show whole seconds for timer
1 parent e6f13f9 commit 7669d2d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/views/scoring/[email protected]/Technical.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
label="Timer"
55
color="none"
66
class="col-start-1 row-start-1"
7-
:value="formatTime(duration, 1)"
7+
:value="formatTime(duration)"
88
disabled
99
/>
1010

@@ -52,7 +52,7 @@
5252
label="Start Timer"
5353
color="green"
5454
class="col-start-1 row-start-1"
55-
:value="formatTime(duration, 1)"
55+
:value="formatTime(duration)"
5656
:disabled="!!scoresheet?.completedAt"
5757
@click="addMark({ schema: 'resumeTimer' })"
5858
/>
@@ -61,7 +61,7 @@
6161
label="Pause Timer"
6262
color="orange"
6363
class="col-start-1 row-start-1"
64-
:value="formatTime(duration, 1)"
64+
:value="formatTime(duration)"
6565
:disabled="!!scoresheet?.completedAt"
6666
@click="addMark({ schema: 'pauseTimer' })"
6767
/>
@@ -247,7 +247,7 @@ useIntervalFn(() => {
247247
248248
const eventDuration = computed(() => cEvtDef.value?.timing.split('x').map(v => parseInt(v, 10)).reduce((a, b) => a * b, 1) ?? 0)
249249
250-
function formatTime (seconds: number, decimals = 0) {
251-
return `${Math.floor(seconds / 60)}:${(seconds % 60).toFixed(decimals).padStart(2, '0')}`
250+
function formatTime (seconds: number) {
251+
return `${Math.floor(seconds / 60)}:${Math.floor(seconds % 60).toFixed(0).padStart(2, '0')}`
252252
}
253253
</script>

0 commit comments

Comments
 (0)