X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=ccb07758296e00fb40d3dce05b2b0b0a19a6a54e;hb=07052665845283c65b50a76537669d0602ba436b;hp=c0a15dff6fe8be0eec3b4bc3f74f2dbc354d3fab;hpb=57eb158fe8e37daaae11685df846003cda4aba19;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index c0a15dff..ccb07758 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -15,15 +15,37 @@ 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.tooltip( + onClick="window.doClick('modalAdjust')" + :aria-label="st.tr['Resize board']" + ) + img.inline(src="/images/icons/resize.svg") + button#analyzeBtn.tooltip( + v-if="canAnalyze" + @click="$emit('analyze')" + :aria-label="st.tr['Analyse']" + ) + img.inline(src="/images/icons/analyse.svg") + #downloadDiv(v-if="canDownload") + a#download(href="#") + button.tooltip( + @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] }} + 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 +53,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]) }}