Skip to content

Commit

Permalink
fix: comment out beta feature until rollout
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Nov 7, 2023
1 parent 9097b1b commit 4bbe977
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
8 changes: 8 additions & 0 deletions app/models/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ Aliases.pre('validate', function (next) {
if (isSANB(this.description)) this.description = striptags(this.description);
if (!isSANB(this.description)) this.description = undefined;

// early feature not available yet
if (this.has_imap)
return next(
new Error(
'IMAP storage is in final testing and will be released this week'
)
);

// alias must have at least one recipient
if (
!this.has_imap &&
Expand Down
39 changes: 20 additions & 19 deletions app/views/my-account/domains/aliases/_form.pug
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,26 @@ if alias
i.fa.fa-plus
= " "
= t("Add new domain")
if !domain || !domain.is_global
.form-group
= t("IMAP Storage")
= " "
span.text-muted= t("(optional)")
.alert.alert-success
.form-check.text-left.small
input#input-has-imap.form-check-input(
type="checkbox",
name="has_imap",
checked=alias ? alias.has_imap : true,
value="true"
)
label.form-check-label(for="input-has-imap")
= t("This will enable our new IMAP storage feature for this alias.")
= " "
= t("You can have both IMAP storage and forwarding recipients enabled at the same time.")
= " "
!= t('If you would like to learn more about our new IMAP storage feature, please <a class="alert-link" href="%s" target="_blank">click here to read our deep dive on Encrypted Email.</a>', l("/encrypted-email"))
//- early feature not available yet
//- if !domain || !domain.is_global
//- .form-group
//- = t("IMAP Storage")
//- = " "
//- span.text-muted= t("(optional)")
//- .alert.alert-success
//- .form-check.text-left.small
//- input#input-has-imap.form-check-input(
//- type="checkbox",
//- name="has_imap",
//- checked=alias ? alias.has_imap : true,
//- value="true"
//- )
//- label.form-check-label(for="input-has-imap")
//- = t("This will enable our new IMAP storage feature for this alias.")
//- = " "
//- = t("You can have both IMAP storage and forwarding recipients enabled at the same time.")
//- = " "
//- != t('If you would like to learn more about our new IMAP storage feature, please <a class="alert-link" href="%s" target="_blank">click here to read our deep dive on Encrypted Email.</a>', l("/encrypted-email"))
.form-group
label(for="textarea-alias-recipients")
= t("Forwarding Recipients")
Expand Down
8 changes: 4 additions & 4 deletions app/views/my-account/domains/aliases/_table.pug
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ include ../../../_pagination
= " "
= t("Generate Password")
li.list-inline-item
button.btn.btn-sm.btn-link.text-dark.btn-block(
button.btn.btn-sm.btn-link.text-themed.btn-block(
type="button",
data-toggle="modal",
data-target="#modal-setup-instructions"
Expand All @@ -299,7 +299,7 @@ include ../../../_pagination
= t("Setup Instructions")
if Array.isArray(alias.tokens) && alias.tokens.length > 0
li.list-inline-item
button.btn.btn-sm.btn-link.text-dark.btn-block(
button.btn.btn-sm.btn-link.text-themed.btn-block(
type="button",
data-toggle="modal",
data-target=`#modal-download-backup-${alias.id}`
Expand Down Expand Up @@ -437,7 +437,7 @@ include ../../../_pagination
= " "
= t("Generate Password")
li.list-inline-item
button.btn.btn-sm.btn-link.text-dark.btn-block(
button.btn.btn-sm.btn-link.text-themed.btn-block(
type="button",
data-toggle="modal",
data-target="#modal-setup-instructions"
Expand All @@ -447,7 +447,7 @@ include ../../../_pagination
= t("Setup Instructions")
if Array.isArray(alias.tokens) && alias.tokens.length > 0
li.list-inline-item
button.btn.btn-sm.btn-link.text-dark.btn-block(
button.btn.btn-sm.btn-link.text-themed.btn-block(
type="button",
data-toggle="modal",
data-target=`#modal-download-backup-${alias.id}`
Expand Down

0 comments on commit 4bbe977

Please sign in to comment.