From 54b7164e06c238531c6d815ffe502d923a5eb72a Mon Sep 17 00:00:00 2001 From: fengyang_sy Date: Sun, 28 Mar 2021 04:51:43 -0700 Subject: [PATCH 1/3] [#234]Add setting password to registration page Add setting password to registration page, and check whether the two passwords are the same Signed-off-by: fengyang_sy --- src/dashboard/src/locales/en-US/login.js | 1 + src/dashboard/src/locales/zh-CN/login.js | 1 + src/dashboard/src/pages/User/Login.js | 46 ++++++++++++++++++------ 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/dashboard/src/locales/en-US/login.js b/src/dashboard/src/locales/en-US/login.js index adbbf4dae..7017bb73e 100644 --- a/src/dashboard/src/locales/en-US/login.js +++ b/src/dashboard/src/locales/en-US/login.js @@ -12,6 +12,7 @@ export default { 'app.login.login': 'Login', 'app.register.register': 'Register', 'app.register.orgName': 'Organization name', + 'app.register.passwordAgain': 'Enter the password again', 'app.register.success': 'The organization and user register success!', 'app.register.orgName.example': 'For example: org1.cello.com', 'app.register.get-verification-code': 'Get code', diff --git a/src/dashboard/src/locales/zh-CN/login.js b/src/dashboard/src/locales/zh-CN/login.js index b39dac34a..ca5757d02 100644 --- a/src/dashboard/src/locales/zh-CN/login.js +++ b/src/dashboard/src/locales/zh-CN/login.js @@ -12,6 +12,7 @@ export default { 'app.login.login': '登录', 'app.register.register': '注册', 'app.register.orgName': '组织名', + 'app.register.passwordAgain': '再次输入密码', 'app.register.success': '组织和用户注册成功', 'app.register.orgName.example': '例如:org1.cello.com', 'app.register.get-verification-code': '获取验证码', diff --git a/src/dashboard/src/pages/User/Login.js b/src/dashboard/src/pages/User/Login.js index d55e27966..ed9a3324c 100644 --- a/src/dashboard/src/pages/User/Login.js +++ b/src/dashboard/src/pages/User/Login.js @@ -117,16 +117,6 @@ class LoginPage extends Component { {!registering && registerMsg !== '' && this.renderMessage({ type: success ? 'success' : 'error', message: registerMsg })} - + + + ( + { + validator(role, value){ + if (value !== getFieldValue("password")){ + return Promise.reject(intl.formatMessage({ id: 'validation.password.twice' })); + } + return Promise.resolve(); + } + } + ) + ]} + /> {intl.formatMessage({ id: 'app.register.register', From e2fba63e29fc8b15d066e0e61bf002444d070da0 Mon Sep 17 00:00:00 2001 From: fengyang_sy Date: Sun, 28 Mar 2021 05:17:20 -0700 Subject: [PATCH 2/3] [#236]Add the input organization name box to the login page Signed-off-by: fengyang_sy --- src/dashboard/src/pages/User/Login.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/dashboard/src/pages/User/Login.js b/src/dashboard/src/pages/User/Login.js index d55e27966..fb6de3add 100644 --- a/src/dashboard/src/pages/User/Login.js +++ b/src/dashboard/src/pages/User/Login.js @@ -78,6 +78,20 @@ class LoginPage extends Component { this.renderMessage( intl.formatMessage({ id: 'app.login.message-invalid-credentials' }) )} + Date: Wed, 31 Mar 2021 06:01:16 +0000 Subject: [PATCH 3/3] Bump y18n in /build_image/dockerhub/v0.9.0/user-dashboard Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] --- build_image/dockerhub/v0.9.0/user-dashboard/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_image/dockerhub/v0.9.0/user-dashboard/yarn.lock b/build_image/dockerhub/v0.9.0/user-dashboard/yarn.lock index ac546bfc3..8b5f7557c 100644 --- a/build_image/dockerhub/v0.9.0/user-dashboard/yarn.lock +++ b/build_image/dockerhub/v0.9.0/user-dashboard/yarn.lock @@ -6060,9 +6060,9 @@ xtend@^4.0.0, xtend@^4.0.1: integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== yallist@^2.1.2: version "2.1.2"