Apply changes to getCommands/search
This commit is contained in:
parent
0d839c501e
commit
162b42d9b0
@ -312,7 +312,7 @@ function completeNicks(word, isFuzzy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCommands() {
|
function getCommands() {
|
||||||
const cmds = constants.commands;
|
const cmds = constants.commands.slice();
|
||||||
|
|
||||||
if (store.state.settings.searchEnabled === false) {
|
if (store.state.settings.searchEnabled === false) {
|
||||||
const search = cmds.indexOf("/search");
|
const search = cmds.indexOf("/search");
|
||||||
@ -326,7 +326,7 @@ function getCommands() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function completeCommands(word) {
|
function completeCommands(word) {
|
||||||
const words = getCommands().slice();
|
const words = getCommands();
|
||||||
|
|
||||||
return fuzzyGrep(word, words);
|
return fuzzyGrep(word, words);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,14 @@ import {router} from "../router";
|
|||||||
|
|
||||||
function input(args) {
|
function input(args) {
|
||||||
if (!store.state.settings.searchEnabled) {
|
if (!store.state.settings.searchEnabled) {
|
||||||
store.commit("currentUserVisibleError", "Search is currently not enabled.");
|
const disabled = "Search is currently not enabled.";
|
||||||
|
store.commit("currentUserVisibleError", disabled);
|
||||||
|
setTimeout(
|
||||||
|
() =>
|
||||||
|
store.state.currentUserVisibleError === disabled &&
|
||||||
|
store.commit("currentUserVisibleError", null),
|
||||||
|
5000
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
router.push({
|
router.push({
|
||||||
name: "SearchResults",
|
name: "SearchResults",
|
||||||
|
Loading…
Reference in New Issue
Block a user