diff --git a/src/components/timer.vue b/src/components/timer.vue index 7d01587..8d1023a 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -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() {