Skip to content

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

mobile: update plan comparison

Ammar Ahmed32e1fb5f56a3
diff --git a/apps/mobile/app/components/premium/features-list.tsx b/apps/mobile/app/components/premium/features-list.tsx
index 93e008dee..46c82886d 100644
--- a/apps/mobile/app/components/premium/features-list.tsx
+++ b/apps/mobile/app/components/premium/features-list.tsx
@@ -20,41 +20,5 @@ export const FeaturesList = {
// Monthly: ["$0/mo", "$1.99/mo", "$5.99/mo", "$9.99/mo"],
// Yearly: ["$0/yr", "$14.99/yr", "$59.99/yr", "$109.99/yr"],
// "5 year": [null, null, "$249.99/5yr", "$449.99/5yr"],
- Plans: ["Free", "Essential", "Pro", "Believer"],
- Devices: [2, 5, "Unlimited", "Unlimited"],
- Storage: ["100MB/mo", "1GB/mo", "10GB/mo", "25GB/mo"],
- "File size": ["10MB", "100MB", "1GB", "5GB"],
- "File compression": [true, true, "Optional", "Optional"],
- "Check list": [true, true, true, true],
- "Bullet list": [true, true, true, true],
- Quote: [true, true, true, true],
- "Note link": [true, true, true, true],
- "Task list": [false, true, true, true],
- "Outline list": [false, true, true, true],
- Callouts: [false, true, true, true],
- Colors: [7, 20, "∞", "∞"],
- Tags: [50, 500, "∞", "∞"],
- Notebooks: [100, 1000, "∞", "∞"],
- "Active Reminders": [10, 50, "∞", "∞"],
- Shortcuts: [10, "∞", "∞", "∞"],
- "Note history": ["Local", "Local", "Synced", "Synced"],
- "Security key app lock": [false, false, true, true],
- "Pin note in notification": [false, false, true, true],
- "Create note from notification drawer": [false, false, true, true],
- "Default startup screen": [false, false, true, true],
- "Markdown shortcuts": [false, true, true, true],
- "Custom toolbar preset": [false, false, true, true],
- "Customizable navigation menu": [false, true, true, true],
- "Files in monograph": [
- "Images",
- "Images & files",
- "Images & files",
- "Images & files"
- ],
- "Note history retention": ["1 month", "∞", "∞", "∞"],
- "App lock": ["immediate", "immediate", "any", "any"],
- "Password on monograph": ["Default", "Custom", "Custom", "Custom"],
- "Voice memos": ["5 minute", "1 hour", "∞", true],
- "Notebook publishing": [1, 2, 5, true],
- Vaults: [1, 3, "∞", "∞"]
+ Plans: ["Free", "Essential", "Pro", "Believer"]
};
diff --git a/apps/mobile/app/components/premium/paywall.tsx b/apps/mobile/app/components/premium/paywall.tsx
index 42432e667..4d6149157 100644
--- a/apps/mobile/app/components/premium/paywall.tsx
+++ b/apps/mobile/app/components/premium/paywall.tsx
@@ -50,6 +50,7 @@ import { Button } from "../ui/button";
import Heading from "../ui/typography/heading";
import Paragraph from "../ui/typography/paragraph";
import { FeaturesList } from "./features-list";
+import { getFeaturesTable } from "@notesnook/common";
const Steps = {
select: 1,
@@ -60,23 +61,23 @@ const Steps = {
const PlanOverView = {
free: {
- storage: `100 MB`,
+ storage: `50 MB/mo`,
fileSize: `1 MB`,
hdImages: false
},
essential: {
storage: `1 GB`,
- fileSize: `25 MB`,
+ fileSize: `100 MB/mo`,
hdImages: false
},
pro: {
- storage: `10 GB`,
- fileSize: `25 MB`,
+ storage: `10 GB/mo`,
+ fileSize: `1 GB`,
hdImages: true
},
believer: {
- storage: `50 GB`,
- fileSize: `25 MB`,
+ storage: `25 GB/mo`,
+ fileSize: `5 GB`,
hdImages: true
}
};
@@ -653,10 +654,37 @@ const ComparePlans = React.memo(
flexDirection: "column"
}}
>
- {Object.keys(FeaturesList).map((key, keyIndex) => {
+ <View
+ style={{
+ flexDirection: "row",
+ alignItems: "center",
+ width: "100%",
+ gap: 10
+ }}
+ >
+ {["Features", "Free", "Essential", "Pro", "Believer"].map(
+ (plan, index) => (
+ <View
+ style={{
+ width: index === 0 ? 150 : 120,
+ paddingHorizontal: 16,
+ paddingVertical: 12,
+ backgroundColor:
+ index === 0 ? colors.secondary.background : undefined,
+ borderBottomWidth: index === 0 ? 1 : undefined,
+ borderBottomColor: colors.primary.border
+ }}
+ >
+ <Heading size={AppFontSize.sm}>{plan}</Heading>
+ </View>
+ )
+ )}
+ </View>
+
+ {getFeaturesTable().map((item, keyIndex) => {
return (
<View
- key={key}
+ key={keyIndex + "feature-item"}
style={{
flexDirection: "row",
alignItems: "center",
@@ -664,10 +692,7 @@ const ComparePlans = React.memo(
gap: 10
}}
>
- {[
- key === "Plans" ? "" : key,
- ...FeaturesList[key as keyof typeof FeaturesList]
- ].map((item, index) => (
+ {item.map((featureItem, index) => (
<View
style={{
width: index === 0 ? 150 : 120,
@@ -678,24 +703,39 @@ const ComparePlans = React.memo(
borderBottomWidth: index === 0 ? 1 : undefined,
borderBottomColor: colors.primary.border
}}
- key={item + key + index}
+ key={item[0] + index}
>
- {item === true ? (
- <Icon
- color={colors.primary.accent}
- size={AppFontSize.sm}
- name="check"
- />
- ) : item === false ? (
- <Icon
- size={AppFontSize.sm}
- color={colors.static.red}
- name="close"
- />
- ) : keyIndex === 0 ? (
- <Heading size={AppFontSize.sm}>{item}</Heading>
+ {typeof featureItem === "string" ? (
+ <Heading size={AppFontSize.sm}>
+ {featureItem as string}
+ </Heading>
) : (
- <Paragraph>{item}</Paragraph>
+ <>
+ {typeof featureItem.caption === "string" ||
+ typeof featureItem.caption === "number" ? (
+ <Paragraph>
+ {featureItem.caption === "infinity"
+ ? "∞"
+ : featureItem.caption}
+ </Paragraph>
+ ) : typeof featureItem.caption === "boolean" ? (
+ <>
+ {featureItem.caption === true ? (
+ <Icon
+ color={colors.primary.accent}
+ size={AppFontSize.sm}
+ name="check"
+ />
+ ) : (
+ <Icon
+ size={AppFontSize.sm}
+ color={colors.static.red}
+ name="close"
+ />
+ )}
+ </>
+ ) : null}
+ </>
)}
</View>
))}