2021-05-06 01:22:09 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
import store from "../store";
|
|
|
|
import {router} from "../router";
|
|
|
|
|
|
|
|
function input(args) {
|
2021-07-03 22:53:45 +00:00
|
|
|
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(" "),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2021-05-06 01:22:09 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {input};
|