Использование параметра extendedSearch на клиенте
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
</div>
|
||||
|
||||
<q-btn-toggle
|
||||
v-if="extendedSearch"
|
||||
v-model="selectedList"
|
||||
class="q-ml-md"
|
||||
toggle-color="primary"
|
||||
@@ -415,6 +416,10 @@ class Search {
|
||||
return this.$store.state.config;
|
||||
}
|
||||
|
||||
get extendedSearch() {
|
||||
return this.config.extendedSearch;
|
||||
}
|
||||
|
||||
get settings() {
|
||||
return this.$store.state.settings;
|
||||
}
|
||||
@@ -442,7 +447,7 @@ class Search {
|
||||
async updateListFromRoute(to) {
|
||||
const newPath = to.path;
|
||||
let newList = this.getListRoute(newPath);
|
||||
newList = (newList ? newList : 'author');
|
||||
newList = (newList && this.extendedSearch ? newList : 'author');
|
||||
if (this.selectedList != newList)
|
||||
this.selectedList = newList;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = {
|
||||
inpxCheckInterval: 60,//minutes
|
||||
lowMemoryMode: false,
|
||||
|
||||
webConfigParams: ['name', 'version', 'branch', 'bookReadLink', 'dbVersion'],
|
||||
webConfigParams: ['name', 'version', 'branch', 'bookReadLink', 'dbVersion', 'extendedSearch'],
|
||||
|
||||
allowRemoteLib: false,
|
||||
remoteLib: false,
|
||||
|
||||
@@ -145,6 +145,9 @@ class WebSocketController {
|
||||
}
|
||||
|
||||
async seriesSearch(req, ws) {
|
||||
if (!this.config.extendedSearch)
|
||||
throw new Error(`Extended search disabled`);
|
||||
|
||||
if (!req.query)
|
||||
throw new Error(`query is empty`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user