Commit a6542fb0 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

Merge branch 'dev' into 'prod'

Merge dev into prod

See merge request spraksamlingane/beta.ordbok.uib.no!191
parents 48c502a8 5ee1488b
......@@ -100,7 +100,7 @@
</v-list>
</article>
<article v-if="similar && similar.length"
:class="'v-sheet v-card rounded-xl did_you_mean ' + $vuetify.breakpoint.name">
<span class="similar-label" role="heading" aria-level="1">{{$t('notifications.similar')}}</span>
......@@ -359,7 +359,7 @@ function navigate_to_query(self, word, keep_page) {
self.handle_error(error, {retry: navigate_to_query, arg: q})
self.replace_history()
})
if (dict != 'bm,nn') {
let params = {q, n: 1, dict: dict=='bm'?'nn':'bm', dform: 'int', include: 'e', wc: self.pos_selected}
self.api.get('api/suggest?', {params}).then((response) => {
......@@ -432,7 +432,7 @@ export default {
return this.queryString
}
}
},
waiting: function() {
return (this.waiting_for_articles || this.waiting_for_metadata) && this.$route.name != 'root'
......@@ -565,7 +565,7 @@ export default {
}
})
})
},
handle_error: function(error, retry_params) {
console.log(error)
......@@ -620,8 +620,10 @@ export default {
navigate_to_query(this, word)
},
similar_link: function (word) {
console.log(word)
this.$plausible.trackEvent('similar link', {props: {lang: this.previous.params.lang, from: this.previous.query.q, to: 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.event = null
navigate_to_query(this, this.queryString)
},
......@@ -795,7 +797,7 @@ export default {
else {
this.api = axios.create({baseURL: ENDPOINT})
}
this.lang = this.$route.params.lang || this.$store.state.defaultDict || 'bm,nn'
if (this.$route.query.pos) {
......
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