Skip to content

Commit a67f50f

Browse files
committed
fix: fixed API issue with free plan, bumped deps
1 parent f85c06e commit a67f50f

File tree

8 files changed

+516
-462
lines changed

8 files changed

+516
-462
lines changed

app/controllers/web/my-account/create-domain.js

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,38 @@ async function createDomain(ctx, next) {
8181

8282
// if the user was not on a valid plan then redirect them to billing post creation
8383
if (isSANB(ctx.request.body.plan)) {
84-
if (ctx.request.body.plan === 'enhanced_protection') {
85-
if (['enhanced_protection', 'team'].includes(ctx.state.user.plan))
86-
plan = 'enhanced_protection';
87-
else
88-
redirectTo = ctx.state.l(
89-
`/my-account/domains/${name}/billing?plan=enhanced_protection`
90-
);
91-
} else if (ctx.request.body.plan === 'team') {
92-
if (ctx.state.user.plan === 'team') {
93-
plan = 'team';
94-
} else {
95-
if (ctx.state.user.plan === 'enhanced_protection')
84+
switch (ctx.request.body.plan) {
85+
case 'enhanced_protection': {
86+
if (['enhanced_protection', 'team'].includes(ctx.state.user.plan))
9687
plan = 'enhanced_protection';
97-
redirectTo = ctx.state.l(
98-
`/my-account/domains/${name}/billing?plan=team`
99-
);
88+
else
89+
redirectTo = ctx.state.l(
90+
`/my-account/domains/${name}/billing?plan=enhanced_protection`
91+
);
92+
93+
break;
94+
}
95+
96+
case 'team': {
97+
if (ctx.state.user.plan === 'team') {
98+
plan = 'team';
99+
} else {
100+
if (ctx.state.user.plan === 'enhanced_protection')
101+
plan = 'enhanced_protection';
102+
redirectTo = ctx.state.l(
103+
`/my-account/domains/${name}/billing?plan=team`
104+
);
105+
}
106+
107+
break;
108+
}
109+
110+
case 'free': {
111+
plan = 'free';
112+
113+
break;
100114
}
115+
// No default
101116
}
102117
}
103118

app/views/_footer.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ footer.mt-auto
5252
height=50,
5353
alt="Go to top"
5454
)
55-
small.d-block.text-muted.mt-3!= '© Niftylettuce, LLC.'
55+
small.d-block.text-muted.mt-3!= "© Niftylettuce, LLC."
5656
.flex-wrap.flex-fill
5757
h1.h5.mb-2= t("Resources")
5858
ul.list-unstyled.mb-0

app/views/_nav.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ nav.navbar.navbar-expand-lg.navbar-dark.bg-dark.fixed-top.border-light.border-bo
212212
if ctx.pathWithoutLocale === '/'
213213
h1.h6.py-3.px-3.mb-0.text-center.alert.alert-success.border-top-0.border-left-0.border-right-0.rounded-0
214214
if !isBot(ctx.get('User-Agent'))
215-
= emoji('trophy')
216-
= ' '
215+
= emoji("trophy")
216+
= " "
217217
.d-none.d-md-inline
218218
!= t("#1 Ranked Forwarding Service – Since 2017")
219219
small.d-md-none

app/views/_pagination.pug

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ mixin paginate(tableSelector)
99
data-table=tableSelector,
1010
data-page=1,
1111
aria-label=t("First Page"),
12-
data-toggle='tooltip',
13-
data-placement='bottom',
14-
title=t("First Page"),
12+
data-toggle="tooltip",
13+
data-placement="bottom",
14+
title=t("First Page")
1515
)
1616
span(aria-hidden="true")
1717
i.fa.fa-step-backward
@@ -43,18 +43,26 @@ mixin paginate(tableSelector)
4343
data-table=tableSelector,
4444
data-page=pageCount,
4545
aria-label=t("Last Page"),
46-
data-toggle='tooltip',
47-
data-placement='bottom',
46+
data-toggle="tooltip",
47+
data-placement="bottom",
4848
title=t("Last Page")
4949
)
5050
span(aria-hidden="true")
5151
i.fa.fa-step-forward
5252
span.sr-only= t("Last Page")
5353
.dropdown.text-center
54-
button#pagination-menu-link.btn.btn-outline-secondary.btn-sm.dropdown-toggle(type='button', data-toggle='dropdown', aria-haspopup='true', aria-expanded='false')
55-
strong= t('Results per page:')
56-
= ' '
54+
button#pagination-menu-link.btn.btn-outline-secondary.btn-sm.dropdown-toggle(
55+
type="button",
56+
data-toggle="dropdown",
57+
aria-haspopup="true",
58+
aria-expanded="false"
59+
)
60+
strong= t("Results per page:")
61+
= " "
5762
= t(ctx.query.limit.toString())
58-
.dropdown-menu(aria-labelledby='pagination-menu-link')
63+
.dropdown-menu(aria-labelledby="pagination-menu-link")
5964
each limit in [10, 25, 50]
60-
a.dropdown-item(class=ctx.query.limit === limit ? 'active' : '', href=paginate.href({ page: 1, limit }))= t(limit.toString())
65+
a.dropdown-item(
66+
class=ctx.query.limit === limit ? "active" : "",
67+
href=paginate.href({ page: 1, limit })
68+
)= t(limit.toString())

app/views/home.pug

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,20 @@ block body
6969
!= t("Unlimited Email Forwarding")
7070
p.lead.mb-3.d-block
7171
!= t("We're <span class='font-weight-bold'>the only</span> service that <mark>respects your privacy</mark> and <mark>never stores</mark> your emails.")
72-
form.ajax-form.d-md-flex.align-items-md-center.justify-content-md-center(action=ctx.path, method='POST')
72+
form.ajax-form.d-md-flex.align-items-md-center.justify-content-md-center(
73+
action=ctx.path,
74+
method="POST"
75+
)
7376
input(type="hidden", name="_csrf", value=ctx.csrf)
74-
input(type='hidden', name='enhanced_protection', value='true')
75-
input(type='hidden', name="create_domain", value='true')
76-
input(type='hidden', name="create_account", value='true')
77+
input(type="hidden", name="enhanced_protection", value="true")
78+
input(type="hidden", name="create_domain", value="true")
79+
input(type="hidden", name="create_account", value="true")
7780
.form-group.floating-label.mb-md-0
7881
input.form-control.form-control-lg(
79-
type='text',
80-
name='domain',
82+
type="text",
83+
name="domain",
8184
required,
82-
placeholder='your-domain.com'
85+
placeholder="your-domain.com"
8386
)
8487
label(for="input-onboard-domain")= t("Enter your domain")
8588
i.fa.fa-forward.d-none.d-md-inline.mx-2
@@ -97,9 +100,9 @@ block body
97100
= t("Get Started")
98101
button.btn.btn-success.btn-lg.btn-block.d-md-none(type="submit")
99102
= t("Get Started")
100-
= ' '
103+
= " "
101104
i.fa.fa-angle-double-right
102-
small.d-block.mt-3.text-muted.font-weight-bold!= t('Forward anything @your-domain.com to your email &ndash; and create individual aliases too!')
105+
small.d-block.mt-3.text-muted.font-weight-bold!= t("Forward anything @your-domain.com to your email &ndash; and create individual aliases too!")
103106
a.text-decoration-none.mt-5.d-block.d-md-none.text-monospace.text-uppercase.text-dark(
104107
href="#learn-more"
105108
)
@@ -183,7 +186,7 @@ block body
183186
width=50,
184187
height=50,
185188
src=manifest("img/testimonials/dhh.jpg"),
186-
alt='dhh'
189+
alt="dhh"
187190
)
188191
.d-flex.flex-column.ml-2.font-weight-bold.text-dark
189192
div
@@ -193,7 +196,7 @@ block body
193196
src=manifest("img/testimonials/twitter-verified.svg"),
194197
width=20,
195198
height=20,
196-
alt='Verified'
199+
alt="Verified"
197200
)
198201
.small.text-muted @dhh
199202
.ml-auto
@@ -220,7 +223,7 @@ block body
220223
width=50,
221224
height=50,
222225
src=manifest("img/testimonials/abhinemani.jpg"),
223-
alt='abhinemani'
226+
alt="abhinemani"
224227
)
225228
.d-flex.flex-column.ml-2.font-weight-bold.text-dark
226229
div
@@ -230,7 +233,7 @@ block body
230233
src=manifest("img/testimonials/twitter-verified.svg"),
231234
width=20,
232235
height=20,
233-
alt='Verified'
236+
alt="Verified"
234237
)
235238
.small.text-muted @abhinemani
236239
.ml-auto
@@ -254,7 +257,7 @@ block body
254257
width=50,
255258
height=50,
256259
src=manifest("img/testimonials/andrewe.jpg"),
257-
alt='andrewe'
260+
alt="andrewe"
258261
)
259262
.d-flex.flex-column.ml-2.font-weight-bold.text-dark
260263
div
@@ -264,7 +267,7 @@ block body
264267
src=manifest("img/testimonials/twitter-verified.svg"),
265268
width=20,
266269
height=20,
267-
alt='Verified'
270+
alt="Verified"
268271
)
269272
.small.text-muted @andrewe
270273
.ml-auto
@@ -286,7 +289,7 @@ block body
286289
width=50,
287290
height=50,
288291
src=manifest("img/testimonials/stigi.jpg"),
289-
alt='stigi'
292+
alt="stigi"
290293
)
291294
.d-flex.flex-column.ml-2.font-weight-bold.text-dark
292295
div
@@ -313,7 +316,7 @@ block body
313316
width=50,
314317
height=50,
315318
src=manifest("img/testimonials/andregce.jpg"),
316-
alt='andregce'
319+
alt="andregce"
317320
)
318321
.d-flex.flex-column.ml-2.font-weight-bold.text-dark
319322
div
@@ -338,7 +341,7 @@ block body
338341
width=50,
339342
height=50,
340343
src=manifest("img/testimonials/philcockfield.jpg"),
341-
alt='philcockfield'
344+
alt="philcockfield"
342345
)
343346
.d-flex.flex-column.ml-2.font-weight-bold.text-dark
344347
div
@@ -483,7 +486,7 @@ block body
483486
= " "
484487
!= t('We\'re the <strong class="text-uppercase font-weight-bold border-bottom">only</strong> service that <strong class="font-weight-bold">never stores nor writes to disk</strong> any emails &ndash; it\'s all done in-memory.')
485488
= " "
486-
!= t('Made by an open-source and privacy advocate.')
489+
!= t("Made by an open-source and privacy advocate.")
487490
a.btn.btn-outline-light.btn-lg.mb-md-5(
488491
href="https://github.com/forwardemail",
489492
target="_blank",

emails/_footer.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ footer.py-3.mt-3
1414
li.px-1.d-inline: small: a.text-muted(href=`${config.urls.web}/about`)= t("About")
1515
li.px-1.d-inline: small: a.text-muted(href=`${config.urls.web}/privacy`)= t("Privacy")
1616
li.px-1.d-inline: small: a.text-muted(href=`${config.urls.web}/terms`)= t("Terms")
17-
p: small.text-muted!= '&copy; Niftylettuce, LLC.'
17+
p: small.text-muted!= "&copy; Niftylettuce, LLC."

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@
4646
"@ladjs/shared-config": "6.0.0",
4747
"@ladjs/web": "11.1.1",
4848
"@paypal/checkout-server-sdk": "1.0.3",
49-
"@primer/css": "19.5.1",
49+
"@primer/css": "19.6.0",
5050
"@sidoshi/random-string": "1.0.0",
5151
"@tkrotoff/bootstrap-floating-label": "0.8",
5252
"accounting": "0.4.1",
5353
"apexcharts": "3.33.2",
5454
"array-join-conjunction": "1.0.0",
55-
"aws-sdk": "2.1092.0",
55+
"aws-sdk": "2.1096.0",
5656
"axe": "8.1.2",
5757
"basic-auth": "2.0.1",
5858
"boolean": "3.2.0",
5959
"bootstrap": "4.6.0",
60-
"bree": "8.0.1",
60+
"bree": "8.0.2",
6161
"bson-objectid": "2.0.3",
6262
"cabin": "9.1.2",
6363
"capitalize": "2.0.4",
@@ -68,12 +68,12 @@
6868
"crypto-random-string": "3",
6969
"custom-fonts-in-emails": "4.0.2",
7070
"dashify": "2.0.0",
71-
"dayjs": "1.10.8",
71+
"dayjs": "1.11.0",
7272
"dayjs-with-plugins": "0.0.4",
7373
"dedent": "0.7.0",
7474
"delay": "5.0.0",
7575
"email-addresses": "5.0.0",
76-
"email-templates": "8.0.10",
76+
"email-templates": "9.0.0",
7777
"fast-safe-stringify": "2.1.1",
7878
"forward-email": "8.3.0",
7979
"gemoji": "6",
@@ -102,8 +102,8 @@
102102
"markdown-it-highlightjs": "3.6.0",
103103
"markdown-it-task-checkbox": "1.0.6",
104104
"memoizee": "0.4.15",
105-
"mongodb-memory-server": "8.4.0",
106-
"mongoose": "6.2.6",
105+
"mongodb-memory-server": "8.4.1",
106+
"mongoose": "6.2.7",
107107
"mongoose-common-plugin": "2.0.3",
108108
"mongoose-omit-common-fields": "0.0.6",
109109
"mongoose-unique-validator": "2.0.3",
@@ -119,7 +119,7 @@
119119
"passport-local-mongoose": "6.2.2",
120120
"paypal-rest-sdk": "1.8.1",
121121
"pify": "5.0.0",
122-
"pino": "7.8.1",
122+
"pino": "7.9.1",
123123
"pluralize": "8.0.0",
124124
"popper.js": "1.16.1",
125125
"prepare-stack-trace": "0.0.4",
@@ -135,7 +135,7 @@
135135
"speakingurl": "14.0.1",
136136
"split-lines": "2",
137137
"stacktrace-js": "2.0.2",
138-
"stripe": "8.209.0",
138+
"stripe": "8.210.0",
139139
"striptags": "3.2.0",
140140
"superagent": "7.1.1",
141141
"sweetalert2": "8",
@@ -149,21 +149,21 @@
149149
},
150150
"devDependencies": {
151151
"@babel/cli": "7.17.6",
152-
"@babel/core": "7.17.5",
152+
"@babel/core": "7.17.8",
153153
"@babel/polyfill": "7.12.1",
154154
"@babel/preset-env": "7.16.11",
155-
"@commitlint/cli": "16.2.1",
155+
"@commitlint/cli": "16.2.3",
156156
"@commitlint/config-conventional": "16.2.1",
157157
"@ladjs/browserslist-config": "0.0.1",
158158
"@ladjs/gulp-envify": "2.0.1",
159159
"@ladjs/pug-lint-config-lad": "0.1.1",
160-
"@prettier/plugin-pug": "1.19.2",
160+
"@prettier/plugin-pug": "1.19.3",
161161
"ava": "4.1.0",
162162
"babel-eslint": "10.1.0",
163163
"browserify": "17.0.0",
164164
"bundle-collapser": "1.4.0",
165165
"codecov": "3.8.3",
166-
"cssnano": "5.1.3",
166+
"cssnano": "5.1.4",
167167
"del": "6.0.0",
168168
"eslint": "8.11.0",
169169
"eslint-config-xo-lass": "1.0.6",
@@ -196,7 +196,7 @@
196196
"gulp-xo": "0.25.0",
197197
"husky": "7.0.4",
198198
"imagemin-pngquant": "9.0.2",
199-
"lint-staged": "12.3.5",
199+
"lint-staged": "12.3.7",
200200
"make-dir": "3.1.0",
201201
"ms": "2.1.3",
202202
"node-sass": "7.0.1",
@@ -206,21 +206,21 @@
206206
"nps-utils": "1.7.0",
207207
"nyc": "15.1.0",
208208
"parse-git-config": "3.0.0",
209-
"postcss": "8.4.8",
209+
"postcss": "8.4.12",
210210
"postcss-font-magician": "3.0.0",
211-
"postcss-preset-env": "7.4.2",
211+
"postcss-preset-env": "7.4.3",
212212
"postcss-reporter": "7.0.5",
213213
"postcss-scss": "4.0.3",
214-
"prettier": "2.5.1",
214+
"prettier": "2.6.0",
215215
"pug-lint": "2.6.0",
216216
"rc": "1.2.8",
217217
"remark-cli": "10.0.1",
218218
"remark-preset-github": "4.0.1",
219219
"sass": "1.49.9",
220220
"sinon": "13.0.1",
221-
"stylelint": "14.5.3",
222-
"stylelint-config-recommended-scss": "5.0.2",
223-
"stylelint-scss": "4.1.0",
221+
"stylelint": "14.6.0",
222+
"stylelint-config-recommended-scss": "6.0.0",
223+
"stylelint-scss": "4.2.0",
224224
"supertest": "6.2.2",
225225
"through2": "4.0.2",
226226
"xo": "0.48.0"

0 commit comments

Comments
 (0)