X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FProblems.vue;h=3a700eabfd56887c9219225cf213c89bfb54d1ec;hp=e17bead7ea68ff4cfb5b1991a5d6dbddbdb12ba4;hb=866842c3c310524c034922870234120ed2a16cbf;hpb=8477e53d8e78606e4c4e4bf91c77b1011aab583c diff --git a/client/src/views/Problems.vue b/client/src/views/Problems.vue index e17bead7..3a700eab 100644 --- a/client/src/views/Problems.vue +++ b/client/src/views/Problems.vue @@ -8,7 +8,7 @@ main role="dialog" data-checkbox="modalNewprob" ) - .card(@keyup.enter="sendProblem()") + .card label#closeNewprob.modal-close(for="modalNewprob") fieldset label(for="selectVariant") {{ st.tr["Variant"] }} @@ -45,7 +45,7 @@ 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-2 + .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 #topPage span.vname {{ curproblem.vname }} span.uname ({{ curproblem.uname }}) @@ -60,7 +60,7 @@ main @click="deleteProblem(curproblem)" ) | {{ st.tr["Delete"] }} - p.clickable( + p.oneInstructions.clickable( v-html="parseHtml(curproblem.instruction)" @click="curproblem.showSolution=!curproblem.showSolution" ) @@ -273,7 +273,7 @@ export default { }, displayProblem: function(p) { return ( - (this.selectedVar == 0 || p.vid == this.selectedVar) && + (!this.selectedVar || p.vid == this.selectedVar) && ((this.onlyMines && p.uid == this.st.user.id) || (!this.onlyMines && p.uid != this.st.user.id)) ); @@ -293,7 +293,7 @@ export default { sendProblem: function() { const error = checkProblem(this.curproblem); if (error) { - alert(error); + alert(this.st.tr[error]); return; } const edit = this.curproblem.id > 0; @@ -358,6 +358,11 @@ textarea & > * margin: 0 +p.oneInstructions + margin: 0 + padding: 2px 5px + background-color: lightgreen + #topPage span.vname font-weight: bold