local storage remembers time

mic_level
mahuntington 2 years ago
parent 221dea7b58
commit ab3d868794

@ -71,6 +71,7 @@
this.running = true;
this.intervalID = setInterval(()=>{
this.totalSeconds = getAccumulatedSeconds(Date.now(), this.startTime) + this.savedPreviousSeconds;
window.localStorage.setItem('lastTotalSeconds', this.totalSeconds);
}, 100);
},
updateSavedPreviousSeconds(event){
@ -87,7 +88,7 @@
},
setSecondsManually(){
this.totalSeconds = this.manualHours*60*60 + this.manualMinutes*60 + this.manualSeconds;
console.log(this.manualHours, this.manualMinutes, this.manualSeconds);
window.localStorage.setItem('lastTotalSeconds', this.totalSeconds);
}
},
mounted() {

Loading…
Cancel
Save