Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanni8 committed Mar 31, 2024
1 parent a68921e commit 6df1d4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/js/Components/FlashCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ export default {
watch: {
flipped(newValue) {
const newDisplayValue = this.displayedValue == this.question ? this.answer : this.question
this.gotFlipped = false;
new Promise((resolve) => setTimeout(resolve, 150)).then(
() =>
(this.displayedValue = newValue
? this.answer
: this.question)
(this.displayedValue = newDisplayValue)
);
new Promise((resolve) => setTimeout(resolve, 320)).then(
() => (this.gotFlipped = true)
Expand All @@ -54,6 +53,7 @@ export default {
answer(newAnswer) {
this.displayedValue = newAnswer;
},
question(newQuestion) {
Expand Down
6 changes: 6 additions & 0 deletions resources/js/Pages/Set/Train.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export default {
if (event.code === "Space") {
this.showAnswer = !this.showAnswer;
}
else if(event.code == "Digit1"){
this.repeat();
} else if(event.code == "Digit2"){
this.completed();
}
console.log(event.code)
},
repeat() {
Expand Down

0 comments on commit 6df1d4e

Please sign in to comment.