From a6029cdb0d7c6245505e7076cea6677a2885ca1a Mon Sep 17 00:00:00 2001 From: Alberto Xamin Date: Fri, 5 May 2023 20:12:55 +0200 Subject: [PATCH] tab completion --- frontend/src/components/Chat.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Chat.vue b/frontend/src/components/Chat.vue index d0af5c8..d9a249b 100644 --- a/frontend/src/components/Chat.vue +++ b/frontend/src/components/Chat.vue @@ -21,7 +21,8 @@ @click="fillCmd(msg.cmd)">{{msg.cmd}} {{msg.help}}

- +
@@ -164,6 +165,12 @@ export default { this.text = cmd; document.getElementById('my-msg').focus(); }, + tabComplete() { + if (this.commandSuggestion.length > 0) { + let cmd = this.commandSuggestion[0].cmd; + this.text = cmd + ' '; + } + }, playEffects(path) { const promise = (new Audio(path)).play(); if(promise !== undefined){