Display error when /search is not enabled
Fixes thelounge/thelounge#4273
This commit is contained in:
parent
5e0a12b124
commit
058b3155d0
@ -4,15 +4,19 @@ import store from "../store";
|
|||||||
import {router} from "../router";
|
import {router} from "../router";
|
||||||
|
|
||||||
function input(args) {
|
function input(args) {
|
||||||
router.push({
|
if (!store.state.settings.searchEnabled) {
|
||||||
name: "SearchResults",
|
store.commit("currentUserVisibleError", "Search is currently not enabled.");
|
||||||
params: {
|
} else {
|
||||||
id: store.state.activeChannel.channel.id,
|
router.push({
|
||||||
},
|
name: "SearchResults",
|
||||||
query: {
|
params: {
|
||||||
q: args.join(" "),
|
id: store.state.activeChannel.channel.id,
|
||||||
},
|
},
|
||||||
});
|
query: {
|
||||||
|
q: args.join(" "),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user