diff --git a/README.md b/README.md index 993c089e762..26b3ada6cc4 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ then add it to the (emulated) pubsub queue. ### This pubsub queue will be consumed by this cron job, which is responsible for looking up and emailing impacted users: ```sh -npm run dev:cron:breach-alerts +NODE_ENV="development" npm run dev:cron:breach-alerts ``` ### Emails diff --git a/locales/en/email-strings.ftl b/locales/en/email-strings.ftl index e2819ab9420..4c836a9bd97 100644 --- a/locales/en/email-strings.ftl +++ b/locales/en/email-strings.ftl @@ -82,11 +82,14 @@ email-verify-subhead = Verify your email to start protecting your data after a b email-verify-simply-click = Simply click the link below to finish verifying your account. ## Breach report -## Variables: -## $email-address (string) - Email address email-breach-summary = Here’s your data breach summary +# Variables: +# $email-address (string) - Email address, bolded email-breach-detected = Search results for your { $email-address } account have detected that your email may have been exposed. We recommend you act now to resolve this breach. +# Variables: +# $email-address (string) - Email address +email-breach-detected-2 = Search results for your { $email-address } account have detected that your email may have been exposed. We recommend you act now to resolve this breach. email-dashboard-cta = Go to Dashboard ## Breach alert diff --git a/package.json b/package.json index bc9db6aaec0..06c2adcfba7 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "dev": "npm run build-nimbus && next dev --port=6060", "dev:cron:first-data-broker-removal-fixed": "tsx --tsconfig tsconfig.cronjobs.json src/scripts/cronjobs/firstDataBrokerRemovalFixed.tsx", "dev:cron:monthly-activity": "tsx --tsconfig tsconfig.cronjobs.json src/scripts/cronjobs/monthlyActivity.tsx", - "dev:cron:breach-alerts": "tsx --tsconfig tsconfig.cronjobs.json src/scripts/cronjobs/emailBreachAlerts.ts", + "dev:cron:breach-alerts": "tsx --tsconfig tsconfig.cronjobs.json src/scripts/cronjobs/emailBreachAlerts.tsx", "dev:cron:db-delete-unverified-subscribers": "tsx --tsconfig tsconfig.cronjobs.json src/scripts/cronjobs/deleteUnverifiedSubscribers.ts", "dev:cron:db-pull-breaches": "tsx --tsconfig tsconfig.cronjobs.json src/scripts/cronjobs/syncBreaches.ts", "dev:cron:remote-settings-pull-breaches": "tsx --tsconfig tsconfig.cronjobs.json src/scripts/cronjobs/updateBreachesInRemoteSettings.ts", diff --git a/src/apiMocks/mockData.ts b/src/apiMocks/mockData.ts index 5f82eb34647..a7ac1cb408e 100644 --- a/src/apiMocks/mockData.ts +++ b/src/apiMocks/mockData.ts @@ -197,12 +197,13 @@ export function createRandomHibpListing( Name: name, PwnCount: faker.number.int(), Title: title, - FaviconUrl: faker.helpers.maybe(() => - faker.image.url({ - height: faker.number.int({ min: 20, max: 36 }), - width: faker.number.int({ min: 20, max: 36 }), - }), - ), + FaviconUrl: faker.helpers.maybe(() => { + const dimension = faker.number.int({ min: 20, max: 36 }); + return faker.image.url({ + height: dimension, + width: dimension, + }); + }), ...fixedData, }; } diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/admin/emails/EmailTrigger.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/admin/emails/EmailTrigger.tsx index a8de352b39f..c5794281703 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/admin/emails/EmailTrigger.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/admin/emails/EmailTrigger.tsx @@ -8,6 +8,7 @@ import { useState } from "react"; import Link from "next/link"; import styles from "./EmailTrigger.module.scss"; import { + triggerBreachAlert, triggerFirstDataBrokerRemovalFixed, triggerMonthlyActivity, triggerVerificationEmail, @@ -23,6 +24,7 @@ export const EmailTrigger = (props: Props) => { props.emailAddresses[0], ); const [isSendingVerification, setIssSendingVerification] = useState(false); + const [isSendingBreachAlert, setIssSendingBreachAlert] = useState(false); const [ isSendingMonthlyActivityOverview, setIssSendingMonthlyActivityOverview, @@ -80,6 +82,18 @@ export const EmailTrigger = (props: Props) => { > Monthly activity overview +