Skip to content

Commit 085901b

Browse files
Security Monitor: remove link to notifications settings and add link to their wordpress account (#35769)
* Remove link to notifications settings and add link to their wordpress account * Use external link * changelog * Use tracking event
1 parent 7e4a2e6 commit 085901b

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

projects/plugins/jetpack/_inc/client/security/monitor.jsx

+16-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getRedirectUrl } from '@automattic/jetpack-components';
2+
import { ExternalLink } from '@wordpress/components';
3+
import { createInterpolateElement } from '@wordpress/element';
24
import { __, _x } from '@wordpress/i18n';
3-
import Card from 'components/card';
45
import ConnectUserBar from 'components/connect-user-bar';
56
import { withModuleSettingsFormHelpers } from 'components/module-settings/with-module-settings-form-helpers';
67
import { ModuleToggle } from 'components/module-toggle';
@@ -12,7 +13,7 @@ import React, { Component } from 'react';
1213
export const Monitor = withModuleSettingsFormHelpers(
1314
class extends Component {
1415
trackConfigureClick = () => {
15-
analytics.tracks.recordJetpackClick( 'configure-monitor' );
16+
analytics.tracks.recordJetpackClick( 'configure-monitor-email' );
1617
};
1718

1819
render() {
@@ -48,26 +49,23 @@ export const Monitor = withModuleSettingsFormHelpers(
4849
toggleModule={ this.props.toggleModuleNow }
4950
>
5051
<span className="jp-form-toggle-explanation">
51-
{ __(
52-
'Get alerts if your site goes offline. We’ll let you know when it’s back up, too.',
53-
'jetpack'
52+
{ createInterpolateElement(
53+
__(
54+
'Get alerts if your site goes offline. Alerts are sent to your <a>WordPress.com account</a> email address.',
55+
'jetpack'
56+
),
57+
{
58+
a: (
59+
<ExternalLink
60+
href="https://wordpress.com/me/account"
61+
onClick={ this.trackConfigureClick }
62+
/>
63+
),
64+
}
5465
) }
5566
</span>
5667
</ModuleToggle>
5768
</SettingsGroup>
58-
{ hasConnectedOwner && (
59-
<Card
60-
compact
61-
className="jp-settings-card__configure-link"
62-
onClick={ this.trackConfigureClick }
63-
href={ getRedirectUrl( 'calypso-settings-security', {
64-
site: this.props.blogID ?? this.props.siteRawUrl,
65-
} ) }
66-
target="_blank"
67-
>
68-
{ __( 'Configure your notification settings', 'jetpack' ) }
69-
</Card>
70-
) }
7169

7270
{ ! hasConnectedOwner && ! isOfflineMode && (
7371
<ConnectUserBar
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: other
3+
4+
Security Monitor: remove link to notifications and add link to wordpress account

0 commit comments

Comments
 (0)