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

mozilla / blurts-server / dbc13388-4301-4480-99a2-7ddbea64fca7

pending completion
dbc13388-4301-4480-99a2-7ddbea64fca7

push

circleci

GitHub
Merge pull request #2845 from mozilla/MNTOR-1199

282 of 1371 branches covered (20.57%)

Branch coverage included in aggregate %.

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

959 of 3720 relevant lines covered (25.78%)

4.19 hits per line

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

0.0
/src/views/partials/email-signup-report.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 { breachCardPartial } from './email-breach-card.js'
6
import { getMessage } from '../../utils/fluent.js'
7

8
const emailStyle = `
×
9
  color: black;
10
  background: #f9f9fa;
11
  padding: 36px 0 24px;
12
`
13

14
const breachSummaryTableStyle = `
×
15
  margin: auto;
16
  max-width: 600px;
17
`
18

19
const breachSummaryCardStyle = `
×
20
  background: #eeeeee;
21
  border-radius: 6px;
22
  margin: 12px auto;
23
  padding: 12px;
24
  table-layout: auto;
25
  width: 100%;
26
`
27

28
const statNumberStyle = `
×
29
  font-size: 48px;
30
  font-weight: bold;
31
  width: 72px;
32
`
33

34
const statTitleStyle = `
×
35
  text-align: left;
36
`
37

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

47
const signupReportEmailPartial = data => {
×
48
  const {
49
    breachedEmail,
50
    emailBreachStats,
51
    unsafeBreachesForEmail
52
  } = data
×
53

54
  return `
×
55
    <tr>
56
      <td style='${emailStyle}'>
57
        <p>
58
          ${
59
            unsafeBreachesForEmail.length
×
60
              ? getMessage('fxm-warns-you-no-breaches')
61
              : getMessage('email-breach-detected', {
62
                  'email-address': `<strong>${breachedEmail}</strong>`
63
                })
64
          }
65
        </p>
66
        <table style='${breachSummaryTableStyle}'>
67
          <tr>
68
            <td>
69
              ${emailBreachStats?.map(breachStat => `
×
70
                <table style='${breachSummaryCardStyle}'>
71
                  <tr>
72
                    <td style='${statNumberStyle}'>
73
                      ${breachStat.statNumber}
74
                    </td>
75
                    <td style=${statTitleStyle}>
76
                      ${breachStat.statTitle}
77
                    </td>
78
                  </tr>
79
                </table>
80
              `).join('')}
81
            </td>
82
          </tr>
83
        </table>
84
        ${
85
          unsafeBreachesForEmail.map(unsafeBreach => (
86
            breachCardPartial(unsafeBreach)
×
87
          )).join('')
88
        }
89
        <a
90
          href='${data.ctaHref}'
91
          style='${ctaStyle}'
92
        >
93
          ${getMessage('email-dashboard-cta')}
94
        </a>
95
      </td>
96
    </tr>
97
  `
98
}
99

100
export { signupReportEmailPartial }
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