X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=2e011b491d270c0634de20ba2f1198df97700af9;hb=e50a802531b99829c533f22ecd21e359e7e1e049;hp=da3c0472516bcc7ceede2119c7ff515b8235359f;hpb=1e02d16d2a376f7ef0af3c1ea36948a5f5926034;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index da3c0472..2e011b49 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -19,18 +19,19 @@ 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( - :class="btnTooltipClass" + :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" + :class="btnTooltipClass()" @click="$emit('analyze')" :aria-label="st.tr['Analyse']" ) @@ -38,7 +39,7 @@ div #downloadDiv(v-if="canDownload") a#download(href="#") button( - :class="btnTooltipClass" + :class="btnTooltipClass()" @click="$emit('download')" :aria-label="st.tr['Download'] + ' PGN'" ) @@ -46,20 +47,20 @@ div #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 }} - .td(v-if="moveIdx < moves.length-1 || show == 'all'" + .td( :class="{'highlight-lm': cursor == moveIdx}" @click="() => gotoMove(moveIdx)" ) - | {{ notation(moves[moveIdx]) }} + | {{ notation(moveIdx) }} .td( v-if="moveIdx < moves.length-1" - :class="{'highlight-lm': highlightBlackmove(moveIdx+1)}" + :class="{'highlight-lm': cursor == moveIdx+1}" @click="() => gotoMove(moveIdx+1)" ) - | {{ notation(moves[moveIdx + 1]) }} + | {{ notation(moveIdx + 1) }}