This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit be790d56eec8b7f6b4cbd72a7f099982e7abbe88 Author: Benjamin <poussin@codelutin.com> Date: Wed May 27 22:24:42 2020 +0200 modif du form de query pour permettre au navigateur firefox android de l'utiliser comme moteur de recherche --- web/src/components/SearchInput.vue | 17 ++--------------- web/src/utils/FetchHelper.js | 9 +++++++++ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/web/src/components/SearchInput.vue b/web/src/components/SearchInput.vue index 15db960..4b874d5 100644 --- a/web/src/components/SearchInput.vue +++ b/web/src/components/SearchInput.vue @@ -10,10 +10,10 @@ <input type="text" v-model="mFulltext" @keyup.enter="searchFulltext" /> </label> </form> - <form @submit.prevent="action"> + <form :action="$fetch.createOpensearchUrl()"> <label> web: - <input type="text" v-model="mQuery" @keyup.enter="action" /> + <input name="action" type="text" /> </label> </form> </div> @@ -36,10 +36,6 @@ class SearchInput extends Vue { this.changeFulltextAndGo(this.mFulltext) } - action() { - console.log('search', this.mQuery) - } - get tags() { const tags = this.queryInfo.tags if (!tags) { @@ -57,10 +53,6 @@ class SearchInput extends Vue { return this.queryInfo.fulltext } - get query() { - return this.queryInfo.query - } - // TODO supprimer ce watch faire comme pour les tags mais avec un timer avant le declenchement de la requete de recherche @Watch('fulltext', { immediate: true, deep: true }) onFulltextChange(fulltext) { @@ -68,11 +60,6 @@ class SearchInput extends Vue { this.mFulltext = this.fulltext } - @Watch('query', { immediate: true, deep: true }) - onQueryChange(query) { - console.log('onQueryChange SearchInput', query) - this.mQuery = this.query - } } export default SearchInput diff --git a/web/src/utils/FetchHelper.js b/web/src/utils/FetchHelper.js index 824aacd..a7fd61e 100644 --- a/web/src/utils/FetchHelper.js +++ b/web/src/utils/FetchHelper.js @@ -1,8 +1,17 @@ +import Vue from 'vue' + let FetchHelper = { createUrl(url) { return window.BACKEND_URL + 'api/v1' + url }, + createOpensearchUrl() { + let token = Vue.$storage.getCookie('bow-token') + let result = this.createUrl(`/opensearch?bow-token=${token}`) + console.log('Opensearch url', result) + return result + }, + async fetch(url, method, headers, body) { headers = headers || {} if (!headers['Content-Type']) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.