X-Git-Url: https://git.auder.net/doc/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=da3c0472516bcc7ceede2119c7ff515b8235359f;hb=1e02d16d2a376f7ef0af3c1ea36948a5f5926034;hp=1bb44367ce71ff33c88942c5bcce8643146b1487;hpb=ddec77d8d3d304f61e86946ca73be6f23b11163e;p=vchess.git
diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue
index 1bb44367..da3c0472 100644
--- a/client/src/components/MoveList.vue
+++ b/client/src/components/MoveList.vue
@@ -1,61 +1,248 @@
div
+ input#modalAdjust.modal(type="checkbox")
+ div#adjuster(
+ role="dialog"
+ data-checkbox="modalAdjust"
+ )
+ .card.text-center
+ label.modal-close(for="modalAdjust")
+ label(for="boardSize") {{ st.tr["Board size"] }}
+ input#boardSize.slider(
+ type="range"
+ min="0"
+ max="100"
+ value="50"
+ @input="adjustBoard()"
+ )
+ #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 {{ message }}
- table#movesList
- tbody
- tr(v-for="moveIdx in evenNumbers")
- td {{ moveIdx / 2 + 1 }}
- td(:class="{'highlight-lm': cursor == moveIdx}"
- data-label="White move" @click="() => gotoMove(moveIdx)")
- | {{ moves[moveIdx].notation }}
- td(v-if="moveIdx < moves.length-1"
- :class="{'highlight-lm': cursor == moveIdx+1}"
- data-label="Black move" @click="() => gotoMove(moveIdx+1)")
- | {{ moves[moveIdx+1].notation }}
- // Else: just add an empty cell
- td(v-else)
+ 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 }}
+ .td(v-if="moveIdx < moves.length-1 || show == 'all'"
+ :class="{'highlight-lm': cursor == moveIdx}"
+ @click="() => gotoMove(moveIdx)"
+ )
+ | {{ notation(moves[moveIdx]) }}
+ .td(
+ v-if="moveIdx < moves.length-1"
+ :class="{'highlight-lm': highlightBlackmove(moveIdx+1)}"
+ @click="() => gotoMove(moveIdx+1)"
+ )
+ | {{ notation(moves[moveIdx + 1]) }}