X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=2e011b491d270c0634de20ba2f1198df97700af9;hb=e50a802531b99829c533f22ecd21e359e7e1e049;hp=b3ca667cccf0cb36237d889d6aeb9a7fbe286185;hpb=bc06c9bbc9c8ead4ae270204d10f4ff686c764a4;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index b3ca667c..2e011b49 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -15,26 +15,52 @@ div value="50" @input="adjustBoard()" ) - div#boardSizeBtnContainer - button#boardSizeBtn(onClick="window.doClick('modalAdjust')") - | {{ st.tr["Set board size"] }} + #aboveMoves + // NOTE: variants pages already have a "Rules" link on top + span#rulesBtn( + v-if="!$route.path.match('/variants/')" + @click="clickRulesBtn()" + :class="btnRulesClass" + ) + | {{ st.tr["Rules"] }} + button( + :class="btnTooltipClass()" + onClick="window.doClick('modalAdjust')" + :aria-label="st.tr['Resize board']" + ) + img.inline(src="/images/icons/resize.svg") + button#analyzeBtn( + v-if="canAnalyze" + :class="btnTooltipClass()" + @click="$emit('analyze')" + :aria-label="st.tr['Analyse']" + ) + img.inline(src="/images/icons/analyse.svg") + #downloadDiv(v-if="canDownload") + a#download(href="#") + button( + :class="btnTooltipClass()" + @click="$emit('download')" + :aria-label="st.tr['Download'] + ' PGN'" + ) + img.inline(src="/images/icons/download.svg") #scoreInfo(v-if="score!='*'") - p {{ score }} - p {{ st.tr[message] }} + span.score {{ score }} + span.score-msg {{ st.tr[message] }} .moves-list .tr(v-for="moveIdx in evenNumbers") - .td {{ firstNum + moveIdx / 2 + 1 }} - .td(v-if="moveIdx < moves.length-1 || show == 'all'" + .td {{ firstNum + moveIdx / 2 }} + .td( :class="{'highlight-lm': cursor == moveIdx}" @click="() => gotoMove(moveIdx)" ) - | {{ notation(moves[moveIdx]) }} + | {{ notation(moveIdx) }} .td( v-if="moveIdx < moves.length-1" :class="{'highlight-lm': cursor == moveIdx+1}" @click="() => gotoMove(moveIdx+1)" ) - | {{ notation(moves[moveIdx+1]) }} + | {{ notation(moveIdx + 1) }}