X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FRules.vue;h=dbc6798d55819ebcef62a6378a0bdcd454696c35;hb=9ddaf8da8743c50b9019888a82d84392913c60c9;hp=1f9a0a44bd3dc3ceb8face11c7664383208f6e41;hpb=fcbc92c26e382e425d3d4cc4910eaf1a1d61c989;p=vchess.git diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index 1f9a0a44..dbc6798d 100644 --- a/client/src/views/Rules.vue +++ b/client/src/views/Rules.vue @@ -3,16 +3,16 @@ main .row .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 .button-group - button(@click="clickReadRules") {{ st.tr["Rules"] }} - button(v-show="!gameInProgress" @click="() => startGame('auto')") + button(@click="clickReadRules()") {{ st.tr["Rules"] }} + button(v-show="!gameInProgress" @click="startGame('auto')") | {{ st.tr["Example game"] }} - button(v-show="!gameInProgress" @click="() => startGame('versus')") + button(v-show="!gameInProgress" @click="startGame('versus')") | {{ st.tr["Practice"] }} - button(v-show="gameInProgress" @click="() => stopGame()") + button(v-show="gameInProgress" @click="stopGame()") | {{ st.tr["Stop game"] }} button(v-if="display=='rules' && gameInfo.vname!='Dark'" - @click="gotoAnalyze") - | {{ st.tr["Analyze"] }} + @click="gotoAnalyze()") + | {{ st.tr["Analyse"] }} .section-content(v-show="display=='rules'" v-html="content") ComputerGame(v-show="display=='computer'" :game-info="gameInfo" @game-over="stopGame" @game-stopped="gameStopped") @@ -22,7 +22,6 @@ main import ComputerGame from "@/components/ComputerGame.vue"; import { store } from "@/store"; import { getDiagram } from "@/utils/printDiagram"; - export default { name: 'my-rules', components: { @@ -47,7 +46,7 @@ export default { this.re_setVariant(newRoute.params["vname"]); }, }, - created: async function() { + created: function() { // NOTE: variant cannot be set before store is initialized this.re_setVariant(this.$route.params["vname"]); }, @@ -108,7 +107,7 @@ export default { this.gameInProgress = false; }, gotoAnalyze: function() { - this.$router.push("/analyze/" + this.gameInfo.vname + this.$router.push("/analyse/" + this.gameInfo.vname + "/?fen=" + V.GenRandInitFen()); }, },