X-Git-Url: https://git.auder.net/assets/current/gitweb.js?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FProblems.vue;h=e17bead7ea68ff4cfb5b1991a5d6dbddbdb12ba4;hb=df647c70b4148894c7d87fc499df5a9050347aec;hp=7c81e6782447e4e0dec7263f1f09755cfe215b6e;hpb=bd76b45611cbb58dcf774745a4d690277a82aacd;p=vchess.git
diff --git a/client/src/views/Problems.vue b/client/src/views/Problems.vue
index 7c81e678..e17bead7 100644
--- a/client/src/views/Problems.vue
+++ b/client/src/views/Problems.vue
@@ -1,7 +1,13 @@
main
- input#modalNewprob.modal(type="checkbox" @change="infoMsg=''")
- div#newprobDiv(role="dialog" data-checkbox="modalNewprob")
+ input#modalNewprob.modal(
+ type="checkbox"
+ @change="infoMsg=''"
+ )
+ div#newprobDiv(
+ role="dialog"
+ data-checkbox="modalNewprob"
+ )
.card(@keyup.enter="sendProblem()")
label#closeNewprob.modal-close(for="modalNewprob")
fieldset
@@ -39,9 +45,10 @@ main
button(@click="sendProblem()") {{ st.tr["Send"] }}
#dialog.text-center {{ st.tr[infoMsg] }}
.row(v-if="showOne")
- .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
+ .col-sm-12.col-md-10.col-md-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"
@@ -54,7 +61,7 @@ main
)
| {{ st.tr["Delete"] }}
p.clickable(
- v-html="curproblem.uname + ' : ' + parseHtml(curproblem.instruction)"
+ 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 +340,37 @@ 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
+
#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