Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
🔖 2.4.52
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuancaosu committed Oct 11, 2021
1 parent c10dc1e commit d2fd22b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@authing/react-ui-components",
"version": "2.4.51",
"version": "2.4.52",
"private": false,
"main": "lib/index.min.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -185,4 +185,4 @@
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "5.1.4"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useTranslation } from 'react-i18next'
export const RegisterLayout: FC = () => {
const {
state: {
config: { registerMethods, extendsFields },
config: { registerMethods, extendsFields, loginMethods = [] },
activeTabs,
guardEvents,
authClient,
Expand Down Expand Up @@ -54,10 +54,12 @@ export const RegisterLayout: FC = () => {
}
switch (t) {
case RegisterMethods.Email:
next[GuardScenes.Login] = LoginMethods.Password
loginMethods.includes(LoginMethods.Password) &&
(next[GuardScenes.Login] = LoginMethods.Password)
break
case RegisterMethods.Phone:
next[GuardScenes.Login] = LoginMethods.PhoneCode
loginMethods.includes(LoginMethods.PhoneCode) &&
(next[GuardScenes.Login] = LoginMethods.PhoneCode)
break
default:
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"bindEmailDoc": "You have not bound the mailbox yet, please enter the mailbox to bind",
"copy": "Copy",
"emailNotNull": "E-mail can not be empty",
"setPassword": "set password",
"setPassword": "Set password",
"passwordNotNull": "password can not be blank",
"LDAPAccountNotNull": "LDAP account cannot be empty",
"captchaCodeNotNull": "verification code must be filled",
Expand All @@ -180,5 +180,6 @@
"copyFailed": "Copy Failed",
"repeatPassword": "Please repeat the password",
"phoneNotNull": "Mobile phone number cannot be empty",
"networkError": "Network error, please retry"
}
"networkError": "Network error, please retry",
"unBindEmaileDoc": "{{email}} has been bound to another account"
}
4 changes: 3 additions & 1 deletion packages/react-components/src/utils/clipboard.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { i18n } from 'src/components/AuthingGuard/locales'

// https://juejin.im/post/6844903857290477582
export const copyToClipboard = (str: string) => {
const el = document.createElement('textarea') // 创建一个 <textarea> 元素
Expand All @@ -20,6 +22,6 @@ export const copyToClipboard = (str: string) => {
document.getSelection()!.addRange(selected) // 恢复原来的选中
}
} catch (e) {
console.warn('复制失败')
console.warn(i18n.t('common.copyFailed'))
}
}

0 comments on commit d2fd22b

Please sign in to comment.