Skip to content

Commit

Permalink
Jetpack Checklist: Move all tasks to constants (#32272)
Browse files Browse the repository at this point in the history
* Jetpack Checklist: Move Protect task to constants

* Jetpack Checklist: Move Akismet task to constants
  • Loading branch information
tyxla authored Apr 16, 2019
1 parent 15a2750 commit 22dc2ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ export const JETPACK_CHECKLIST_TASKS = {
},
};

export const JETPACK_CHECKLIST_TASK_AKISMET = {
title: translate( "We're automatically turning on spam filtering." ),
completedTitle: translate( "We've automatically turned on spam filtering." ),
};

export const JETPACK_CHECKLIST_TASK_PROTECT = {
title: translate( "We've automatically protected you from brute force login attacks." ),
};

export const JETPACK_CHECKLIST_TASK_BACKUPS_REWIND = {
title: translate( 'Backup and Scan' ),
description: translate(
Expand Down
12 changes: 4 additions & 8 deletions client/my-sites/plans/current-plan/jetpack-checklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ import { getSiteSlug } from 'state/sites/selectors';
import { isDesktop } from 'lib/viewport';
import {
JETPACK_CHECKLIST_TASKS,
JETPACK_CHECKLIST_TASK_AKISMET,
JETPACK_CHECKLIST_TASK_BACKUPS_REWIND,
JETPACK_CHECKLIST_TASK_BACKUPS_VAULTPRESS,
JETPACK_CHECKLIST_TASK_PROTECT,
} from './constants';
import { recordTracksEvent } from 'state/analytics/actions';
import { requestGuidedTour } from 'state/ui/guided-tours/actions';
Expand Down Expand Up @@ -90,12 +92,7 @@ class JetpackChecklist extends PureComponent {
isPlaceholder={ ! taskStatuses }
progressText={ translate( 'Your Jetpack setup progress' ) }
>
<Task
completed
title={ translate(
"We've automatically protected you from brute force login attacks."
) }
/>
<Task completed { ...JETPACK_CHECKLIST_TASK_PROTECT } />
{ isPaidPlan && isRewindAvailable && (
<Task
{ ...JETPACK_CHECKLIST_TASK_BACKUPS_REWIND }
Expand All @@ -116,8 +113,7 @@ class JetpackChecklist extends PureComponent {
) }
{ isPaidPlan && productInstallStatus && (
<Task
title={ translate( "We're automatically turning on spam filtering." ) }
completedTitle={ translate( "We've automatically turned on spam filtering." ) }
{ ...JETPACK_CHECKLIST_TASK_AKISMET }
completed={ akismetFinished }
inProgress={ ! akismetFinished }
/>
Expand Down

0 comments on commit 22dc2ac

Please sign in to comment.