Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Woo "Continue as Existing user" screen #87931

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
21 changes: 11 additions & 10 deletions client/blocks/login/continue-as-user.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,20 @@ function ContinueAsUser( {
className="continue-as-user__change-user-link"
onClick={ onChangeAccount }
>
{ translate( 'Log in with a different WordPress.com account' ) }
{ translate( 'Sign in as a different user' ) }
</button>
</div>
<Button
busy={ isLoading }
primary
href={ validatedRedirectUrlFromQuery || validatedRedirectPath || '/' }
>
{ `${ translate( 'Continue as', {
context: 'Continue as an existing WordPress.com user',
} ) } ${ userName }` }
</Button>
</div>
<Button
primary
busy={ isLoading }
className="continue-as-user__continue-button"
href={ validatedRedirectUrlFromQuery || validatedRedirectPath || '/' }
>
{ `${ translate( 'Continue as', {
context: 'Continue as an existing WordPress.com user',
} ) } ${ userName }` }
</Button>
</div>
);
}
Expand Down
25 changes: 15 additions & 10 deletions client/blocks/login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ class Login extends Component {
) }
</p>
);
} else if ( this.showContinueAsUser() ) {
headerText = <h3>{ translate( 'Get started in minutes' ) }</h3>;
postHeader = (
<p className="login__header-subtitle">
{ translate( 'First, select the account you’d like to use.' ) }
</p>
);
} else {
headerText = <h3>{ translate( "Let's get started" ) }</h3>;
const poweredByWpCom =
Expand All @@ -430,21 +437,19 @@ class Login extends Component {
<br />
</>
) : null;
const accountSelectionOrLoginToContinue = this.showContinueAsUser()
? translate( "First, select the account you'd like to use." )
: translate(

postHeader = (
<p className="login__header-subtitle">
{ poweredByWpCom }
{ translate(
"Please, log in to continue. Don't have an account? {{signupLink}}Sign up{{/signupLink}}",
{
components: {
signupLink: <a href={ this.getSignupUrl() } />,
br: <br />,
},
}
);
postHeader = (
<p className="login__header-subtitle">
{ poweredByWpCom }
{ accountSelectionOrLoginToContinue }
) }
</p>
);
}
Expand Down Expand Up @@ -782,7 +787,7 @@ class Login extends Component {
if ( this.showContinueAsUser() ) {
if ( isWoo ) {
return (
<Fragment>
<div className="login__body login__body--continue-as-user">
<ContinueAsUser
onChangeAccount={ this.handleContinueAsAnotherUser }
isWooOAuth2Client={ isWoo }
Expand All @@ -802,7 +807,7 @@ class Login extends Component {
showSocialLoginFormOnly={ true }
sendMagicLoginLink={ this.sendMagicLoginLink }
/>
</Fragment>
</div>
);
}

Expand Down
Loading
Loading