formatSeconds defaults to true for includeHours param

practiced-songs
Matthew Huntington 1 year ago
parent 54c825827f
commit bc211c3f2b

@ -30,11 +30,11 @@
<template>
<h2 @click="refresh">Time Summary</h2>
<h3>Mins Left to Practice Today</h3>
{{formatSeconds(seconds_left_to_practice_today,true)}}
{{formatSeconds(seconds_left_to_practice_today)}}
<h3>To Get Ahead</h3>
{{formatSeconds(seconds_left_to_get_ahead,true)}}
{{formatSeconds(seconds_left_to_get_ahead)}}
<h3>Mins Practiced Today</h3>
{{formatSeconds(seconds_practiced_today,true)}}
{{formatSeconds(seconds_practiced_today)}}
</template>
<style scoped>

@ -162,7 +162,7 @@
<h2>Timer</h2>
<div :class="{running:running, micThresholdExceeded:micThresholdExceeded}">
<em>
{{formatSeconds(totalSeconds, true)}}
{{formatSeconds(totalSeconds)}}
</em>
Mic Threshold (current level: {{Math.round(micLevel)}}):
<input type="number" @change="activateMic" v-model="micThreshold"/>

@ -18,7 +18,7 @@ const getAccumulatedSeconds = (newerTime, olderTime) => {
return Math.floor((newerTime-olderTime)/1000);
}
const formatSeconds = (total, includeHours = false) => {
const formatSeconds = (total, includeHours = true) => {
const timeObj = createTimeObj(Math.abs(total))
let result = (total < 0) ? '-' : ''
if(includeHours) {

Loading…
Cancel
Save