- <div id="problemControls" class="button-group">
- <button :aria-label='translate("Load previous problem")' class="tooltip"
- @click="showPreviousProblem()">
- <i class="material-icons">skip_previous</i>
- </button>
- <button :aria-label='translate("Add a problem")' class="tooltip"
- @click="showNewproblemModal">
- {{ translate("New") }}
- </button>
- <button :aria-label='translate("Load next problem")' class="tooltip"
- @click="showNextProblem()">
- <i class="material-icons">skip_next</i>
- </button>
- </div>
- --> OK, mais ces flèches n'ont pas la même action selon les vues
- --> fetchN si liste, problème suivant/précédent sinon
-
-
-board qui bouge et activé que si #hash donnant numéro du problème
-deux listes : tous les problèmes sauf les miens
- + les miens
-
-
-//TODO: filter "my problems" ==> liste séparée (lors de la requête serveur)
---> bouton plutôt sous l'échiquier après soluce (sauf si anonymous)
---> puis dans la vue "my problems (listing échiquier gauche / instrus + soluce cachée à droite
-if (this.mode == "problem")
- {
- // Show problem instructions
- elementArray.push(
- h('div',
- {
- attrs: { id: "instructions-div" },
- "class": {
- "clearer": true,
- "section-content": true,
- },
- },
- [
- h('p',
- {
- attrs: { id: "problem-instructions" },
- domProps: { innerHTML: this.problem.instructions }
- }
- )
- ]
- )
- );
- }
-
-
- // TODO ici :: instrus + diag interactif + solution
- my-board + pilotage via movesList + VariantRules !
-
- <my-problem-preview v-show="stage=='preview'"
- v-for="(p,idx) in problems"
- v-bind:prob="p" v-bind:preview="false" v-bind:key="idx">
- </my-problem-summary>
- if (this.mode == "problem")
- {
- // Show problem solution (on click)
- elementArray.push(
- h('div',
- {
- attrs: { id: "solution-div" },
- "class": { "section-content": true },
- },
- [
- h('h3',
- {
- "class": { clickable: true },
- domProps: { innerHTML: translations["Show solution"] },
- on: { click: this.toggleShowSolution },
- }
- ),
- h('p',
- {
- attrs: { id: "problem-solution" },
- domProps: { innerHTML: this.problem.solution }
- }
- )
- ]
- )
- );
- }
-
- <input type="checkbox" id="modal-newproblem" class="modal">
- <div role="dialog" aria-labelledby="newProblemTxt">
- <div v-show="stage=='nothing'" class="card newproblem-form">
- <label for="modal-newproblem" class="modal-close"></label>
- <h3 id="newProblemTxt">{{ translate("Add a problem") }}</h3>
- <form @submit.prevent="previewNewProblem">