X-Git-Url: https://git.auder.net/variants/Bario/complete_rules.html?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FProblems.vue;h=7c81e6782447e4e0dec7263f1f09755cfe215b6e;hb=bd76b45611cbb58dcf774745a4d690277a82aacd;hp=e8e63f8fff5b125aea0cccb7bbfcbf957c914b2d;hpb=d8b1800bcec983faabc34bdb1057ef880488a160;p=vchess.git
diff --git a/client/src/views/Problems.vue b/client/src/views/Problems.vue
index e8e63f8f..7c81e678 100644
--- a/client/src/views/Problems.vue
+++ b/client/src/views/Problems.vue
@@ -17,48 +17,46 @@ main
)
| {{ v.name }}
fieldset
- label(for="inputFen") FEN
input#inputFen(
type="text"
+ placeholder="FEN"
v-model="curproblem.fen"
@input="trySetDiagram(curproblem)"
)
- div(v-html="curproblem.diag")
+ #diagram(v-html="curproblem.diag")
fieldset
- textarea#instructions(
+ textarea(
:placeholder="st.tr['Instructions']"
v-model="curproblem.instruction"
)
p(v-html="parseHtml(curproblem.instruction)")
fieldset
- textarea#solution(
+ textarea(
:placeholder="st.tr['Solution']"
v-model="curproblem.solution"
)
p(v-html="parseHtml(curproblem.solution)")
button(@click="sendProblem()") {{ st.tr["Send"] }}
#dialog.text-center {{ st.tr[infoMsg] }}
- .row
- .col-sm-12
- button#newProblem(onClick="doClick('modalNewprob')")
- | {{ st.tr["New problem"] }}
.row(v-if="showOne")
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- #actions
- button(@click="showOne=false") {{ st.tr["Back to list"] }}
- button(
+ #topPage
+ span {{ curproblem.vname }}
+ button.marginleft(@click="backToList()") {{ st.tr["Back to list"] }}
+ button.nomargin(
v-if="st.user.id == curproblem.uid"
@click="editProblem(curproblem)"
)
| {{ st.tr["Edit"] }}
- button(
+ button.nomargin(
v-if="st.user.id == curproblem.uid"
@click="deleteProblem(curproblem)"
)
| {{ st.tr["Delete"] }}
- h4 {{ curproblem.vname }}
- p(v-html="parseHtml(curproblem.instruction)")
- h4(@click="curproblem.showSolution=!curproblem.showSolution")
+ p.clickable(
+ v-html="curproblem.uname + ' : ' + parseHtml(curproblem.instruction)"
+ @click="curproblem.showSolution=!curproblem.showSolution"
+ )
| {{ st.tr["Show solution"] }}
p(
v-show="curproblem.showSolution"
@@ -66,38 +64,42 @@ main
)
.row(v-else)
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- label(for="checkboxMine") {{ st.tr["My problems"] }}
- input#checkboxMine(
- type="checkbox"
- v-model="onlyMines"
- )
- label(for="selectVariant") {{ st.tr["Variant"] }}
- select#selectVariant(v-model="selectedVar")
- option(
- v-for="v in [emptyVar].concat(st.variants)"
- :value="v.id"
+ #controls
+ button#newProblem(onClick="doClick('modalNewprob')")
+ | {{ st.tr["New problem"] }}
+ label(for="checkboxMine") {{ st.tr["My problems"] }}
+ input#checkboxMine(
+ type="checkbox"
+ v-model="onlyMines"
)
- | {{ v.name }}
- div(
- v-for="p in problems"
- v-show="displayProblem(p)"
- @click="showProblem(p)"
- )
- h4 {{ p.vname }}
- p {{ p.fen }}
- p(v-html="p.instruction")
+ label(for="selectVariant") {{ st.tr["Variant"] }}
+ select#selectVariant(v-model="selectedVar")
+ option(
+ v-for="v in [emptyVar].concat(st.variants)"
+ :value="v.id"
+ )
+ | {{ v.name }}
+ table
+ tr
+ th {{ st.tr["Variant"] }}
+ th {{ st.tr["Instructions"] }}
+ tr(
+ v-for="p in problems"
+ v-show="displayProblem(p)"
+ @click="setHrefPid(p)"
+ )
+ td {{ p.vname }}
+ td(v-html="p.instruction")
BaseGame(v-if="showOne" :game="game" :vr="vr")