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";
|
||||
|
||||
function input(args) {
|
||||
router.push({
|
||||
name: "SearchResults",
|
||||
params: {
|
||||
id: store.state.activeChannel.channel.id,
|
||||
},
|
||||
query: {
|
||||
q: args.join(" "),
|
||||
},
|
||||
});
|
||||
if (!store.state.settings.searchEnabled) {
|
||||
store.commit("currentUserVisibleError", "Search is currently not enabled.");
|
||||
} else {
|
||||
router.push({
|
||||
name: "SearchResults",
|
||||
params: {
|
||||
id: store.state.activeChannel.channel.id,
|
||||
},
|
||||
query: {
|
||||
q: args.join(" "),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user