0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-03 22:15:32 -05:00

refactor: sign-in content (#1398)

* refactor: sign-in content

* fix: update phrase key
This commit is contained in:
Gao Sun 2022-07-04 16:26:39 +08:00 committed by GitHub
parent 4e19a8fbb9
commit 5c685d9412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 13 deletions

View file

@ -156,7 +156,7 @@ const Preview = ({ signInExperience, className }: Props) => {
setPlatform('mobile'); setPlatform('mobile');
}} }}
> >
{t('sign_in_exp.preview.mobile')} {t('sign_in_exp.preview.native')}
</TabNavItem> </TabNavItem>
<TabNavItem <TabNavItem
isActive={platform === 'desktopWeb'} isActive={platform === 'desktopWeb'}

View file

@ -29,7 +29,7 @@ const SignInMethodsForm = () => {
primaryMethod?: SignInMethodKey primaryMethod?: SignInMethodKey
) => { ) => {
if (oldPrimaryMethod) { if (oldPrimaryMethod) {
// The secondary sign in method should select the old primary method by default. // The secondary sign-in method should select the old primary method by default.
setValue(`signInMethods.${oldPrimaryMethod}`, true); setValue(`signInMethods.${oldPrimaryMethod}`, true);
} }

View file

@ -74,7 +74,7 @@ const SignInExperience = () => {
const formatted = signInExperienceParser.toRemoteModel(formData); const formatted = signInExperienceParser.toRemoteModel(formData);
// Sign in methods changed, need to show confirm modal first. // Sign-in methods changed, need to show confirm modal first.
if (!compareSignInMethods(data, formatted)) { if (!compareSignInMethods(data, formatted)) {
setDataToCompare(formatted); setDataToCompare(formatted);

View file

@ -59,7 +59,7 @@ describe('validate terms of use', () => {
}); });
}); });
describe('check whether the social sign in method state is enabled', () => { describe('check whether the social sign-in method state is enabled', () => {
it('should be truthy when sign-in method state is primary', () => { it('should be truthy when sign-in method state is primary', () => {
expect(isEnabled(SignInMethodState.Primary)).toBeTruthy(); expect(isEnabled(SignInMethodState.Primary)).toBeTruthy();
}); });

View file

@ -313,7 +313,7 @@ const translation = {
description: 'Customize the sign in UI to match your brand and view in real time', description: 'Customize the sign in UI to match your brand and view in real time',
tabs: { tabs: {
branding: 'Branding', branding: 'Branding',
methods: 'Sign in methods', methods: 'Sign-in methods',
others: 'Others', others: 'Others',
}, },
welcome: { welcome: {
@ -357,12 +357,12 @@ const translation = {
terms_of_use_tip: 'Terms of use URL', terms_of_use_tip: 'Terms of use URL',
}, },
sign_in_methods: { sign_in_methods: {
title: 'SIGN IN METHODS', title: 'SIGN-IN METHODS',
primary: 'Primary sign in method', primary: 'Primary sign-in method',
enable_secondary: 'Enable secondary sign in', enable_secondary: 'Enable secondary sign in',
enable_secondary_description: enable_secondary_description:
"Once it's turned on, you app will support more sign in method(s) besides the primary one. ", "Once it's turned on, you app will support more sign-in method(s) besides the primary one. ",
methods: 'Sign in method', methods: 'Sign-in method',
methods_sms: 'Phone number sign in', methods_sms: 'Phone number sign in',
methods_email: 'Email sign in', methods_email: 'Email sign in',
methods_social: 'Social sign in', methods_social: 'Social sign in',
@ -405,19 +405,19 @@ const translation = {
}, },
save_alert: { save_alert: {
description: description:
'You are changing sign in methods. This will impact some of your users. Are you sure you want to do that?', 'You are changing sign-in methods. This will impact some of your users. Are you sure you want to do that?',
before: 'Before', before: 'Before',
after: 'After', after: 'After',
}, },
preview: { preview: {
title: 'Sign In Preview', title: 'Sign-in Preview',
languages: { languages: {
english: 'English', english: 'English',
chinese: 'Chinese', chinese: 'Chinese',
}, },
dark: 'Dark', dark: 'Dark',
light: 'Light', light: 'Light',
mobile: 'Mobile', native: 'native',
desktop_web: 'Desktop Web', desktop_web: 'Desktop Web',
mobile_web: 'Mobile Web', mobile_web: 'Mobile Web',
}, },

View file

@ -403,7 +403,7 @@ const translation = {
}, },
dark: '深色', dark: '深色',
light: '浅色', light: '浅色',
mobile: '移动', native: '原生',
desktop_web: '桌面网页', desktop_web: '桌面网页',
mobile_web: '移动网页', mobile_web: '移动网页',
}, },