Skip to content

Commit 6c08e7d

Browse files
tomholubseisvelasTom J
authored
Issues #3509 #3374 deprecate subscribe (#3516)
* Remove 5mb limit from license Due to my lack of legal expertise, it may not be okay to just edit the license in this way. I'll include other changes related to the 5mb limit in this PR. * Update both free and pro versions to have 25mb limit * Remove 5mb limit notice (leave only 25mb notice) * remove unused imports * issue 3509 remove subscription ui * removed free trial * remove trial from tests * removed account tests * clean up api calls * clean up subscription and upgrade * removed active, method, expire Co-authored-by: Alex Vazquez <[email protected]> Co-authored-by: Tom J <[email protected]>
1 parent ba94f81 commit 6c08e7d

28 files changed

+47
-570
lines changed

LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Licensor: FlowCrypt a. s.
66
Software: FlowCrypt PGP browser extension. The Software is © 2016-present FlowCrypt a. s.
77

88
Use Limitation: This software is free to use with the following limitations:
9-
- Size of any sent email message including attachments cannot exceed 5MB.
109
- Password encrypted messages and attachments have to expire in 7 days.
1110
- Messages, attachments or files can only be transferred through used email provider or through services provided by Licensor. Never through 3rd party or custom services.
1211
- Plain-text portion of password encrypted messages must only include a link to a page on flowcrypt.com domain. Recipient cannot be directed to any other place or means of decrypting password encrypted messages.

extension/chrome/elements/compose-modules/compose-attachments-module.ts

+9-43
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
'use strict';
44

55
import { AttachmentLimits, AttachmentUI } from '../../../js/common/ui/attachment-ui.js';
6-
import { BrowserMsg } from '../../../js/common/browser/browser-msg.js';
7-
import { OrgRules } from '../../../js/common/org-rules.js';
86
import { Ui } from '../../../js/common/browser/ui.js';
97
import { ViewModule } from '../../../js/common/view-module.js';
108
import { ComposeView } from '../compose.js';
11-
import { AcctStore } from '../../../js/common/platform/store/acct-store.js';
129

1310
export class ComposeAttachmentsModule extends ViewModule<ComposeView> {
1411

@@ -30,46 +27,15 @@ export class ComposeAttachmentsModule extends ViewModule<ComposeView> {
3027
}
3128

3229
private getMaxAttachmentSizeAndOversizeNotice = async (): Promise<AttachmentLimits> => {
33-
const subscription = await AcctStore.getSubscription(this.view.acctEmail);
34-
if (!subscription.active && !OrgRules.isPublicEmailProviderDomain(this.view.senderModule.getSender())) {
35-
return {
36-
sizeMb: 5,
37-
size: 5 * 1024 * 1024,
38-
count: 10,
39-
oversize: async () => {
40-
let getAdvanced = 'The files are over 5 MB. Advanced users can send files up to 25 MB.';
41-
if (!subscription.method) {
42-
getAdvanced += '\n\nTry it free for 30 days.';
43-
} else if (subscription.method === 'trial') {
44-
getAdvanced += '\n\nYour trial has expired, please consider supporting our efforts by upgrading.';
45-
} else if (subscription.method === 'group') {
46-
getAdvanced += '\n\nGroup billing is due for renewal. Please check with your leadership.';
47-
} else if (subscription.method === 'stripe') {
48-
getAdvanced += '\n\nPlease renew your subscription to continue sending large files.';
49-
} else {
50-
getAdvanced += '\n\nClick ok to see subscribe options.';
51-
}
52-
if (subscription.method === 'group') {
53-
await Ui.modal.info(getAdvanced);
54-
} else {
55-
if (await Ui.modal.confirm(getAdvanced)) {
56-
BrowserMsg.send.subscribeDialog(this.view.parentTabId, {});
57-
}
58-
}
59-
return;
60-
},
61-
};
62-
} else {
63-
const sizeMb = 25;
64-
return {
65-
sizeMb,
66-
size: sizeMb * 1024 * 1024,
67-
count: 10,
68-
oversize: async (combinedSize: number) => {
69-
await Ui.modal.warning('Combined attachment size is limited to 25 MB. The last file brings it to ' + Math.ceil(combinedSize / (1024 * 1024)) + ' MB.');
70-
},
71-
};
72-
}
30+
const sizeMb = 25;
31+
return {
32+
sizeMb,
33+
size: sizeMb * 1024 * 1024,
34+
count: 10,
35+
oversize: async (combinedSize: number) => {
36+
await Ui.modal.warning('Combined attachment size is limited to 25 MB. The last file brings it to ' + Math.ceil(combinedSize / (1024 * 1024)) + ' MB.');
37+
},
38+
};
7339
}
7440

7541
}

extension/chrome/elements/subscribe.htm

-97
This file was deleted.

extension/chrome/elements/subscribe.ts

-172
This file was deleted.

extension/chrome/settings/inbox/inbox-modules/inbox-notification-module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class InboxNotificationModule extends ViewModule<InboxView> {
1616

1717
constructor(view: InboxView) {
1818
super(view);
19-
this.notifications = new Notifications(view.tabId);
19+
this.notifications = new Notifications();
2020
}
2121

2222
public render = () => {

extension/chrome/settings/inbox/inbox.ts

-5
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ export class InboxView extends View {
131131
}));
132132
}
133133
});
134-
BrowserMsg.addListener('subscribe_dialog', async ({ isAuthErr }: Bm.SubscribeDialog) => {
135-
if (!$('#cryptup_dialog').length) {
136-
$('body').append(this.factory.dialogSubscribe(isAuthErr)); // xss-safe-factory
137-
}
138-
});
139134
BrowserMsg.addListener('add_pubkey_dialog', async ({ emails }: Bm.AddPubkeyDialog) => {
140135
if (!$('#cryptup_dialog').length) {
141136
$('body').append(this.factory.dialogAddPubkey(emails)); // xss-safe-factory

extension/chrome/settings/index.htm

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<span class="subscription">
2828
<a class="level green_label short" href="https://flowcrypt.com/account">free forever</a>
2929
<span class="expire"></span>
30-
<button class="upgrade green_label short show_settings_page" page="/chrome/elements/subscribe.htm" addurltext="&placement=settings">upgrade</button>
3130
</span>
3231
</div>
3332

0 commit comments

Comments
 (0)