From b90e376b37215e5d2ec818160c4ce64ddc76828c Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 26 Sep 2021 11:06:07 +0200 Subject: [PATCH] Fix some things with multibot login --- src/components/BotList.vue | 4 +++- src/components/Login.vue | 15 +++++++++++---- src/components/layout/NavBar.vue | 4 ++-- src/views/LoginModal.vue | 9 ++++++++- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/components/BotList.vue b/src/components/BotList.vue index 6e58e413..77188a99 100644 --- a/src/components/BotList.vue +++ b/src/components/BotList.vue @@ -1,5 +1,5 @@ @@ -18,6 +18,7 @@ import Login from '@/components/Login.vue'; export default class LoginModal extends Vue { $refs!: { loginForm: HTMLFormElement; + modal: HTMLElement; }; @Prop({ required: false, default: 'Login', type: String }) loginText!: string; @@ -26,6 +27,12 @@ export default class LoginModal extends Vue { // this.$refs.loginForm.resetLogin(); } + handleLoginResult(result: boolean) { + if (result) { + (this.$refs.modal as any).hide(); + } + } + handleOk(evt) { evt.preventDefault(); this.$refs.loginForm.handleSubmit();