From eea1d7ac8d5e5792fbdb99df41016c5f9c813790 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Thu, 8 Aug 2024 17:40:51 +0800 Subject: [PATCH] perf: Login timeout open in a new window --- src/app/services/app.ts | 2 +- src/app/services/http.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/services/app.ts b/src/app/services/app.ts index dc512630..9a6e9ffc 100644 --- a/src/app/services/app.ts +++ b/src/app/services/app.ts @@ -110,7 +110,7 @@ export class AppService { clearInterval(this.checkIntervalId); const ok = confirm(this._i18n.instant(this.getErrorMsg(status))); if (ok && !this.newLoginHasOpen) { - window.open('/core/auth/login/?next=/luna/', '_self'); + window.open('/core/auth/login/?next=/luna/', '_blank'); this.newLoginHasOpen = true; } setTimeout(() => this.doCheckProfile(true), 5000); diff --git a/src/app/services/http.ts b/src/app/services/http.ts index f8f4dbb3..4409c806 100644 --- a/src/app/services/http.ts +++ b/src/app/services/http.ts @@ -56,7 +56,7 @@ export class HttpService { if (error.status === 401 && User.logined) { const msg = await this._i18n.t('LoginExpireMsg'); if (confirm(msg)) { - window.open('/core/auth/login/?next=/luna/', '_self'); + window.open('/core/auth/login/?next=/luna/', '_blank'); } } else if (error.status === 403) { const msg = await this._i18n.t('No permission');