From 987c652ca008805eefce6d629a24bcc074b6ea4a Mon Sep 17 00:00:00 2001
From: Rakantor
Date: Sun, 13 Nov 2022 21:05:10 +0100
Subject: [PATCH] Refactor: mobile layout
---
components/CourseList.vue | 15 +++++++--------
components/DemoInfoDialog.vue | 20 +++++++-------------
pages/courses/_course/play.vue | 13 +++++++++----
pages/login.vue | 10 +++++++---
4 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/components/CourseList.vue b/components/CourseList.vue
index a78eecf..9392fea 100644
--- a/components/CourseList.vue
+++ b/components/CourseList.vue
@@ -3,7 +3,7 @@
-
+
-
+
{{ id.toUpperCase() }}
- {{ course.name }}
+ {{ course.name }}
-
+
{{ isFavoriteCourse(id) ? 'mdi-heart' : 'mdi-heart-outline' }}
@@ -51,16 +51,15 @@ export default {
return this.$store.state.user.courses && this.$store.state.user.courses.includes(courseID)
},
addToFavorites (courseID, add) {
- const gameRef = doc(this.$db, `benutzer/${this.$auth.currentUser.uid}`)
+ const userRef = doc(this.$db, `benutzer/${this.$auth.currentUser.uid}`)
- // Atomically add a new answer to the "player[ID]answers" array field.
- updateDoc(gameRef, {
+ updateDoc(userRef, {
kurse: add ? arrayUnion(courseID) : arrayRemove(courseID)
}).then((empty) => {
// Query execution was successful
add ? this.$store.commit('addFavoriteCourse', courseID) : this.$store.commit('removeFavoriteCourse', courseID)
}).catch((error) => {
- // Failed to update the game; display error message
+ // Failed; display error message
this.$toast({ content: error, color: 'error' })
})
}
diff --git a/components/DemoInfoDialog.vue b/components/DemoInfoDialog.vue
index b08d0f5..a638963 100644
--- a/components/DemoInfoDialog.vue
+++ b/components/DemoInfoDialog.vue
@@ -3,7 +3,7 @@
-
+
mdi-alert-circle-outline
Mit Demo-Account Anmelden
@@ -12,23 +12,17 @@
Information zu Demo-Accounts
- Folgende Features funktionieren:
-
- - Registrierung
- - Anmeldung
- - Verifizierung per E-Mail
- - Passwortrücksetzung per E-Mail
-
+ Da die E-Mails zur Kontoverifizierung und Passwortrücksetzung meist vom Spam-Filter
+ der IU-Mailserver geblockt werden, kann im Rahmen dieser Demo alternativ mit einem Demo-Account angemeldet werden.
- Alternativ zur Registrierung kann mit einem Demo-Account angemeldet werden:
-
-
+
+
Student
-
+
Tutor
-
+
Admin
diff --git a/pages/courses/_course/play.vue b/pages/courses/_course/play.vue
index 904a7d9..9008f97 100644
--- a/pages/courses/_course/play.vue
+++ b/pages/courses/_course/play.vue
@@ -3,7 +3,7 @@
- {{ game.player1name }} vs. {{ game.player2name || '???' }}
+ {{ game.player1name }} vs. {{ game.player2name || '?' }}
- {{ selectedQuestion.question }}
+ {{ selectedQuestion.question }}
@@ -21,8 +21,7 @@
:color="selectedQuestion.correctAnswer === answer ? answerColor : ''"
class="d-flex align-center"
height="150"
- :disabled="submittedAnswer !== null"
- @click="submitAnswer(answer)"
+ @click="submittedAnswer === null ? submitAnswer(answer) : nextQuestion()"
>
{{ answer }}
@@ -378,3 +377,9 @@ export default {
}
}
+
+
\ No newline at end of file
diff --git a/pages/login.vue b/pages/login.vue
index d611b96..94ae787 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -1,12 +1,14 @@
-
+
+
+
- Quiz App
-
+ Quiz App
+
@@ -102,6 +104,8 @@
+
+