From 98bec5686da0c4b7d0279b94968040b01e3218fa Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Mon, 13 Dec 2021 15:21:21 +0100 Subject: add group searcher dont work for now --- src/components/GroupMaker.vue | 22 +++++++++++++++++++- src/components/GroupView.vue | 47 +++++++++++++++++++++++++++++++++++++++++++ src/components/Searcher.vue | 13 ++++++------ 3 files changed, 74 insertions(+), 8 deletions(-) create mode 100644 src/components/GroupView.vue (limited to 'src/components') diff --git a/src/components/GroupMaker.vue b/src/components/GroupMaker.vue index 59f83fd..f3da293 100644 --- a/src/components/GroupMaker.vue +++ b/src/components/GroupMaker.vue @@ -49,11 +49,15 @@ export default { "users": this.users_selection }) - if(status === 201) + if(status === 201) { this.$notify({ type: "success", text: "Group created!" }) + + this.close() + } + }, async set_users() { @@ -77,3 +81,19 @@ export default { } } + + diff --git a/src/components/GroupView.vue b/src/components/GroupView.vue new file mode 100644 index 0000000..1608cf4 --- /dev/null +++ b/src/components/GroupView.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/components/Searcher.vue b/src/components/Searcher.vue index 8488fd4..a1093a2 100644 --- a/src/components/Searcher.vue +++ b/src/components/Searcher.vue @@ -61,9 +61,10 @@ export default { else this.current = this.sugestions[0] }, - execute_current() { - let out = this.current[1](this) - + async execute_current() { + let out = await this.current[1](this) + + console.log(out) if(out instanceof Object) { this.search = '' this.commands = out @@ -71,25 +72,23 @@ export default { }, hotkeys(e) { + e.preventDefault() + switch(e.code) { case 'Escape': 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': this.execute_current() - e.preventDefault() break case 'ShiftLeft': this.commands = CommandsService -- cgit v1.2.3