X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=1f94d6384c80f464b6f57cb61a9e5e89b05471d8;hp=f41e7e2e0280d608808954b8fe0ed291082e4fe0;hb=236485b53993f2adfd588022e2899a39491fc825;hpb=658c47bf5843fb0855659f22f7b1c38318c66ce5 diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index f41e7e2e..1f94d638 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -15,15 +15,40 @@ 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="$emit('showrules')" + ) + | {{ 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(v-if="!['none','highlight'].includes(show)") .tr(v-for="moveIdx in evenNumbers") - .td {{ firstNum + moveIdx / 2 + 1 }} + .td {{ firstNum + moveIdx / 2 }} .td(v-if="moveIdx < moves.length-1 || show == 'all'" :class="{'highlight-lm': cursor == moveIdx}" @click="() => gotoMove(moveIdx)" @@ -31,10 +56,10 @@ div | {{ notation(moves[moveIdx]) }} .td( v-if="moveIdx < moves.length-1" - :class="{'highlight-lm': cursor == moveIdx+1}" + :class="{'highlight-lm': highlightBlackmove(moveIdx+1)}" @click="() => gotoMove(moveIdx+1)" ) - | {{ notation(moves[moveIdx+1]) }} + | {{ notation(moves[moveIdx + 1]) }}