projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add 'display' DB field for nicer variants display. Remove join on Variants table...
[vchess.git]
/
client
/
src
/
views
/
Rules.vue
diff --git
a/client/src/views/Rules.vue
b/client/src/views/Rules.vue
index
c069eb2
..
09d5e06
100644
(file)
--- 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
| {{ 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'") {{ g
ameInfo.vname
}}
+ h4#variantName(v-show="display=='rules'") {{ g
etVariantDisplay
}}
div(
v-show="display=='rules'"
v-html="content"
div(
v-show="display=='rules'"
v-html="content"
@@
-76,6
+76,10
@@
export default {
showAnalyzeBtn: function() {
return !!this.V && this.V.CanAnalyze;
},
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 (
content: function() {
if (!this.gameInfo.vname) return ""; //variant not set yet
return (