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) {
|
2021-11-15 21:57:20 +00:00
|
|
|
return false;
|
2021-07-03 22:53:45 +00:00
|
|
|
}
|
2021-05-06 01:22:09 +00:00
|
|
|
|
2021-11-15 21:57:20 +00:00
|
|
|
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};
|