Skip to content

Commit

Permalink
Merge branch 'add-offer-communication' into 'main'
Browse files Browse the repository at this point in the history
Add new communication setting for offers and promos

See merge request web/clients!1205
  • Loading branch information
MargeBot committed Nov 22, 2021
2 parents 6aeeb20 + 3743fbc commit 703fd99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const EmailUnsubscribeContainer = () => {
[NEWS.BUSINESS]: c('Label for news').t`Proton for business`,
[NEWS.NEWSLETTER]: c('Label for news').t`Proton newsletter`,
[NEWS.BETA]: c('Label for news').t`Proton Beta`,
[NEWS.OFFERS]: c('Label for news').t`Proton offers and promotions`,
};

const categories = subscriptionBits.map((bit) => newsTypeToWording[bit]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { toggleBit, hasBit } from '@proton/shared/lib/helpers/bitset';

import { Toggle } from '../../components';

const { ANNOUNCEMENTS, FEATURES, NEWSLETTER, BETA, BUSINESS } = NEWS;
const { ANNOUNCEMENTS, FEATURES, NEWSLETTER, BETA, BUSINESS, OFFERS } = NEWS;

export interface EmailSubscriptionCheckboxesProps {
disabled: boolean;
Expand Down Expand Up @@ -48,6 +48,12 @@ const EmailSubscriptionCheckboxes = ({ disabled, News, onChange }: EmailSubscrip
text: c('Label for news').t`Proton beta announcements`,
frequency: c('Frequency of news').t`(1-2 emails per month)`,
},
{
id: 'offers',
flag: OFFERS,
text: c('Label for news').t`Proton offers and promotions`,
frequency: c('Frequency of news').t`(1 email per quarter)`,
},
];

return (
Expand Down
1 change: 1 addition & 0 deletions packages/shared/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ export enum NEWS {
NEWSLETTER = 4,
BETA = 8,
BUSINESS = 16,
OFFERS = 32,
}

export const CONTACT_EMAILS_LIMIT = 1000;
Expand Down

0 comments on commit 703fd99

Please sign in to comment.