diff --git a/packages/web/src/javascripts/Application/Application.ts b/packages/web/src/javascripts/Application/Application.ts
index a7b8d31ff..6335c5af5 100644
--- a/packages/web/src/javascripts/Application/Application.ts
+++ b/packages/web/src/javascripts/Application/Application.ts
@@ -356,7 +356,7 @@ export class WebApplication extends SNApplication implements WebApplicationInter
return this.getViewControllerManager().featuresController.entitledToFiles
}
- showPremiumModal(featureName: FeatureName): void {
+ showPremiumModal(featureName?: FeatureName): void {
void this.getViewControllerManager().featuresController.showPremiumAlert(featureName)
}
diff --git a/packages/web/src/javascripts/Components/Footer/UpgradeNow.tsx b/packages/web/src/javascripts/Components/Footer/UpgradeNow.tsx
index 2b6eb1803..e9a0a0154 100644
--- a/packages/web/src/javascripts/Components/Footer/UpgradeNow.tsx
+++ b/packages/web/src/javascripts/Components/Footer/UpgradeNow.tsx
@@ -13,11 +13,19 @@ const UpgradeNow = ({ application, featuresController, subscriptionContoller }:
const shouldShowCTA = !featuresController.hasFolders
const hasAccount = subscriptionContoller.hasAccount
+ const onClick = () => {
+ if (application.isNativeIOS()) {
+ application.showPremiumModal()
+ } else {
+ application.openPurchaseFlow()
+ }
+ }
+
return shouldShowCTA ? (
application.openPurchaseFlow()}
+ onClick={onClick}
>
{hasAccount ? 'Unlock features' : 'Sign up to sync'}
diff --git a/packages/web/src/javascripts/Components/NoSubscriptionBanner/NoSubscriptionBanner.tsx b/packages/web/src/javascripts/Components/NoSubscriptionBanner/NoSubscriptionBanner.tsx
index cb1e0a0f2..4aac02512 100644
--- a/packages/web/src/javascripts/Components/NoSubscriptionBanner/NoSubscriptionBanner.tsx
+++ b/packages/web/src/javascripts/Components/NoSubscriptionBanner/NoSubscriptionBanner.tsx
@@ -14,22 +14,27 @@ const NoSubscriptionBanner = ({
title: string
message: string
className?: string
-}) => (
-
-
-
-
{title}
+}) => {
+ const onClick = () => {
+ if (application.isNativeIOS()) {
+ application.showPremiumModal()
+ } else {
+ application.openPurchaseFlow()
+ }
+ }
+
+ return (
+
+
+
+
{title}
+
+
{message}
+
+ Upgrade Features
+
-
{message}
-
application.openPurchaseFlow()}
- >
- Upgrade Features
-
-
-)
+ )
+}
export default NoSubscriptionBanner
diff --git a/packages/web/src/javascripts/Components/Preferences/Panes/Account/Subscription/NoSubscription.tsx b/packages/web/src/javascripts/Components/Preferences/Panes/Account/Subscription/NoSubscription.tsx
index b137d1c74..464588b93 100644
--- a/packages/web/src/javascripts/Components/Preferences/Panes/Account/Subscription/NoSubscription.tsx
+++ b/packages/web/src/javascripts/Components/Preferences/Panes/Account/Subscription/NoSubscription.tsx
@@ -15,7 +15,11 @@ const NoSubscription: FunctionComponent
= ({ application }) => {
const errorMessage = 'There was an error when attempting to redirect you to the subscription page.'
setIsLoadingPurchaseFlow(true)
try {
- application.openPurchaseFlow()
+ if (application.isNativeIOS()) {
+ application.showPremiumModal()
+ } else {
+ application.openPurchaseFlow()
+ }
} catch (e) {
setPurchaseFlowError(errorMessage)
} finally {
diff --git a/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/NoProSubscription.tsx b/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/NoProSubscription.tsx
index c21b0c65e..16ccbbe2b 100644
--- a/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/NoProSubscription.tsx
+++ b/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/NoProSubscription.tsx
@@ -15,7 +15,11 @@ const NoProSubscription: FunctionComponent = ({ application }) => {
const errorMessage = 'There was an error when attempting to redirect you to the subscription page.'
setIsLoadingPurchaseFlow(true)
try {
- application.openPurchaseFlow()
+ if (application.isNativeIOS()) {
+ application.showPremiumModal()
+ } else {
+ application.openPurchaseFlow()
+ }
} catch (e) {
setPurchaseFlowError(errorMessage)
} finally {
diff --git a/packages/web/src/javascripts/Components/Preferences/Panes/HelpFeedback.tsx b/packages/web/src/javascripts/Components/Preferences/Panes/HelpFeedback.tsx
index a28cb82d8..cc1f0d83c 100644
--- a/packages/web/src/javascripts/Components/Preferences/Panes/HelpFeedback.tsx
+++ b/packages/web/src/javascripts/Components/Preferences/Panes/HelpFeedback.tsx
@@ -42,12 +42,20 @@ const HelpAndFeedback = ({ application }: { application: WebApplication }) => {
{application.isNativeIOS() && (
-
+ <>
+
+
+ >
)}
diff --git a/packages/web/src/javascripts/Components/PremiumFeaturesModal/PremiumFeaturesModal.tsx b/packages/web/src/javascripts/Components/PremiumFeaturesModal/PremiumFeaturesModal.tsx
index ba53b11f4..a0db50e13 100644
--- a/packages/web/src/javascripts/Components/PremiumFeaturesModal/PremiumFeaturesModal.tsx
+++ b/packages/web/src/javascripts/Components/PremiumFeaturesModal/PremiumFeaturesModal.tsx
@@ -8,7 +8,7 @@ import { UpgradePrompt } from './Subviews/UpgradePrompt'
type Props = {
application: WebApplication
- featureName: FeatureName | string
+ featureName?: FeatureName | string
hasSubscription: boolean
hasAccount: boolean
onClose: () => void
diff --git a/packages/web/src/javascripts/Components/PremiumFeaturesModal/Subviews/UpgradePrompt.tsx b/packages/web/src/javascripts/Components/PremiumFeaturesModal/Subviews/UpgradePrompt.tsx
index 8c4778016..28c20b605 100644
--- a/packages/web/src/javascripts/Components/PremiumFeaturesModal/Subviews/UpgradePrompt.tsx
+++ b/packages/web/src/javascripts/Components/PremiumFeaturesModal/Subviews/UpgradePrompt.tsx
@@ -13,7 +13,7 @@ export const UpgradePrompt = ({
hasAccount,
onClose,
}: {
- featureName: string
+ featureName?: string
ctaRef: React.RefObject
application: WebApplication
hasSubscription: boolean
@@ -52,8 +52,17 @@ export const UpgradePrompt = ({
Enable Advanced Features
- To take advantage of {featureName} and other advanced features, upgrade
- your current plan.
+ {featureName && (
+
+ To take advantage of {featureName} and other advanced features,
+ upgrade your current plan.
+
+ )}
+ {!featureName && (
+
+ To take advantage of all the advanced features Standard Notes has to offer, upgrade your current plan.
+
+ )}
{application.isNativeIOS() && (
The Professional Plan costs $99.99/year and includes benefits like
diff --git a/packages/web/src/javascripts/Controllers/FeaturesController.ts b/packages/web/src/javascripts/Controllers/FeaturesController.ts
index 24f84460b..bc2d40de7 100644
--- a/packages/web/src/javascripts/Controllers/FeaturesController.ts
+++ b/packages/web/src/javascripts/Controllers/FeaturesController.ts
@@ -82,7 +82,7 @@ export class FeaturesController extends AbstractViewController {
}
}
- public async showPremiumAlert(featureName: FeatureName | string): Promise
{
+ public async showPremiumAlert(featureName?: FeatureName | string): Promise {
this.premiumAlertFeatureName = featureName
this.premiumAlertType = PremiumFeatureModalType.UpgradePrompt