X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=ecdc14207f6a432656810c84373b6791f84f26b3;hp=cc8e24c6210dc080cb520696c319c38a0fb16be0;hb=be4b9421603ea763010b01b853363a1bda93ce36;hpb=f9c36b2da005b596ad656f4b6cc4e09ef3c656f1 diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index cc8e24c6..ecdc1420 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -15,26 +15,50 @@ 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] }} - .moves-list(v-if="show != 'none'") + 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]) }} + v-html="notation(moveIdx)") .td( v-if="moveIdx < moves.length-1" :class="{'highlight-lm': cursor == moveIdx+1}" @click="() => gotoMove(moveIdx+1)" - ) - | {{ notation(moves[moveIdx+1]) }} + v-html="notation(moveIdx + 1)")