mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-26 17:20:22 +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";
|
||||
|
||||
function input(args) {
|
||||
if (!store.state.settings.searchEnabled) {
|
||||
store.commit("currentUserVisibleError", "Search is currently not enabled.");
|
||||
} else {
|
||||
router.push({
|
||||
name: "SearchResults",
|
||||
params: {
|
||||
|
@ -13,6 +16,7 @@ function input(args) {
|
|||
q: args.join(" "),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue