Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const PasswordlessLogin = ({
<StandardLogin
form={form}
handleForgotPasswordClick={handleForgotPasswordClick}
setShowPasswordView={setShowPasswordView}
hideEmail={true}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const StandardLogin = ({
handleForgotPasswordClick,
hideEmail = false,
isSocialEnabled = false,
setShowPasswordView,
idps = []
}) => {
return (
Expand All @@ -28,7 +29,7 @@ const StandardLogin = ({
handleForgotPasswordClick={handleForgotPasswordClick}
/>
</Stack>
<Stack spacing={6}>
<Stack spacing={4}>
<Button
type="submit"
onClick={() => {
Expand All @@ -40,16 +41,31 @@ const StandardLogin = ({
</Button>
{isSocialEnabled && idps.length > 0 && (
<>
<Divider />
<Text align="center" fontSize="sm">
<FormattedMessage
defaultMessage="Or Login With"
id="login_form.message.or_login_with"
/>
</Text>
<Stack spacing={6} paddingTop={2} paddingBottom={2}>
<Divider />
<Text align="center" fontSize="sm">
<FormattedMessage
defaultMessage="Or Login With"
id="login_form.message.or_login_with"
/>
</Text>
</Stack>
<SocialLogin form={form} idps={idps} />
</>
)}
{hideEmail && (
<Button
onClick={() => setShowPasswordView(false)}
borderColor="gray.500"
color="blue.600"
variant="outline"
>
<FormattedMessage
defaultMessage="Back to Sign In Options"
id="login_form.button.back"
/>
</Button>
)}
</Stack>
</Stack>
)
Expand All @@ -60,6 +76,7 @@ StandardLogin.propTypes = {
handleForgotPasswordClick: PropTypes.func,
hideEmail: PropTypes.bool,
isSocialEnabled: PropTypes.bool,
setShowPasswordView: PropTypes.func,
idps: PropTypes.arrayOf(PropTypes.string)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('StandardLogin component', () => {

expect(screen.queryByLabelText('Email')).not.toBeInTheDocument()
expect(screen.getByLabelText('Password')).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Back to Sign In Options'})).toBeInTheDocument()
})

test('renders social login buttons', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,12 @@
"value": "Apple"
}
],
"login_form.button.back": [
{
"type": 0,
"value": "Back to Sign In Options"
}
],
"login_form.button.continue_securely": [
{
"type": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,12 @@
"value": "Apple"
}
],
"login_form.button.back": [
{
"type": 0,
"value": "Back to Sign In Options"
}
],
"login_form.button.continue_securely": [
{
"type": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4761,6 +4761,20 @@
"value": "]"
}
],
"login_form.button.back": [
{
"type": 0,
"value": "["
},
{
"type": 0,
"value": "Ɓȧȧƈķ ŧǿǿ Şīɠƞ Īƞ Ǿƥŧīǿǿƞş"
},
{
"type": 0,
"value": "]"
}
],
"login_form.button.continue_securely": [
{
"type": 0,
Expand Down
3 changes: 3 additions & 0 deletions packages/template-retail-react-app/translations/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,9 @@
"login_form.button.apple": {
"defaultMessage": "Apple"
},
"login_form.button.back": {
"defaultMessage": "Back to Sign In Options"
},
"login_form.button.continue_securely": {
"defaultMessage": "Continue Securely"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/template-retail-react-app/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,9 @@
"login_form.button.apple": {
"defaultMessage": "Apple"
},
"login_form.button.back": {
"defaultMessage": "Back to Sign In Options"
},
"login_form.button.continue_securely": {
"defaultMessage": "Continue Securely"
},
Expand Down
Loading