From 5157ce0b8872417fbeecd736c9d1ae750b24acdc Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Fri, 31 Jan 2020 12:10:57 +0100 Subject: [PATCH] 'update' --- client/src/App.vue | 10 ++++---- client/src/components/BaseGame.vue | 10 +++++++- client/src/components/MoveList.vue | 4 ++-- client/src/views/Analyze.vue | 38 +++++++++++++++++++++++------- client/src/views/Rules.vue | 11 ++++++--- 5 files changed, 53 insertions(+), 20 deletions(-) diff --git a/client/src/App.vue b/client/src/App.vue index 6c945663..4b062a65 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -8,7 +8,7 @@ .row .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 // Menu (top of page): - // Left: hall, variants, mygames, forum (ext. link) + // Left: hall, variants, mygames // Right: usermenu, settings, flag nav label.drawer-toggle(for="drawerControl") @@ -22,8 +22,6 @@ | {{ st.tr["Variants"] }} router-link(to="/mygames") | {{ st.tr["My games"] }} - a(href="https://forum.vchess.club") - | {{ st.tr["Forum"] }} #rightMenu .clickable(onClick="doClick('modalUser')") | {{ st.user.id > 0 ? (st.user.name || "@nonymous") : "Login" }} @@ -38,6 +36,8 @@ router-link.menuitem(to="/about") {{ st.tr["About"] }} p.clickable(onClick="doClick('modalContact')") | {{ st.tr["Contact"] }} + a.menuitem(href="https://forum.vchess.club") + | {{ st.tr["Forum"] }} - diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index 33ef6a57..8056ba32 100644 --- a/client/src/views/Rules.vue +++ b/client/src/views/Rules.vue @@ -3,13 +3,14 @@ main .row .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 .button-group - button(@click="clickReadRules") Read the rules + button(@click="clickReadRules") Rules button(v-show="!gameInProgress" @click="() => startGame('auto')") - | Observe a sample game + | Sample game button(v-show="!gameInProgress" @click="() => startGame('versus')") - | Beat the computer! + | Practice! button(v-show="gameInProgress" @click="() => stopGame()") | Stop game + button(@click="gotoAnalyze") Analyze .section-content(v-show="display=='rules'" v-html="content") ComputerGame(v-show="display=='computer'" :game-info="gameInfo" @game-over="stopGame" @game-stopped="gameStopped") @@ -102,6 +103,10 @@ export default { gameStopped: function() { this.gameInProgress = false; }, + gotoAnalyze: function() { + this.$router.push("/analyze/" + this.gameInfo.vname + + "/?fen=" + V.GenRandInitFen()); + }, }, }; -- 2.44.0