X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=96d67049b64034178643e035ae0319d552a23158;hb=57078452549f252460d45e91b84c7eea40dd3e9c;hp=6f7b4dce56c11c14ab14af828c12f840cacb8af1;hpb=feaf1bf73fa8c6054e353585dee0b8a4fdcfbc4e;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 6f7b4dce..96d67049 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -19,44 +19,48 @@ div // NOTE: variants pages already have a "Rules" link on top span#rulesBtn( v-if="!$route.path.match('/variants/')" - @click="$emit('showrules')" + @click="clickRulesBtn()" + :class="btnRulesClass" ) | {{ st.tr["Rules"] }} - button.tooltip( + 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.tooltip( + button( + :class="btnTooltipClass()" @click="$emit('download')" :aria-label="st.tr['Download'] + ' PGN'" ) img.inline(src="/images/icons/download.svg") - button.tooltip( - v-if="canAnalyze" - @click="$emit('analyze')" - :aria-label="st.tr['Analyse']" - ) - img.inline(src="/images/icons/analyse.svg") #scoreInfo(v-if="score!='*'") span.score {{ score }} span.score-msg {{ st.tr[message] }} - .moves-list(v-if="!['none','highlight'].includes(show)") + .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) }}