Refactor: layout
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>Challenge</v-card-title>
|
<v-card-title>Challenge</v-card-title>
|
||||||
|
<v-card-subtitle>Teste dein Wissen, indem du in Quizduellen gegen deine Kommilitonen antrittst!</v-card-subtitle>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-btn depressed color="success" class="my-3" @click="playVersus">
|
<v-btn large depressed color="success" class="my-3" @click="playVersus">
|
||||||
<v-icon left>mdi-play</v-icon>
|
<v-icon left>mdi-play</v-icon>
|
||||||
Spielen
|
Spielen
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
<v-divider></v-divider>
|
||||||
<v-expansion-panels v-model="expPanel" accordion class="text-subtitle-1 font-weight-medium">
|
<v-expansion-panels v-model="expPanel" accordion class="text-subtitle-1 font-weight-medium">
|
||||||
<v-expansion-panel>
|
<v-expansion-panel>
|
||||||
<v-expansion-panel-header>
|
<v-expansion-panel-header>
|
||||||
@@ -37,19 +39,31 @@
|
|||||||
Persönliche Statistik
|
Persönliche Statistik
|
||||||
</v-expansion-panel-header>
|
</v-expansion-panel-header>
|
||||||
<v-expansion-panel-content>
|
<v-expansion-panel-content>
|
||||||
<v-card-title>
|
<v-row>
|
||||||
Spiele {{ games.won + games.lost + games.tie }}
|
<v-col cols="auto">
|
||||||
</v-card-title>
|
<div class="text-subtitle-1">Spiele:</div>
|
||||||
<v-card-subtitle>
|
<div class="text-body-2">Siege:</div>
|
||||||
<div>Siege: {{ games.won }}</div>
|
<div class="text-body-2">Unentschieden:</div>
|
||||||
<div>Unentschieden: {{ games.lost }}</div>
|
<div class="text-body-2">Niederlagen:</div>
|
||||||
<div>Niederlagen: {{ games.tie }}</div>
|
</v-col>
|
||||||
<div>Fragen: {{ games.questionsCorrect + games.questionsIncorrect }}</div>
|
<v-col cols="auto">
|
||||||
<div>Richtig: {{ questionsCorrectPercent }}%</div>
|
<div class="text-subtitle-1">{{ games.won + games.lost + games.tie }}</div>
|
||||||
</v-card-subtitle>
|
<div class="text-body-2">{{ games.won }}</div>
|
||||||
<v-card-text>
|
<div class="text-body-2">{{ games.tie }}</div>
|
||||||
{{ text }}
|
<div class="text-body-2">{{ games.lost }}</div>
|
||||||
</v-card-text>
|
</v-col>
|
||||||
|
<v-col cols="auto">
|
||||||
|
<div class="text-subtitle-1">Fragen:</div>
|
||||||
|
<div class="text-body-2">Richtig:</div>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="auto">
|
||||||
|
<div class="text-subtitle-1">{{ games.questionsCorrect + games.questionsIncorrect }}</div>
|
||||||
|
<div class="text-body-2">{{ questionsCorrectPercent }}%</div>
|
||||||
|
</v-col>
|
||||||
|
<v-col cols="12" class="text-body-2">
|
||||||
|
{{ text }}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
</v-expansion-panel-content>
|
</v-expansion-panel-content>
|
||||||
</v-expansion-panel>
|
</v-expansion-panel>
|
||||||
<v-expansion-panel>
|
<v-expansion-panel>
|
||||||
@@ -93,7 +107,7 @@ export default {
|
|||||||
return percent ? Math.round(parseFloat(percent)) : 100 // Convert to float, then round to closest int
|
return percent ? Math.round(parseFloat(percent)) : 100 // Convert to float, then round to closest int
|
||||||
},
|
},
|
||||||
text () {
|
text () {
|
||||||
if (this.questionsAnswered >= 20 && this.questionsCorrectPercent >= 90) {
|
if (this.questionsAnswered >= 20 && this.questionsCorrectPercent >= 85) {
|
||||||
return 'Du scheinst gut auf die Klausur vorbereitet zu sein. Viel Glück!'
|
return 'Du scheinst gut auf die Klausur vorbereitet zu sein. Viel Glück!'
|
||||||
} else {
|
} else {
|
||||||
return 'Wir empfehlen Dir noch ein wenig zu üben, bevor du zur Klausur antrittst.'
|
return 'Wir empfehlen Dir noch ein wenig zu üben, bevor du zur Klausur antrittst.'
|
||||||
|
|||||||
Reference in New Issue
Block a user