X-Git-Url: https://git.auder.net/images/pieces/Cwda/bd.svg?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FProblems.vue;h=1e8ff6895344fceb26e85c3d9050d1e91e8b7314;hb=bec548e70ef8ff16d89b87e769e86a2de408d0d8;hp=7c81e6782447e4e0dec7263f1f09755cfe215b6e;hpb=bd76b45611cbb58dcf774745a4d690277a82aacd;p=vchess.git
diff --git a/client/src/views/Problems.vue b/client/src/views/Problems.vue
index 7c81e678..1e8ff689 100644
--- a/client/src/views/Problems.vue
+++ b/client/src/views/Problems.vue
@@ -1,8 +1,14 @@
main
- input#modalNewprob.modal(type="checkbox" @change="infoMsg=''")
- div#newprobDiv(role="dialog" data-checkbox="modalNewprob")
- .card(@keyup.enter="sendProblem()")
+ input#modalNewprob.modal(
+ type="checkbox"
+ @change="infoMsg=''"
+ )
+ div#newprobDiv(
+ role="dialog"
+ data-checkbox="modalNewprob"
+ )
+ .card
label#closeNewprob.modal-close(for="modalNewprob")
fieldset
label(for="selectVariant") {{ st.tr["Variant"] }}
@@ -41,7 +47,8 @@ main
.row(v-if="showOne")
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
#topPage
- span {{ curproblem.vname }}
+ span.vname {{ curproblem.vname }}
+ span.uname ({{ curproblem.uname }})
button.marginleft(@click="backToList()") {{ st.tr["Back to list"] }}
button.nomargin(
v-if="st.user.id == curproblem.uid"
@@ -53,8 +60,8 @@ main
@click="deleteProblem(curproblem)"
)
| {{ st.tr["Delete"] }}
- p.clickable(
- v-html="curproblem.uname + ' : ' + parseHtml(curproblem.instruction)"
+ p.oneInstructions.clickable(
+ v-html="parseHtml(curproblem.instruction)"
@click="curproblem.showSolution=!curproblem.showSolution"
)
| {{ st.tr["Show solution"] }}
@@ -65,7 +72,7 @@ main
.row(v-else)
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
#controls
- button#newProblem(onClick="doClick('modalNewprob')")
+ button#newProblem(onClick="window.doClick('modalNewprob')")
| {{ st.tr["New problem"] }}
label(for="checkboxMine") {{ st.tr["My problems"] }}
input#checkboxMine(
@@ -83,14 +90,20 @@ main
tr
th {{ st.tr["Variant"] }}
th {{ st.tr["Instructions"] }}
+ th {{ st.tr["Number"] }}
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")
+ td {{ firstChars(p.instruction) }}
+ td {{ p.id }}
+ BaseGame(
+ v-if="showOne"
+ :game="game"
+ :vr="vr"
+ )
@@ -323,26 +343,42 @@ export default {
[type="checkbox"].modal+div .card
max-width: 767px
max-height: 100%
+
#inputFen
width: 100%
+
textarea
width: 100%
+
#diagram
margin: 0 auto
max-width: 400px
+
#controls
margin: 0
width: 100%
text-align: center
& > *
margin: 0
+
+p.oneInstructions
+ margin: 0
+ padding: 2px 5px
+ background-color: lightgreen
+
#topPage
- span
+ span.vname
font-weight: bold
+ padding-left: var(--universal-margin)
+ span.uname
+ padding-left: var(--universal-margin)
margin: 0 auto
& > .nomargin
margin: 0
& > .marginleft
margin: 0 0 0 15px
+@media screen and (max-width: 767px)
+ #topPage
+ text-align: center