Browse Source

add placeholder for old_password

Tao Chen 1 year ago
parent
commit
9c8d0ca508
2 changed files with 23 additions and 10 deletions
  1. 10 10
      src/components/changePwdDialog.vue
  2. 13 0
      src/utils/i18n/zh_CN.json

+ 10 - 10
src/components/changePwdDialog.vue

@@ -1,18 +1,18 @@
1 1
 <template>
2
-  <el-dialog v-model="visible" width="50%">
3
-    <el-form ref="cpwd" :model="changePwdForm" :rules="chagePwdRules" label-width="120px" style="margin-top: 20px">
4
-      <el-form-item label="旧密码" prop="old_password">
5
-        <el-input v-model="changePwdForm.old_password" show-password></el-input>
2
+  <el-dialog v-model="visible" width="45%">
3
+    <el-form ref="cpwd" :model="changePwdForm" :rules="chagePwdRules" label-width="130px" label-position="left" style="margin-top: 20px">
4
+      <el-form-item :label="T('Old PassWD')" prop="old_password">
5
+        <el-input v-model="changePwdForm.old_password" :placeholder="T('For OIDC login without a password, enter any 4-20 letters')" show-password></el-input>
6 6
       </el-form-item>
7
-      <el-form-item label="新密码" prop="new_password">
7
+      <el-form-item :label="T('New PassWD')" prop="new_password">
8 8
         <el-input v-model="changePwdForm.new_password" show-password></el-input>
9 9
       </el-form-item>
10
-      <el-form-item label="确认密码" prop="confirmPwd">
10
+      <el-form-item :label="T('ConformPassWD')" prop="confirmPwd">
11 11
         <el-input v-model="changePwdForm.confirmPwd" show-password></el-input>
12 12
       </el-form-item>
13 13
       <el-form-item>
14
-        <el-button @click="cancelChangePwd">取消</el-button>
15
-        <el-button type="primary" @click="changePassword">确定</el-button>
14
+        <el-button @click="cancelChangePwd">{{ T('Cancel') }}</el-button>
15
+        <el-button type="primary" @click="changePassword">{{ T('Confirm') }}</el-button>
16 16
       </el-form-item>
17 17
     </el-form>
18 18
   </el-dialog>
@@ -24,7 +24,7 @@
24 24
   import { ElMessageBox } from 'element-plus'
25 25
   import { changeCurPwd } from '@/api/user'
26 26
   import { useUserStore } from '@/store/user'
27
-
27
+  import { T } from '@/utils/i18n'
28 28
   const props = defineProps({
29 29
     visible: Boolean,
30 30
   })
@@ -112,4 +112,4 @@
112 112
 
113 113
 <style scoped lang="scss">
114 114
 
115
-</style>
115
+</style>

+ 13 - 0
src/utils/i18n/zh_CN.json

@@ -439,5 +439,18 @@
439 439
   "Check your IdP docs, without":
440 440
   {
441 441
     "One": "检查IdP的文档, 不包含"
442
+  },
443
+  "For OIDC login without a password, enter any 4-20 letters":
444
+  {
445
+    "One": "如果通过 OIDC 登录且未设置密码,请输入任意 4-20 个字符"
446
+  },
447
+  "Old PassWD": {
448
+    "One": "旧密码"
449
+  },
450
+  "New PassWD": {
451
+    "One": "新密码"
452
+  },
453
+  "ConformPassWD": {
454
+    "One": "确认密码"
442 455
   }
443 456
 }