• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / #12299

pending completion
#12299

push

circleci

web-flow
Merge pull request #2790 from mozilla/MNTOR-1056-Migrate-breach-alert-email

Adds email preview for email verification and breach notification

282 of 1375 branches covered (20.51%)

Branch coverage included in aggregate %.

174 of 174 new or added lines in 17 files covered. (100.0%)

959 of 3709 relevant lines covered (25.86%)

2.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/views/partials/email-monthly-unresolved.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
import { getMessage } from '../../utils/fluent.js'
6

7
const emailStyle = `
×
8
  color: black;
9
  background: #f9f9fa;
10
  padding-top: 36px;
11
`
12

13
const containerStyle = `
×
14
  background: #f9f9fa;
15
  color: black;
16
  padding: 24px;
17
`
18

19
const tableStyle = `
×
20
  background: white;
21
  border-radius: 8px;
22
  border: 1px solid #dddddd;
23
  box-shadow: 0 0 6px #dddddd;
24
  margin: auto;
25
  padding: 24px;
26
  text-align: left;
27
  width: auto;
28
`
29

30
const tableLabelStyle = `
×
31
  padding: 3px 12px;
32
`
33

34
const tableValueStyle = `
×
35
  border-left: 1px solid #cccccc;
36
  padding: 3px 12px;
37
`
38

39
const ctaStyle = `
×
40
  background: #0060df;
41
  border-radius: 4px;
42
  color: white;
43
  display: inline-block;
44
  margin: 24px 0;
45
  padding: 12px 24px;
46
`
47

48
const monthlyUnresolvedEmailPartial = (data) => `
×
49
  <tr>
50
    <td style='${emailStyle}'>
51
      <p>
52
        ${getMessage('email-is-affected', {
53
          'email-address': `<strong>${data.breachedEmail}</strong>`
54
        })}
55
      </p>
56
      <p>
57
        ${getMessage('email-more-detail')}
58
      </p>
59
    </td>
60
  </tr>
61
  <tr>
62
    <td style='${containerStyle}'>
63
      <p>
64
        <strong>
65
          ${getMessage('email-breach-status')}
66
        </strong>
67
      </p>
68
      <table
69
        border='0'
70
        cellpadding='0'
71
        cellspacing='0'
72
        role='presentation'
73
        style='${tableStyle}'
74
      >
75
        <tr>
76
          <td style='${tableLabelStyle}'>
77
            ${getMessage('email-monitored')}
78
          </td>
79
          <td style='${tableValueStyle}'>
80
            ${data.monitoredEmails.count}
81
          </td>
82
        </tr>
83
        <tr>
84
          <td style='${tableLabelStyle}'>
85
            ${getMessage('email-breach-total')}
86
          </td>
87
          <td style='${tableValueStyle}'>
88
            ${data.numBreaches.count}
89
          </td>
90
        </tr>
91
        <tr>
92
          <td style='${tableLabelStyle}'>
93
            ${getMessage('email-resolved')}
94
          </td>
95
          <td style='${tableValueStyle}'>
96
            ${data.numBreaches.numResolved}
97
          </td>
98
        </tr>
99
        <tr>
100
          <td style='${tableLabelStyle}'>
101
            ${getMessage('email-unresolved')}
102
          </td>
103
          <td style='${tableValueStyle}'>
104
            ${data.numBreaches.numUnresolved}
105
          </td>
106
        </tr>
107
      </table>
108
      <a
109
        href='${data.ctaHref}'
110
        style='${ctaStyle}'
111
      >
112
        ${getMessage('email-resolve-cta')}
113
      </a>
114
    </td>
115
  </tr>
116
`
117

118
export { monthlyUnresolvedEmailPartial }
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc