From: Benjamin Auder Date: Mon, 27 Jan 2020 07:50:20 +0000 (+0100) Subject: Add chat to Hall, clickable FEN, fix contact form X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/css/img/doc/pieces/cb.svg?a=commitdiff_plain;h=603b8a8b4a854efb168953da70e7b43ae99b50d9;p=vchess.git Add chat to Hall, clickable FEN, fix contact form --- diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 6d9904e6..e880de5f 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -17,7 +17,7 @@ div button(@click="gotoBegin") GotoBegin button(@click="gotoEnd") GotoEnd #fenDiv(v-if="showFen && !!vr") - p {{ vr.getFen() }} + p(@click="gotoFenContent") {{ vr.getFen() }} #pgnDiv a#download(href="#") button(@click="download") {{ st.tr["Download PGN"] }} @@ -104,6 +104,10 @@ export default { this.cursor = L-1; this.lastMove = (L > 0 ? this.moves[L-1] : null); }, + gotoFenContent: function(event) { + this.$router.push("/analyze/" + this.game.vname + + "/?fen=" + event.target.innerText.replace(/ /g, "_")); + }, download: function() { const content = this.getPgn(); // Prepare and trigger download link diff --git a/client/src/components/ContactForm.vue b/client/src/components/ContactForm.vue index 20d35b0e..aae0a504 100644 --- a/client/src/components/ContactForm.vue +++ b/client/src/components/ContactForm.vue @@ -16,13 +16,15 @@ div br textarea#mailContent fieldset - button(type="button" onClick="trySendMessage()") Send + button(type="button" @click="trySendMessage") Send p#emailSent {{ st.tr["Email sent!"] }}