-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,387 additions
and
235 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
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,59 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import { translate as __ } from 'i18n-calypso'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { FEATURE_PRIVATE_JETPACK } from 'lib/plans/constants'; | ||
import { ModuleSettingsForm as moduleSettingsForm } from 'components/module-settings/module-settings-form'; | ||
import { ModuleToggle } from 'components/module-toggle'; | ||
import SettingsCard from 'components/settings-card'; | ||
import SettingsGroup from 'components/settings-group'; | ||
import { FormFieldset } from 'components/forms'; | ||
|
||
class Private extends React.Component { | ||
render() { | ||
const module_enabled = this.props.getOptionValue( 'private' ); | ||
return ( | ||
<SettingsCard | ||
{ ...this.props } | ||
module="private" | ||
feature={ FEATURE_PRIVATE_JETPACK } | ||
hideButton | ||
> | ||
<SettingsGroup | ||
hasChild | ||
module={ { module: 'private' } } | ||
support={ { | ||
text: __( 'Jetpack private sites' ), | ||
link: 'https://jetpack.com/support/private', | ||
} }> | ||
<p>{ __( 'Private sites can only be seen by you and users your approve.' ) } </p> | ||
|
||
<ModuleToggle | ||
slug="private" | ||
compact | ||
activated={ module_enabled } | ||
toggling={ this.props.isSavingAnyOption( 'private' ) } | ||
toggleModule={ this.props.toggleModuleNow }> | ||
{ __( 'Make your site private' ) } | ||
</ModuleToggle> | ||
|
||
{ module_enabled && ( | ||
<FormFieldset> | ||
<p className="jp-form-setting-explanation"> | ||
{ __( 'Your site is only visible to you and users you approve.' ) } | ||
</p> | ||
</FormFieldset> | ||
) } | ||
</SettingsGroup> | ||
</SettingsCard> | ||
); | ||
} | ||
} | ||
|
||
export default moduleSettingsForm( Private ); | ||
|
Oops, something went wrong.