From 8a578e44ed837a65b3e276ced05a928da0167728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20F=C3=BCrderer?= Date: Thu, 3 Sep 2020 11:29:19 +0200 Subject: [PATCH] Rename solution_revealed to correction_visible Needed a rename for clarification, because a feature will be added to actually show the final solution. --- index.html | 2 +- quiz.js | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index a5636b8..24e63c7 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,7 @@
-
{{ helptext }}
+
{{ helptext }}
diff --git a/quiz.js b/quiz.js index f764c3f..2b3f4b9 100644 --- a/quiz.js +++ b/quiz.js @@ -186,11 +186,11 @@ var app = new Vue({ items: shuffle_cards(0), }, solution: [], - solution_revealed: false, + correction_visible: false, }, computed: { helptext: function() { - if (this.solution_revealed) { + if (this.correction_visible) { if (this.solution_correct) { return [ "Perfekt! Die Reihenfolge ist korrekt.", @@ -223,7 +223,7 @@ var app = new Vue({ } }, revealing_text: function() { - if (this.all_inserted && !this.solution_revealed) { + if (this.all_inserted && !this.correction_visible) { if (this.store.section == 0) { return "Reihenfolge prüfen"; } else { @@ -261,7 +261,7 @@ var app = new Vue({ return this.store.section == 0 && this.store.selected != null; }, incorrects: function() { - if (!this.solution_revealed) { + if (!this.correction_visible) { return this.solution.map(elem => false); } if (this.store.section == 0) { @@ -275,7 +275,7 @@ var app = new Vue({ } }, solution_correct: function() { - return this.solution_revealed && this.all_inserted && !this.incorrects.includes(true); + return this.correction_visible && this.all_inserted && !this.incorrects.includes(true); }, reduced_store: function() { let width = 2; @@ -345,13 +345,13 @@ var app = new Vue({ } }, reveal_solution: function() { - this.solution_revealed = true; + this.correction_visible = true; }, open_next_column: function() { this.store.section++; this.store.selected = null; this.store.items = shuffle_cards(this.store.section); - this.solution_revealed = false; + this.correction_visible = false; }, add_card_to: function(row) { this.solution[row].idx.push(this.store.selected);