Skip to content

Commit 6df1d4e

Browse files
committed
bugfix
1 parent a68921e commit 6df1d4e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

resources/js/Components/FlashCard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ export default {
4040
4141
watch: {
4242
flipped(newValue) {
43+
const newDisplayValue = this.displayedValue == this.question ? this.answer : this.question
4344
this.gotFlipped = false;
4445
new Promise((resolve) => setTimeout(resolve, 150)).then(
4546
() =>
46-
(this.displayedValue = newValue
47-
? this.answer
48-
: this.question)
47+
(this.displayedValue = newDisplayValue)
4948
);
5049
new Promise((resolve) => setTimeout(resolve, 320)).then(
5150
() => (this.gotFlipped = true)
@@ -54,6 +53,7 @@ export default {
5453
5554
answer(newAnswer) {
5655
this.displayedValue = newAnswer;
56+
5757
},
5858
5959
question(newQuestion) {

resources/js/Pages/Set/Train.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ export default {
5656
if (event.code === "Space") {
5757
this.showAnswer = !this.showAnswer;
5858
}
59+
else if(event.code == "Digit1"){
60+
this.repeat();
61+
} else if(event.code == "Digit2"){
62+
this.completed();
63+
}
64+
console.log(event.code)
5965
},
6066
6167
repeat() {

0 commit comments

Comments
 (0)