modifs kahoot (popup, bootstrap, methodes a completer) #19

Merged
gwenael.planchon merged 4 commits from front-kahoot-modal into front 4 months ago

@ -2,10 +2,28 @@
export default {
data() {
return {
//creer partie (ajouter verif aux inputs)
titreKahoot:"",
nbQuestions:0,
//rejoindre partie
codeKahoot:"",
}
},
methods:{
methods:{
// TODO : demander a l'api de creer un kahoot (et rediriger vers la partie si possible via HATEOAS)
creerKahoot: function(){
console.log("yay")
//this.titreKahoot et this.nbQuestions synchronisés avec v-model
console.log(this.titreKahoot)
console.log(this.nbQuestions)
},
// TODO : demander a l'api de rejoindre un kahoot (et rediriger vers la partie si possible via HATEOAS)
rejoindrePartie: function(){
console.log("yay")
//this.titreKahoot et this.nbQuestions synchronisés avec v-model
console.log(this.codeKahoot)
},
}
}
</script>
@ -19,44 +37,62 @@ export default {
<h1 style="padding-left: 0.5em;">Kahoot</h1>
<div class="Kahoot-Header">
<h2>Rejoindre un Kahoot</h2>
<form>
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#createKahootModal">
Créer un Kahoot
</button>
<form @submit.prevent>
<label for="Kahoot-Code">Code</label>
<input type="text" id="Kahoot-Code" name="Kahoot-Code">
<button class="Kahoot-Join-Button">Rejoindre</button>
<input type="text" id="Kahoot-Code" name="Kahoot-Code" v-model="codeKahoot">
<button class="btn btn-light" v-on:click="rejoindrePartie">Rejoindre</button>
</form>
</div>
<div class="Kahoot-content">
<div class="Kahoot-Create">
<h2>Créer un Kahoot</h2> <!-- TODO : Il faut changer le formulaire pour juste cliquer sur un bouton et que ça affiche une pop-up -->
<form>
<label for="Kahoot-Create-Title">Titre</label>
<input type="text" id="Kahoot-Create-Title" name="Kahoot-Create-Title">
<label for="Kahoot-Create-Questions">Nombre de questions</label>
<input type="number" id="Kahoot-Create-Questions" name="Kahoot-Create-Questions">
<button class="Kahoot-Create-Button">Créer</button>
</form>
</div>
<div class="Kahoot-List">
<h2> Vos Quizz</h2>
<div class="Kahoot-List-Item">
<h2>Titre du Kahoot</h2>
<p>Nombre de questions : 10</p>
<p>Créé par : Professeur X</p>
<button class="Kahoot-List-Item-Button">Jouer</button>
<button class="btn btn-dark">Jouer</button>
</div>
<div class="Kahoot-List-Item">
<h2>Titre du Kahoot</h2>
<p>Nombre de questions : 10</p>
<p>Créé par : Professeur X</p>
<button class="Kahoot-List-Item-Button">Jouer</button>
<button class="btn btn-dark">Jouer</button>
</div>
<div class="Kahoot-List-Item">
<h2>Titre du Kahoot</h2>
<p>Nombre de questions : 10</p>
<p>Créé par : Professeur X</p>
<button class="Kahoot-List-Item-Button">Jouer</button>
<button class="btn btn-dark">Jouer</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="createKahootModal" tabindex="-1" role="dialog" aria-labelledby="creationKahoot" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title" id="creationKahoot">Créer un Kahoot</h2> <!-- TODO : Il faut changer le formulaire pour juste cliquer sur un bouton et que ça affiche une pop-up -->
</div>
<form @submit.prevent>
<div class="modal-body">
<div>
<label for="Kahoot-Create-Title">Titre</label>
<input type="text" id="Kahoot-Create-Title" name="Kahoot-Create-Title" v-model="titreKahoot">
</div>
<div>
<label for="Kahoot-Create-Questions">Nombre de questions</label>
<input type="number" id="Kahoot-Create-Questions" name="Kahoot-Create-Questions" v-model="nbQuestions">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annuler</button>
<button class="btn btn-primary" v-on:click="creerKahoot">Créer</button>
</div>
</form>
</div>
</div>
</div>
</template>

Loading…
Cancel
Save