From 48f46333f8e3fac771226a7c0d42452de1ec6f7e Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 4 Sep 2021 18:09:53 +0900 Subject: サインアップ・ログアウト周りの怪しい挙動を修正 (#7750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix #7749 * fix * fix logout behavior when there is no push subscription * fix logout behavior when there is no push subscription 2 * clean up service worker registration * fix lint * remove submodules --- src/client/components/signin.vue | 6 ++++-- src/client/components/signup.vue | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/client/components') diff --git a/src/client/components/signin.vue b/src/client/components/signin.vue index 0094038fb6..c051288d0a 100755 --- a/src/client/components/signin.vue +++ b/src/client/components/signin.vue @@ -111,7 +111,9 @@ export default defineComponent({ onLogin(res) { if (this.autoSet) { - login(res.i); + return login(res.i); + } else { + return; } }, @@ -144,7 +146,7 @@ export default defineComponent({ }); }).then(res => { this.$emit('login', res); - this.onLogin(res); + return this.onLogin(res); }).catch(err => { if (err === null) return; os.dialog({ diff --git a/src/client/components/signup.vue b/src/client/components/signup.vue index d584b97209..d332274111 100644 --- a/src/client/components/signup.vue +++ b/src/client/components/signup.vue @@ -178,14 +178,14 @@ export default defineComponent({ 'hcaptcha-response': this.hCaptchaResponse, 'g-recaptcha-response': this.reCaptchaResponse, }).then(() => { - os.api('signin', { + return os.api('signin', { username: this.username, password: this.password }).then(res => { this.$emit('signup', res); if (this.autoSet) { - login(res.i); + return login(res.i); } }); }).catch(() => { -- cgit v1.2.3-freya