mirror of
https://github.com/LucasVbr/own-workspace.git
synced 2026-05-13 17:21:58 +00:00
🚸 - Reset button
Can only click once on the button when it has been reset
This commit is contained in:
@@ -34,10 +34,10 @@
|
|||||||
<br>
|
<br>
|
||||||
Total sessions: {{ this.nbSessions }}
|
Total sessions: {{ this.nbSessions }}
|
||||||
<br>
|
<br>
|
||||||
<span id="hint">(from last session)</span>
|
<span id="hint">(last + current session)</span>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<button @click="resetStats" class="btn" id="reset">
|
<button @click="resetStats" class="btn" id="reset-stats" :disabled="resetDone">
|
||||||
🔁 Reset
|
🔁 Reset last session
|
||||||
</button>
|
</button>
|
||||||
<br>
|
<br>
|
||||||
<button class="btn" id="see-words" @click="displayWord = true">
|
<button class="btn" id="see-words" @click="displayWord = true">
|
||||||
@@ -62,6 +62,7 @@ export default {
|
|||||||
definition: '',
|
definition: '',
|
||||||
},
|
},
|
||||||
displayWord: true,
|
displayWord: true,
|
||||||
|
resetDone: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -141,7 +142,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
resetStats() {
|
resetStats() {
|
||||||
|
this.resetDone = true;
|
||||||
this.$store.commit('resetStats');
|
this.$store.commit('resetStats');
|
||||||
|
console.log(this.resetDone)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -230,7 +233,7 @@ export default {
|
|||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
}
|
}
|
||||||
|
|
||||||
#reset {
|
#reset-stats {
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user