-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auth: Move SelfHostedInstructions and LostPassword to separate files
- Loading branch information
Showing
3 changed files
with
73 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import { localize } from 'i18n-calypso'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { addLocaleToWpcomUrl, getLocaleSlug } from 'lib/i18n-utils'; | ||
|
||
const LostPassword = ( { translate } ) => { | ||
const url = addLocaleToWpcomUrl( | ||
'https://wordpress.com/wp-login.php?action=lostpassword', | ||
getLocaleSlug() | ||
); | ||
return ( | ||
<p className="auth__lost-password"> | ||
<a href={ url } target="_blank" rel="noopener noreferrer"> | ||
{ translate( 'Lost your password?' ) } | ||
</a> | ||
</p> | ||
); | ||
}; | ||
|
||
export default localize( LostPassword ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import { localize } from 'i18n-calypso'; | ||
import Gridicon from 'gridicons'; | ||
|
||
const SelfHostedInstructions = ( { onClickClose, translate } ) => ( | ||
<div className="auth__self-hosted-instructions"> | ||
<a href="#" onClick={ onClickClose } className="auth__self-hosted-instructions-close"> | ||
<Gridicon icon="cross" size={ 24 } /> | ||
</a> | ||
|
||
<h2>{ translate( 'Add self-hosted site' ) }</h2> | ||
<p> | ||
{ translate( | ||
'By default when you sign into the WordPress.com app, you can edit blogs and sites hosted at WordPress.com' | ||
) } | ||
</p> | ||
<p> | ||
{ translate( | ||
"If you'd like to edit your self-hosted WordPress blog or site, you can do that by following these instructions:" | ||
) } | ||
</p> | ||
|
||
<ol> | ||
<li> | ||
<strong>{ translate( 'Install the Jetpack plugin.' ) }</strong> | ||
<br /> | ||
<a href="http://jetpack.me/install/"> | ||
{ translate( 'Please follow these instructions to install Jetpack' ) } | ||
</a>. | ||
</li> | ||
<li>{ translate( 'Connect Jetpack to WordPress.com.' ) }</li> | ||
<li> | ||
{ translate( | ||
'Now you can sign in to the app using the WordPress.com account Jetpack is connected to, ' + | ||
'and you can find your self-hosted site under the "My Sites" section.' | ||
) } | ||
</li> | ||
</ol> | ||
</div> | ||
); | ||
|
||
export default localize( SelfHostedInstructions ); |