diff --git a/script/assembly/server/assembly.xml b/script/assembly/server/assembly.xml
index ae0fed0bc34..9baa53e99dc 100644
--- a/script/assembly/server/assembly.xml
+++ b/script/assembly/server/assembly.xml
@@ -19,7 +19,7 @@
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd
http://maven.apache.org/ASSEMBLY/2.0.0 ">
- 1.2.1
+ 1.2.2
tar
diff --git a/script/docker/server/Dockerfile b/script/docker/server/Dockerfile
index d65ce23d760..cc7fcbc8322 100644
--- a/script/docker/server/Dockerfile
+++ b/script/docker/server/Dockerfile
@@ -2,7 +2,7 @@ FROM openjdk:11.0.16-jre-slim-buster
MAINTAINER tancloud "tomsun28@outlook.com"
-ADD hertzbeat-1.2.1.tar /opt/
+ADD hertzbeat-1.2.2.tar /opt/
ENV TZ=Asia/Shanghai
#ENV LANG=zh_CN.UTF-8
diff --git a/web-app/src/app/core/guard/detect-auth-guard.ts b/web-app/src/app/core/guard/detect-auth-guard.ts
index 92b951fdb60..f1b60b3c2cd 100644
--- a/web-app/src/app/core/guard/detect-auth-guard.ts
+++ b/web-app/src/app/core/guard/detect-auth-guard.ts
@@ -1,5 +1,7 @@
-import { Injectable } from '@angular/core';
+import { Inject, Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
+import { I18NService } from '@core';
+import { ALAIN_I18N_TOKEN } from '@delon/theme';
import { NzNotificationService } from 'ng-zorro-antd/notification';
import { Observable } from 'rxjs';
@@ -9,7 +11,12 @@ import { LocalStorageService } from '../../service/local-storage.service';
providedIn: 'root'
})
export class DetectAuthGuard implements CanActivate {
- constructor(private localStorageSvc: LocalStorageService, private notifySvc: NzNotificationService, private router: Router) {}
+ constructor(
+ private localStorageSvc: LocalStorageService,
+ private notifySvc: NzNotificationService,
+ @Inject(ALAIN_I18N_TOKEN) private i18nSvc: I18NService,
+ private router: Router
+ ) {}
canActivate(
route: ActivatedRouteSnapshot,
@@ -18,7 +25,7 @@ export class DetectAuthGuard implements CanActivate {
let activate = this.localStorageSvc.hasAuthorizationToken();
if (!activate) {
setTimeout(() => {
- this.notifySvc.warning('请先登录!', '');
+ this.notifySvc.warning(this.i18nSvc.fanyi('app.login.notify'), '');
this.router.navigateByUrl('/passport/login');
});
}
diff --git a/web-app/src/app/shared/consts.ts b/web-app/src/app/shared/consts.ts
index ce89831f111..0ce78eaeeb9 100644
--- a/web-app/src/app/shared/consts.ts
+++ b/web-app/src/app/shared/consts.ts
@@ -1,3 +1,3 @@
export const CONSTS = {
- VERSION: 'v1.2.1'
+ VERSION: 'v1.2.2'
};
diff --git a/web-app/src/assets/i18n/en-US.json b/web-app/src/assets/i18n/en-US.json
index 46f4d1f8129..d64026ca990 100644
--- a/web-app/src/assets/i18n/en-US.json
+++ b/web-app/src/assets/i18n/en-US.json
@@ -309,6 +309,7 @@
"app.login.tab-login-credentials": "Credentials",
"app.login.remember-me": "Remember me",
"app.login.login": "Login",
+ "app.login.notify": "Please Login!",
"tag.new": "New Tag",
"tag.edit": "Edit Tag",
"tag.search": "Search Tag",
diff --git a/web-app/src/assets/i18n/zh-CN.json b/web-app/src/assets/i18n/zh-CN.json
index acb974ac5f9..4c7e033bb89 100644
--- a/web-app/src/assets/i18n/zh-CN.json
+++ b/web-app/src/assets/i18n/zh-CN.json
@@ -305,6 +305,7 @@
"app.login.tab-login-credentials": "账户密码登录",
"app.login.remember-me": "自动登录",
"app.login.login": "登录",
+ "app.login.notify": "请先登录!",
"tag.new": "新增标签",
"tag.edit": "编辑标签",
"tag.search": "搜索标签",
diff --git a/web-app/src/assets/i18n/zh-TW.json b/web-app/src/assets/i18n/zh-TW.json
index 121f9ab27e8..4a90c7bfc3f 100644
--- a/web-app/src/assets/i18n/zh-TW.json
+++ b/web-app/src/assets/i18n/zh-TW.json
@@ -305,6 +305,7 @@
"app.login.tab-login-credentials": "賬戶密碼登錄",
"app.login.remember-me": "自動登錄",
"app.login.login": "登錄",
+ "app.login.notify": "请先登錄!",
"tag.new": "新增標簽",
"tag.edit": "編輯標簽",
"tag.search": "搜索標簽",