Skip to content
Snippets Groups Projects
Commit f5495699 authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

fikser meta#234

parent bc14ecc5
No related branches found
No related tags found
No related merge requests found
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
}else{ }else{
this.waiting_for_articles = true this.waiting_for_articles = true
this.article = {lemmas: [], body:{pronunciation: [], definitions: [], etymology: []}} this.article = {lemmas: [], body:{pronunciation: [], definitions: [], etymology: []}}
this.$router.push(`/search?q=${event.q}&lang=${this.lang}`) this.$router.push(`/${this.lang}/search/${event.q}`)
navigate_to_search(this, event.q) navigate_to_search(this, event.q)
} }
}, },
...@@ -219,13 +219,15 @@ export default { ...@@ -219,13 +219,15 @@ export default {
]).then(function(_) { ]).then(function(_) {
self.waiting_for_metadata = false self.waiting_for_metadata = false
if(self.$route.name == 'word') { if(self.$route.name == 'word') {
self.lang = self.$route.params.lang
navigate_to_word(self, self.$route.params.word) navigate_to_word(self, self.$route.params.word)
} }
else if(self.$route.name == 'lookup'){ else if(self.$route.name == 'lookup'){
navigate_to_article(self, self.$route.params.id) navigate_to_article(self, self.$route.params.id)
} }
else if (self.$route.name == 'search') { else if (self.$route.name == 'search') {
navigate_to_search(self, self.$route.query.q) self.lang = self.$route.params.lang
navigate_to_search(self, self.$route.params.query)
} }
else { else {
self.waiting_for_articles = false self.waiting_for_articles = false
......
...@@ -30,7 +30,7 @@ const router = new VueRouter({ ...@@ -30,7 +30,7 @@ const router = new VueRouter({
props: true }, // Pass route.params to props props: true }, // Pass route.params to props
{ {
name: 'search', name: 'search',
path: '/search', path: '/:lang/search/:query',
component: App, component: App,
props: true} props: true}
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment