Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | 3x 6x 6x 6x 6x 6x 6x 3x | import { getRedirectUrl } from '@automattic/jetpack-components';
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import PropTypes from 'prop-types';
import { getProductGroup } from '../../activation-screen/utils.js';
import './style.scss';
/**
* The Jetpack Product Details component.
*
* @param {object} props -- The properties.
* @param {number} props.productId -- The id of the product
* @param {string} props.siteRawUrl -- The url of the site
* @return {import('react').Component} The `JetpackProductDetails` component.
*/
const JetpackProductDetails = props => {
const { productId, siteRawUrl } = props;
const cloudDashboardBaseUrl = `https://cloud.jetpack.com/landing/${ siteRawUrl }`;
const productGroup = getProductGroup( productId );
const productInfoMap = {
jetpack_anti_spam: {
title: __( 'Jetpack Anti-spam is active!', 'jetpack-licensing' ),
text: __(
"We'll take care of everything from here. Now you can enjoy a spam-free site!",
'jetpack-licensing'
),
},
jetpack_backup: {
title: __( 'Jetpack Backup is active!', 'jetpack-licensing' ),
text: createInterpolateElement(
__(
'You can see your backups and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.',
'jetpack-licensing'
),
{
a: <a href={ cloudDashboardBaseUrl } />,
}
),
},
jetpack_complete: {
title: __( 'Jetpack Complete is active!', 'jetpack-licensing' ),
text: createInterpolateElement(
__(
'You can see your backups, security scans, and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.',
'jetpack-licensing'
),
{
a: <a href={ cloudDashboardBaseUrl } />,
}
),
},
jetpack_scan: {
title: __( 'Jetpack Scan is active!', 'jetpack-licensing' ),
text: createInterpolateElement(
__( 'You can see your security scans on <a>cloud.jetpack.com</a>.', 'jetpack-licensing' ),
{
a: <a href={ cloudDashboardBaseUrl } />,
}
),
},
jetpack_search: {
title: __( 'Jetpack Search is active!', 'jetpack-licensing' ),
text: __(
"Next, we'll help you customize the Search experience for your visitors.",
'jetpack-licensing'
),
},
jetpack_security: {
title: __( 'Jetpack Security is active!', 'jetpack-licensing' ),
text: createInterpolateElement(
__(
'You can see your backups, security scans, and restore your site on <a>cloud.jetpack.com</a>. If you ever lose access to your site, you can restore it there.',
'jetpack-licensing'
),
{
a: <a href={ cloudDashboardBaseUrl } />,
}
),
},
jetpack_videopress: {
title: __( 'Jetpack VideoPress is active!', 'jetpack-licensing' ),
text: __(
'Experience high-quality, ad-free video built specifically for WordPress.',
'jetpack-licensing'
),
},
jetpack_social_advanced: {
title: __( 'Jetpack Social Advanced is active!', 'jetpack-licensing' ),
text: createInterpolateElement(
__(
'Create amazing link previews for your posts using Social Image Generator. Learn more <a>here</a>.<br/><br/>Learn how to make the most out of Jetpack Social <link>here</link>.<br/><br/>',
'jetpack-licensing'
),
{
a: (
<a
href={ getRedirectUrl( 'jetpack-social-sig-support-page' ) }
target="_blank"
rel="noreferrer"
/>
),
br: <br />,
link: (
<a
href={ getRedirectUrl( 'social-plugin-publicize-support-admin-page' ) }
target="_blank"
rel="noreferrer"
/>
),
}
),
},
jetpack_social_basic: {
title: __( 'Jetpack Social Basic is active!', 'jetpack-licensing' ),
text: createInterpolateElement(
__(
'Enjoy unlimited shares with Jetpack Social Basic. Learn how to make the most out of Jetpack Social <a>here</a>.',
'jetpack-licensing'
),
{
a: (
<a
href={ getRedirectUrl( 'social-plugin-publicize-support-admin-page' ) }
target="_blank"
rel="noreferrer"
/>
),
}
),
},
default: {
title: __( 'Your product is active!', 'jetpack-licensing' ),
text: __( "You're all set!", 'jetpack-licensing' ),
},
};
productInfoMap.jetpack_pro = {
...productInfoMap.jetpack_complete,
title: __( 'Jetpack Pro is active!', 'jetpack-licensing' ),
};
return (
<div className="jp-license-activation-screen-success-info--product-details">
<h1>
{ productInfoMap[ productGroup ].title }
{ String.fromCodePoint( 0x1f389 ) /* Celebration emoji 🎉 */ }
</h1>
<p>{ productInfoMap[ productGroup ].text }</p>
</div>
);
};
JetpackProductDetails.propTypes = {
dashboardUrl: PropTypes.string,
productId: PropTypes.number,
};
export default JetpackProductDetails;
|