mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-29 10:40:35 +02:00
Display error when /search is not enabled
Fixes thelounge/thelounge#4273
This commit is contained in:
parent
5e0a12b124
commit
058b3155d0
|
@ -4,6 +4,9 @@ import store from "../store";
|
||||||
import {router} from "../router";
|
import {router} from "../router";
|
||||||
|
|
||||||
function input(args) {
|
function input(args) {
|
||||||
|
if (!store.state.settings.searchEnabled) {
|
||||||
|
store.commit("currentUserVisibleError", "Search is currently not enabled.");
|
||||||
|
} else {
|
||||||
router.push({
|
router.push({
|
||||||
name: "SearchResults",
|
name: "SearchResults",
|
||||||
params: {
|
params: {
|
||||||
|
@ -13,6 +16,7 @@ function input(args) {
|
||||||
q: args.join(" "),
|
q: args.join(" "),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue