-
-
-
- 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">
+ <div id="mainBoard" v-show="!!curProb">
+ <div id="instructions-div" class="section-content">
+ <p id="problem-instructions">
+ {{ curProb.instructions }}
+ </p>
+ </div>
+ <my-game :fen="curProb.fen" :mode="analyze" :allowMovelist="true" :settings="settings">
+ </my-board>
+ <div id="solution-div" class="section-content">
+ <h3 class="clickable" @click="showSolution = !showSolution">
+ {{ translations["Show solution"] }}
+ </h3>
+ <p id="problem-solution" v-show="showSolution">
+ {{ curProb.solution }}
+ </p>
+ </div>
+ <button @click="displayList()">
+ <span>Back to list display</span>
+ </button>
+ </div>
+ <div>
+ <input type="text" placeholder="Type problem number" v-model="pbNum"/>
+ <button @click="showProblem()">
+ <span>Show problem</span>
+ </button>
+ </div>
+ <button v-if="!!userId" @click="toggleListDisplay()">
+ <span>My problems (only)</span>
+ </button>
+ <my-problem-summary v-show="!curProb"
+ v-on:edit-problem="editProblem(p)" v-on:delete-problem="deleteProblem(p.id)"
+ v-for="p in curProblems" @click="curProb=p"
+ v-bind:prob="p" v-bind:userid="userId" v-bind:key="p.id">