diff --git a/client/src/main.ts b/client/src/main.ts index ad05f22..f2f9616 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -61,7 +61,7 @@ p.catch(err => { translations, availableLanguages, defaultLanguage: 'en_US', - silent: process.env.NODE_ENV === 'production' + silent: true }) Vue.config.language = currentLanguage diff --git a/client/src/views/Search.vue b/client/src/views/Search.vue index 4324129..a2a7da6 100644 --- a/client/src/views/Search.vue +++ b/client/src/views/Search.vue @@ -155,7 +155,7 @@
- +
@@ -445,14 +445,21 @@ this.indexName = config.searchInstanceName this.loadUrl() + this.doSearch() }, watch: { + // For pagination change $route(to, from) { if (!this.searchDone) return - this.loadUrl() - this.doSearch() + const urlPage = this.$route.query.page + + if (urlPage && parseInt(urlPage) !== this.currentPage) { + this.loadUrl() + this.doSearch(false) + this.scrollToResults() + } }, formSort () { @@ -638,7 +645,8 @@ licenceOneOf: this.formLicenceOneOf, languageOneOf: this.formLanguageOneOf, tagsAllOf: this.formTagsAllOf.map(t => t.text), - tagsOneOf: this.formTagsOneOf.map(t => t.text) + tagsOneOf: this.formTagsOneOf.map(t => t.text), + page: this.currentPage } this.$router.push({ path: '/search', query }) @@ -662,8 +670,6 @@ if (query.page && this.currentPage !== query.page) { this.currentPage = parseInt(query.page + '') - - this.scrollToResults() } },