X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=96d67049b64034178643e035ae0319d552a23158;hb=57078452549f252460d45e91b84c7eea40dd3e9c;hp=d47a1a4a80ff37c82069b7aa8033983f2bb909ab;hpb=659a9bd22c88177e203207a406cdb6c9f69139d4;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index d47a1a4a..96d67049 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -19,7 +19,8 @@ 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( @@ -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) }}