Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: show 50% off offer for trial users in settings

thecodrr0ddb79522275
diff --git a/apps/web/src/common/constants.js b/apps/web/src/common/constants.ts
similarity index 90%
rename from apps/web/src/common/constants.js
rename to apps/web/src/common/constants.ts
index 2e21146ed..987d0c8e1 100644
--- a/apps/web/src/common/constants.js
+++ b/apps/web/src/common/constants.ts
@@ -6,7 +6,7 @@ export const COLORS = [
"blue",
"purple",
"gray",
-];
+] as const;
export const SUBSCRIPTION_STATUS = {
BASIC: 0,
@@ -15,4 +15,4 @@ export const SUBSCRIPTION_STATUS = {
PREMIUM: 5,
PREMIUM_EXPIRED: 6,
PREMIUM_CANCELED: 7,
-};
+} as const;
diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.js
index 58cd4b4b0..7d1165b47 100644
--- a/apps/web/src/views/settings.js
+++ b/apps/web/src/views/settings.js
@@ -930,12 +930,15 @@ function AccountStatus(props) {
bg={user.isEmailConfirmed ? "primary" : "error"}
mt={1}
onClick={() => {
- if (user.isEmailConfirmed) showBuyDialog();
+ if (user.isEmailConfirmed)
+ showBuyDialog("monthly", isTrial ? "TRIAL2PRO" : undefined);
else showEmailVerificationDialog();
}}
>
{isProCancelled
? "Resubscribe to Notesnook Pro"
+ : isTrial
+ ? "Upgrade at 50% OFF (first month)"
: user.isEmailConfirmed
? "Upgrade to Notesnook Pro"
: "Confirm your email to sync your notes."}