(update) add info card about the current question for the game master
This commit is contained in:
@@ -3,14 +3,36 @@
|
|||||||
<v-card-title class="card__title primary" @click="toggleCardSize">
|
<v-card-title class="card__title primary" @click="toggleCardSize">
|
||||||
<v-icon left class="white--text pr-5 pl-2" size="40">mdi-play-network-outline</v-icon>
|
<v-icon left class="white--text pr-5 pl-2" size="40">mdi-play-network-outline</v-icon>
|
||||||
Solution </v-card-title>
|
Solution </v-card-title>
|
||||||
<v-container class="text-center">
|
<v-container class="text-center" v-if="currentQuestion">
|
||||||
<v-row justify="center">
|
<div class="text-h6 mb-2">Question {{ currentQuestionIndex + 1 }}</div>
|
||||||
<v-container class="text-center"> <!-- Utilisation de styles CSS personnalisés pour centrer l'image -->
|
<div class="text-body-1 font-weight-bold mb-4">{{ currentQuestion.QuestionText }}</div>
|
||||||
<v-img width="450" src="@/assets/copilot-solution-FULL-HD.jpg" style="margin: 0 auto;">
|
|
||||||
</v-img>
|
<v-divider class="mb-4"></v-divider>
|
||||||
</v-container>
|
|
||||||
</v-row>
|
<v-btn
|
||||||
|
:color="showSolution ? 'red' : 'green'"
|
||||||
|
class="mb-4"
|
||||||
|
@click="showSolution = !showSolution"
|
||||||
|
>
|
||||||
|
{{ showSolution ? 'Masquer Solution' : 'Voir Solution' }}
|
||||||
|
</v-btn>
|
||||||
|
|
||||||
|
<v-slide-y-transition>
|
||||||
|
<div v-if="showSolution" class="solution-block">
|
||||||
|
<div class="text-h5 success--text mb-2">{{ currentQuestion.MasterData.CorrectAnswer }}</div>
|
||||||
|
<div class="text-body-2 grey--text text--lighten-1 mb-2">
|
||||||
|
<v-icon small>mdi-information</v-icon> {{ currentQuestion.MasterData.MasterNotes }}
|
||||||
|
</div>
|
||||||
|
<div class="text-body-2 info--text">
|
||||||
|
<v-icon small>mdi-help-circle</v-icon> {{ currentQuestion.MasterData.Help }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</v-slide-y-transition>
|
||||||
|
|
||||||
</v-container>
|
</v-container>
|
||||||
|
<v-container v-else class="text-center">
|
||||||
|
<div class="text-caption">Aucun quiz chargé ou fin du quiz.</div>
|
||||||
|
</v-container>
|
||||||
</v-card>
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
@@ -34,13 +56,18 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
import quizStore from '@/store/quizStore';
|
||||||
|
|
||||||
// Variable pour contrôler l'état de la carte
|
// Variable pour contrôler l'état de la carte
|
||||||
const isCardReduced = ref(false);
|
const isCardReduced = ref(false);
|
||||||
|
const showSolution = ref(false);
|
||||||
|
|
||||||
// Méthode pour basculer l'état de la carte
|
// Méthode pour basculer l'état de la carte
|
||||||
function toggleCardSize() {
|
function toggleCardSize() {
|
||||||
isCardReduced.value = !isCardReduced.value;
|
isCardReduced.value = !isCardReduced.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const currentQuestion = quizStore.getters.currentQuestion;
|
||||||
|
const currentQuestionIndex = quizStore.getters.currentQuestionIndex;
|
||||||
</script>
|
</script>
|
||||||
Reference in New Issue
Block a user