X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=ecdc14207f6a432656810c84373b6791f84f26b3;hp=ccb07758296e00fb40d3dce05b2b0b0a19a6a54e;hb=be4b9421603ea763010b01b853363a1bda93ce36;hpb=07052665845283c65b50a76537669d0602ba436b diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index ccb07758..ecdc1420 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -19,23 +19,27 @@ 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.tooltip( + 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'" ) @@ -43,20 +47,18 @@ 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]) }} + v-html="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]) }} + v-html="notation(moveIdx + 1)")