mirror of
https://github.com/thelounge/thelounge
synced 2024-11-25 05:20:21 +00:00
Display error when /search is not enabled
Fixes thelounge/thelounge#4273
This commit is contained in:
parent
5e0a12b124
commit
058b3155d0
1 changed files with 13 additions and 9 deletions
|
@ -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 a new issue