A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: update sheet paywall
Ammar Ahmed203fe5bee024
diff --git a/apps/mobile/app/components/sheets/paywall/index.tsx b/apps/mobile/app/components/sheets/paywall/index.tsxindex f6fc00ae9..a0a35ced6 100644--- a/apps/mobile/app/components/sheets/paywall/index.tsx+++ b/apps/mobile/app/components/sheets/paywall/index.tsx@@ -22,6 +22,7 @@ import AppIcon from "../../ui/AppIcon";import { Button } from "../../ui/button";import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";+import { SubscriptionProvider } from "@notesnook/core";const isGithubRelease = Config.GITHUB_RELEASE === "true";const INDEX_TO_PLAN = {1: "essential",@@ -52,6 +53,11 @@ export default function PaywallSheet<Tid extends FeatureId>(props: {}}, []);+ const isSubscribedOnWeb =+ pricingPlans.user?.subscription.provider === SubscriptionProvider.PADDLE ||+ pricingPlans.user?.subscription.provider ===+ SubscriptionProvider.STREETWRITERS;+return !pricingPlans.currentPlan ? null : (<Viewstyle={{@@ -178,6 +184,12 @@ export default function PaywallSheet<Tid extends FeatureId>(props: {width: "100%"}}onPress={() => {+ if (isSubscribedOnWeb) {+ ToastManager.show({+ message: strings.changePlanOnWeb()+ });+ return;+ }eSendEvent(eCloseSheet);if (!useUserStore.getState().user) {Navigation.navigate("Auth", {@@ -199,18 +211,22 @@ export default function PaywallSheet<Tid extends FeatureId>(props: {/></View>- <Button- type="plain"- title={strings.exploreAllPlans()}- icon="arrow-right"- iconPosition="right"- onPress={() => {- eSendEvent(eCloseSheet);- Navigation.navigate("PayWall", {- context: useUserStore.getState().user ? "logged-in" : "logged-out"- });- }}- />+ {isSubscribedOnWeb ? null : (+ <Button+ type="plain"+ title={strings.exploreAllPlans()}+ icon="arrow-right"+ iconPosition="right"+ onPress={() => {+ eSendEvent(eCloseSheet);+ Navigation.navigate("PayWall", {+ context: useUserStore.getState().user+ ? "logged-in"+ : "logged-out"+ });+ }}+ />+ )}</></View>);diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.jsonindex df5e2737e..dafa96c7d 100644--- a/apps/mobile/package-lock.json+++ b/apps/mobile/package-lock.json@@ -1,12 +1,12 @@{"name": "@notesnook/mobile",- "version": "3.2.10",+ "version": "3.2.12","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@notesnook/mobile",- "version": "3.2.10",+ "version": "3.2.12","hasInstallScript": true,"license": "GPL-3.0-or-later","workspaces": [diff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.poindex 03a26dfdc..aa685d380 100644--- a/packages/intl/locale/en.po+++ b/packages/intl/locale/en.po@@ -7180,6 +7180,10 @@ msgstr "You can also link a note to multiple Notebooks. Tap and hold any noteboomsgid "You can change the theme at any time from Settings or the side menu."msgstr "You can change the theme at any time from Settings or the side menu."+#: src/strings.ts:2590+msgid "You can change your subscription plan from the web app"+msgstr "You can change your subscription plan from the web app"+#: src/strings.ts:2419msgid "You can create shortcuts of frequently accessed notebooks in the side menu"msgstr "You can create shortcuts of frequently accessed notebooks in the side menu"diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.poindex 7eadc28f7..2732dfabe 100644--- a/packages/intl/locale/pseudo-LOCALE.po+++ b/packages/intl/locale/pseudo-LOCALE.po@@ -7131,6 +7131,10 @@ msgstr ""msgid "You can change the theme at any time from Settings or the side menu."msgstr ""+#: src/strings.ts:2590+msgid "You can change your subscription plan from the web app"+msgstr ""+#: src/strings.ts:2419msgid "You can create shortcuts of frequently accessed notebooks in the side menu"msgstr ""diff --git a/packages/intl/src/strings.ts b/packages/intl/src/strings.tsindex b0de22511..c2e5f3e72 100644--- a/packages/intl/src/strings.ts+++ b/packages/intl/src/strings.ts@@ -2585,5 +2585,7 @@ Use this if changes from other devices are not appearing on this device. This wicontactSupportToChangePlan: () =>t`You have made a one time purchase. To change your plan please contact support.`,alreadySubscribed: () => t`You are already subscribed to this plan.`,- specialOffer: () => t`Special Offer`+ specialOffer: () => t`Special Offer`,+ changePlanOnWeb: () =>+ t`You can change your subscription plan from the web app`};