From 193a6b59425ab45004f4178fc3f5b5bad5b4c660 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Tue, 14 Dec 2021 06:22:57 +0100 Subject: make group searcher works --- src/components/Searcher.vue | 19 +++++++++++-------- src/components/Sugestion.vue | 13 +++++++++---- 2 files changed, 20 insertions(+), 12 deletions(-) (limited to 'src/components') diff --git a/src/components/Searcher.vue b/src/components/Searcher.vue index a1093a2..df6dd9e 100644 --- a/src/components/Searcher.vue +++ b/src/components/Searcher.vue @@ -11,9 +11,9 @@ @@ -64,7 +64,6 @@ export default { async execute_current() { let out = await this.current[1](this) - console.log(out) if(out instanceof Object) { this.search = '' this.commands = out @@ -72,25 +71,29 @@ export default { }, hotkeys(e) { - e.preventDefault() - switch(e.code) { case 'Escape': - this.close() - break + e.preventDefault() + this.close() + break case 'ArrowDown': + e.preventDefault() this.change_current(1) break case 'ArrowUp': + e.preventDefault() this.change_current(-1) break case 'Tab': + e.preventDefault() this.change_current(1) break case 'Enter': + e.preventDefault() this.execute_current() break case 'ShiftLeft': + e.preventDefault() this.commands = CommandsService break } diff --git a/src/components/Sugestion.vue b/src/components/Sugestion.vue index cfbcd93..4721ca2 100644 --- a/src/components/Sugestion.vue +++ b/src/components/Sugestion.vue @@ -1,14 +1,19 @@ @@ -24,4 +29,4 @@ export default { padding: 5px; padding-right: 0px; } - \ No newline at end of file + -- cgit v1.2.3