Commit 13d5e02d authored by Henrik Askjer's avatar Henrik Askjer
Browse files

add other_dict

parent 4c2a8d23
......@@ -31,7 +31,7 @@
--><span v-for="(item,index) in similar"
:key="index"><!--
--><router-link :to="generate_path({q: queryString+'|'+item[0]})"
@click.native="similar_link(item[0])">{{item[0]}}</router-link><!--
@click.native="other_dict(item[0])">{{item[0]}}</router-link><!--
-->{{index == similar.length-1? '.' : ', '}}
</span>
</div>
......@@ -42,7 +42,7 @@
--><span v-for="(item,index) in similar"
:key="index"><!--
--><router-link :to="generate_path({q: queryString+'|'+item[0]})"
@click.native="similar_link(item[0])">{{item[0]}}</router-link><!--
@click.native="other_dict(item[0])">{{item[0]}}</router-link><!--
-->{{index == similar.length-1? '.' : ', '}}
</span>
</div>
......@@ -615,15 +615,25 @@ export default {
},
inflection_link: function (word) {
console.log(this.previous)
this.$plausible.trackEvent('inflection link', {props: {lang: this.previous.params.lang, from: this.previous.query.q, to: word}})
this.event = null
navigate_to_query(this, word)
},
other_dict: function(word) {
let lang = this.previous.params.lang
let from = this.previous.query.q
let to = word
this.$plausible.trackEvent('other dict', {props: {lang, from, to , words: lang+": "+from + " => " + to, obj: {from, to, lang}}})
this.event = null
navigate_to_query(this, this.queryString)
},
similar_link: function (word) {
let lang = this.previous.params.lang
let from = this.previous.query.q
let to = word
this.$plausible.trackEvent('similar link', {props: {lang, from, to , words: from + " => " + to, obj: {from, to}}})
this.$plausible.trackEvent('similar link', {props: {lang, from, to , words: lang+": "+from + " => " + to, obj: {from, to, lang}}})
this.event = null
navigate_to_query(this, this.queryString)
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment