X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FRules.vue;h=09d5e06a7879cd5bd2e5e5409c6156b4db5d1975;hp=c069eb29b073451c2f195354dce7a75dd37a2281;hb=eaa5ad3e93b761fefb16b32071be0b439761f843;hpb=b0116a67818668f55cd2a3b3a323b2c91b5bc332 diff --git a/client/src/views/Rules.vue b/client/src/views/Rules.vue index c069eb29..09d5e06a 100644 --- a/client/src/views/Rules.vue +++ b/client/src/views/Rules.vue @@ -26,7 +26,7 @@ main | {{ st.tr["Analysis mode"] }} .row .col-sm-12.col-md-8.col-md-offset-2.col-lg-6.col-lg-offset-3 - h4#variantName(v-show="display=='rules'") {{ gameInfo.vname }} + h4#variantName(v-show="display=='rules'") {{ getVariantDisplay }} div( v-show="display=='rules'" v-html="content" @@ -76,6 +76,10 @@ export default { showAnalyzeBtn: function() { return !!this.V && this.V.CanAnalyze; }, + getVariantDisplay: function() { + if (!this.gameInfo.vname) return ""; //variant not set yet + return this.st.variants.find(v => v.name == this.gameInfo.vname).display; + }, content: function() { if (!this.gameInfo.vname) return ""; //variant not set yet return (