|
|
|
|
@ -44,7 +44,10 @@
|
|
|
|
|
this.running = true;
|
|
|
|
|
this.intervalID = setInterval(()=>{
|
|
|
|
|
this.totalSeconds = getAccumulatedSeconds(Date.now(), this.startTime) + this.savedPreviousSeconds;
|
|
|
|
|
}, 1000);
|
|
|
|
|
}, 100);
|
|
|
|
|
},
|
|
|
|
|
updateSavedPreviousSeconds(event){
|
|
|
|
|
this.savedPreviousSeconds = parseInt(event.target.value);
|
|
|
|
|
},
|
|
|
|
|
stop(event){
|
|
|
|
|
this.running = false;
|
|
|
|
|
@ -75,7 +78,7 @@
|
|
|
|
|
<input v-model="description" type="text"/>
|
|
|
|
|
|
|
|
|
|
<label>Seconds</label>
|
|
|
|
|
<input v-model="totalSeconds" type="number"/>
|
|
|
|
|
<input @change="updateSavedPreviousSeconds" v-model="totalSeconds" type="number"/>
|
|
|
|
|
|
|
|
|
|
<label>Comments</label>
|
|
|
|
|
<textarea v-model="comments"/>
|
|
|
|
|
|