sola 11 mesiacov pred
rodič
commit
f32950d436

+ 11 - 11
src/app/layout/passport/passport.component.html

@@ -3,22 +3,22 @@
     <!-- <header-i18n [showLangText]="false" class="langs" [ngStyle]="styleMessage.headerStyles"></header-i18n> -->
 
     <div class="wrap loginContainer" [ngStyle]="styleMessage.loginContainer">
-<!--      <div [ngStyle]="styleMessage.loginLeft">-->
-<!--        <div [ngStyle]="styleMessage.loginLeftContainer">-->
-<!--          <p [ngStyle]="styleMessage.loginLeftTitleStyles">-->
-<!--            {{ styleMessage.loginLeftTitleTop }}-->
-<!--          </p>-->
-<!--          <p [ngStyle]="styleMessage.loginLeftTitleStyles">-->
-<!--            {{ styleMessage.loginLeftTitleBottom }}-->
-<!--          </p>-->
-<!--        </div>-->
-<!--      </div>-->
+      <!--      <div [ngStyle]="styleMessage.loginLeft">-->
+      <!--        <div [ngStyle]="styleMessage.loginLeftContainer">-->
+      <!--          <p [ngStyle]="styleMessage.loginLeftTitleStyles">-->
+      <!--            {{ styleMessage.loginLeftTitleTop }}-->
+      <!--          </p>-->
+      <!--          <p [ngStyle]="styleMessage.loginLeftTitleStyles">-->
+      <!--            {{ styleMessage.loginLeftTitleBottom }}-->
+      <!--          </p>-->
+      <!--        </div>-->
+      <!--      </div>-->
 
       <div class="login-container" [ngStyle]="styleMessage.loginRight">
         <div [ngStyle]="styleMessage.loginRightContainer" class="login-content">
           <div class="top">
             <div class="head">
-              <span class="title" style="color: #d4b187">{{ loginTitle }}</span>
+              <span class="title" style="color: #d4b187">{{ loginTitle | i18n }}</span>
             </div>
           </div>
           <router-outlet></router-outlet>

+ 46 - 20
src/app/routes/passport/forgetPassword/forget.password.component.html

@@ -16,12 +16,21 @@
       <!--        </nz-form-control>-->
       <!--      </nz-form-item>-->
       <nz-form-item>
-        <nz-form-control [nzErrorTip]="'请输入手机号!' | i18n">
+        <nz-form-control [nzErrorTip]="'validation.phone-number.required' | i18n">
           <nz-input-group nzSize="large" nzPrefixIcon="phone">
-            <input nz-input type="text" formControlName="account" placeholder="请输入手机号" />
+            <input nz-input type="text" formControlName="account" [placeholder]="'validation.phone-number.required' | i18n" />
           </nz-input-group>
         </nz-form-control>
-        <button nz-button nzType="primary" style="width: 112px" type="button" [disabled]="btnContent >= 1" (click)="getCaptcha();$event.preventDefault()" nzSize="large">{{btnContent == 0?'获取验证码':btnContent}}</button>
+        <button
+          nz-button
+          nzType="primary"
+          style="width: 112px"
+          type="button"
+          [disabled]="btnContent >= 1"
+          (click)="getCaptcha(); $event.preventDefault()"
+          nzSize="large"
+          >{{ btnContent == 0 ? ('ic.menu.get.captcha' | i18n) : btnContent }}</button
+        >
       </nz-form-item>
       <!--      <nz-form-item [hidden]="!notifyType.includes('mail')">-->
       <!--        <nz-form-control nzErrorTip="请输入邮箱!">-->
@@ -38,45 +47,62 @@
       <!--        </nz-form-control>-->
       <!--      </nz-form-item>-->
       <nz-form-item>
-        <nz-form-control nzErrorTip="请输入验证码!">
+        <nz-form-control [nzErrorTip]="'ic.action.enter.captcha' | i18n">
           <nz-input-group nzSize="large" nzPrefixIcon="code">
-            <input autocomplete="new-password" nz-input formControlName="verificationCode" placeholder="请输入验证码" />
+            <input
+              autocomplete="new-password"
+              nz-input
+              formControlName="verificationCode"
+              [placeholder]="'ic.action.enter.captcha' | i18n"
+            />
           </nz-input-group>
         </nz-form-control>
       </nz-form-item>
       <nz-form-item>
-        <nz-form-control nzErrorTip="请输入新密码!密码长度8-30位,并且同时包含大写字母、小写字母、数字、特殊字符">
+        <nz-form-control [nzErrorTip]="'validation.password.strength.msg' | i18n">
           <nz-input-group nzSize="large" nzPrefixIcon="lock">
-            <input nz-input autocomplete="new-password" type="text" formControlName="password" placeholder="请输入新密码" />
+            <input
+              nz-input
+              autocomplete="new-password"
+              type="text"
+              formControlName="password"
+              [placeholder]="'validation.password.required' | i18n"
+            />
           </nz-input-group>
-<!--          <ng-template #suffixTemplate1>-->
-<!--            <span nz-icon *ngIf="passwordVisible1" [nzType]="'eye-invisible'" (click)="passwordVisible1 = !passwordVisible1"></span>-->
-<!--            <span nz-icon *ngIf="!passwordVisible1" [nzType]="'eye'" (click)="passwordVisible1 = !passwordVisible1"></span>-->
-<!--          </ng-template>-->
+          <!--          <ng-template #suffixTemplate1>-->
+          <!--            <span nz-icon *ngIf="passwordVisible1" [nzType]="'eye-invisible'" (click)="passwordVisible1 = !passwordVisible1"></span>-->
+          <!--            <span nz-icon *ngIf="!passwordVisible1" [nzType]="'eye'" (click)="passwordVisible1 = !passwordVisible1"></span>-->
+          <!--          </ng-template>-->
         </nz-form-control>
       </nz-form-item>
       <nz-form-item>
-        <nz-form-control nzErrorTip="您两次输入的密码不一致!">
+        <nz-form-control [nzErrorTip]="'validation.password.twice' | i18n">
           <nz-input-group nzSize="large" nzPrefixIcon="lock">
-            <input nz-input autocomplete="new-password" type="text" formControlName="newPassword" placeholder="请确定您输入的新密码" />
+            <input
+              nz-input
+              autocomplete="new-password"
+              type="text"
+              formControlName="newPassword"
+              [placeholder]="'validation.confirm-password.required' | i18n"
+            />
           </nz-input-group>
-<!--          <ng-template #suffixTemplate2>-->
-<!--            <span nz-icon *ngIf="passwordVisible2" [nzType]="'eye-invisible'" (click)="passwordVisible2 = !passwordVisible2"></span>-->
-<!--            <span nz-icon *ngIf="!passwordVisible2" [nzType]="'eye'" (click)="passwordVisible2 = !passwordVisible2"></span>-->
-<!--          </ng-template>-->
+          <!--          <ng-template #suffixTemplate2>-->
+          <!--            <span nz-icon *ngIf="passwordVisible2" [nzType]="'eye-invisible'" (click)="passwordVisible2 = !passwordVisible2"></span>-->
+          <!--            <span nz-icon *ngIf="!passwordVisible2" [nzType]="'eye'" (click)="passwordVisible2 = !passwordVisible2"></span>-->
+          <!--          </ng-template>-->
         </nz-form-control>
       </nz-form-item>
     </nz-tab>
   </nz-tabset>
   <nz-form-item>
     <button nz-button type="submit" nzType="primary" nzSize="large" [nzLoading]="loading" [disabled]="!form.valid" nzBlock>
-      提交
+      {{ 'ic.actions.submit' | i18n }}
     </button>
   </nz-form-item>
   <nz-form-item nz-row nzJustify="end">
-    <nz-col  [nzSpan]="12" class="text-right login-register-button-wrapper">
+    <nz-col [nzSpan]="12" class="text-right login-register-button-wrapper">
       <ng-container>
-        <a class="forgot login-forget-button" (click)="returnLogin()">{{ '返回登录页' | i18n }}</a>
+        <a class="forgot login-forget-button" (click)="returnLogin()">{{ 'ic.actions.back' | i18n }}</a>
       </ng-container>
     </nz-col>
   </nz-form-item>

+ 76 - 56
src/app/routes/passport/login/login.component.html

@@ -1,70 +1,90 @@
 <form nz-form [formGroup]="form" (ngSubmit)="submit()" role="form">
-    <nz-alert *ngIf="type === 0 && error && code != '651'" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg">
-    </nz-alert>
-    <nz-alert
-      *ngIf="error && code == '651'"
-      [nzType]="'error'"
-      [nzMessage]="error"
-      [nzCloseText]="'申请license'"
-      (nzOnClose)="getComputerInfo()"
-    ></nz-alert>
-    <nz-form-item>
-      <nz-form-control [nzErrorTip]="'请输入用户名!' | i18n">
-        <nz-input-group nzSize="large" nzPrefixIcon="user">
-          <input nz-input formControlName="userName" placeholder="请输入用户名" (focus)="clearError()"/>
-        </nz-input-group>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-control [nzErrorTip]="'请输入密码' | i18n">
-        <nz-input-group nzSize="large" nzPrefixIcon="lock" [nzSuffix]="suffixTemplate">
-          <input nz-input [type]="passwordVisible ? 'text' : 'password'" formControlName="password" placeholder="请输入密码" (focus)="clearError()"/>
-        </nz-input-group>
-        <ng-template #suffixTemplate>
-          <span nz-icon *ngIf="passwordVisible" [nzType]="'eye-invisible'" (click)="passwordVisible = !passwordVisible"></span>
-          <span nz-icon *ngIf="!passwordVisible" [nzType]="'eye'" (click)="passwordVisible = !passwordVisible"></span>
-        </ng-template>
-      </nz-form-control>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-control [nzErrorTip]="'请获取手机号!' | i18n">
-        <nz-input-group nzSize="large" nzPrefixIcon="phone">
-          <input nz-input type="text" formControlName="mobile" placeholder="手机号" [(ngModel)]="phone" [disabled]="true"/>
-        </nz-input-group>
-      </nz-form-control>
-      <button nz-button nzType="primary" style="width: 112px" type="button" [disabled]="btnContent >= 1" (click)="getCaptcha();$event.preventDefault()" nzSize="large">{{btnContent == 0?'获取验证码':btnContent}}</button>
-    </nz-form-item>
-    <nz-form-item>
-      <nz-form-control [nzErrorTip]="'请输入验证码!' | i18n">
-        <nz-input-group nzSize="large" nzPrefixIcon="code">
-          <input nz-input type="text" formControlName="captcha" placeholder="请输入验证码" />
-        </nz-input-group>
-      </nz-form-control>
-    </nz-form-item>
-
-
+  <nz-alert *ngIf="type === 0 && error && code != '651'" [nzType]="'error'" [nzMessage]="error" [nzShowIcon]="true" class="mb-lg">
+  </nz-alert>
+  <nz-alert
+    *ngIf="error && code == '651'"
+    [nzType]="'error'"
+    [nzMessage]="error"
+    [nzCloseText]="'申请license'"
+    (nzOnClose)="getComputerInfo()"
+  ></nz-alert>
+  <nz-form-item>
+    <nz-form-control [nzErrorTip]="'ic.action.enter.accout' | i18n">
+      <nz-input-group nzSize="large" nzPrefixIcon="user">
+        <input nz-input formControlName="userName" [placeholder]="'ic.action.enter.accout' | i18n" (focus)="clearError()" />
+      </nz-input-group>
+    </nz-form-control>
+  </nz-form-item>
+  <nz-form-item>
+    <nz-form-control [nzErrorTip]="'ic.action.enter.password' | i18n">
+      <nz-input-group nzSize="large" nzPrefixIcon="lock" [nzSuffix]="suffixTemplate">
+        <input
+          nz-input
+          [type]="passwordVisible ? 'text' : 'password'"
+          formControlName="password"
+          [placeholder]="'ic.action.enter.password' | i18n"
+          (focus)="clearError()"
+        />
+      </nz-input-group>
+      <ng-template #suffixTemplate>
+        <span nz-icon *ngIf="passwordVisible" [nzType]="'eye-invisible'" (click)="passwordVisible = !passwordVisible"></span>
+        <span nz-icon *ngIf="!passwordVisible" [nzType]="'eye'" (click)="passwordVisible = !passwordVisible"></span>
+      </ng-template>
+    </nz-form-control>
+  </nz-form-item>
+  <nz-form-item>
+    <nz-form-control [nzErrorTip]="'请获取手机号!' | i18n">
+      <nz-input-group nzSize="large" nzPrefixIcon="phone">
+        <input
+          nz-input
+          type="text"
+          formControlName="mobile"
+          [placeholder]="'ic.menu.click.right.to.get.captcha' | i18n"
+          [(ngModel)]="phone"
+          [disabled]="true"
+        />
+      </nz-input-group>
+    </nz-form-control>
+    <button
+      nz-button
+      nzType="primary"
+      style="width: 112px"
+      type="button"
+      [disabled]="btnContent >= 1"
+      (click)="getCaptcha(); $event.preventDefault()"
+      nzSize="large"
+      >{{ btnContent == 0 ? ('ic.menu.get.captcha' | i18n) : btnContent }}</button
+    >
+  </nz-form-item>
+  <nz-form-item>
+    <nz-form-control [nzErrorTip]="'validation.verification-code.required' | i18n">
+      <nz-input-group nzSize="large" nzPrefixIcon="code">
+        <input nz-input type="text" formControlName="captcha" [placeholder]="'ic.action.enter.captcha' | i18n" />
+      </nz-input-group>
+    </nz-form-control>
+  </nz-form-item>
 
   <nz-form-item>
-    <button class="ic-login-button" nz-button type="submit" nzType="primary" nzSize="large"  nzBlock>
+    <button class="ic-login-button" nz-button type="submit" nzType="primary" nzSize="large" nzBlock>
       {{ 'app.login.login' | i18n }}
     </button>
   </nz-form-item>
 
   <nz-form-item nz-row nzJustify="end">
-<!--    <nz-col-->
-<!--      *ngIf="showForgetPasswordButton"-->
-<!--      [nzSpan]="12"-->
-<!--      [ngClass]="{ 'text-right': !showRegisterButton }"-->
-<!--      class="login-forget-button-wrapper"-->
-<!--    >-->
-<!--      <ng-container>-->
-<!--        <label nz-checkbox>{{ '记住密码' | i18n }}</label>-->
-<!--      </ng-container>-->
-<!--    </nz-col>-->
+    <!--    <nz-col-->
+    <!--      *ngIf="showForgetPasswordButton"-->
+    <!--      [nzSpan]="12"-->
+    <!--      [ngClass]="{ 'text-right': !showRegisterButton }"-->
+    <!--      class="login-forget-button-wrapper"-->
+    <!--    >-->
+    <!--      <ng-container>-->
+    <!--        <label nz-checkbox>{{ '记住密码' | i18n }}</label>-->
+    <!--      </ng-container>-->
+    <!--    </nz-col>-->
     <nz-col *ngIf="showRegisterButton" [nzSpan]="12" class="text-right login-register-button-wrapper">
       <ng-container>
         <!--        <a class="forgot login-register-button" (click)="goToRegister()">{{ registerButtonName | i18n }}</a>-->
-        <a class="forgot login-forget-button" (click)="forgetPassword()">{{ '忘记密码' | i18n }}</a>
+        <a class="forgot login-forget-button" (click)="forgetPassword()">{{ 'app.forget.password' | i18n }}</a>
       </ng-container>
     </nz-col>
   </nz-form-item>