Merge "Gadgets can change the search API"

This commit is contained in:
jenkins-bot 2020-12-23 12:40:59 +00:00 committed by Gerrit Code Review
commit 850b7a6ce6
1 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@
<wvui-typeahead-search
id="searchform"
ref="searchForm"
:client="getClient"
:domain="domain"
:footer-search-text="$i18n('searchsuggest-containing').escaped()"
:suggestions-label="$i18n('searchresults').escaped()"
@ -56,6 +57,14 @@ module.exports = {
}
},
computed: {
/**
* Allow wikis eg. Hebrew Wikipedia to replace the default search API client
*
* @return {void|Object}
*/
getClient: function () {
return mw.config.get( 'wgVectorSearchClient', undefined );
},
language: function () {
return mw.config.get( 'wgUserLanguage' );
},