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: fix ui on ipad and tablets
Ammar Ahmedab34073870dd
diff --git a/apps/mobile/app/components/auth/login.js b/apps/mobile/app/components/auth/login.jsindex 483131330..b3367cf30 100644--- a/apps/mobile/app/components/auth/login.js+++ b/apps/mobile/app/components/auth/login.js@@ -144,7 +144,7 @@ export const Login = ({ changeMode }) => {borderColor: isTablet ? colors.primary.border : null,borderRadius: isTablet ? 20 : null,marginTop: isTablet ? 50 : null,- width: !isTablet ? null : "70%",+ width: !isTablet ? null : "50%",minHeight: height * 0.4}}>@@ -195,7 +195,7 @@ export const Login = ({ changeMode }) => {: "99.9%",backgroundColor: colors.primary.background,alignSelf: "center",- paddingHorizontal: DefaultAppStyles.GAP,+ paddingHorizontal: DDS.isTab ? 0 : DefaultAppStyles.GAP,gap: DefaultAppStyles.GAP_VERTICAL}}>diff --git a/apps/mobile/app/components/auth/signup.js b/apps/mobile/app/components/auth/signup.jsindex 3271ba12a..aef4c603f 100644--- a/apps/mobile/app/components/auth/signup.js+++ b/apps/mobile/app/components/auth/signup.js@@ -195,9 +195,10 @@ export const Signup = ({ changeMode, welcome }) => {<Viewstyle={{width: DDS.isTab ? "50%" : "100%",- paddingHorizontal: 16,+ paddingHorizontal: DDS.isTab ? 0 : 16,backgroundColor: colors.primary.background,- flexGrow: 1+ flexGrow: 1,+ alignSelf: "center"}}><Inputdiff --git a/apps/mobile/app/components/intro/index.tsx b/apps/mobile/app/components/intro/index.tsxindex 3dc74809a..a109aff3d 100644--- a/apps/mobile/app/components/intro/index.tsx+++ b/apps/mobile/app/components/intro/index.tsx@@ -171,12 +171,13 @@ const Intro = () => {</View><Viewstyle={{- width: "100%",+ width: isTablet ? "50%" : "100%",justifyContent: "center",gap: DefaultAppStyles.GAP_VERTICAL,- paddingHorizontal: DefaultAppStyles.GAP,+ paddingHorizontal: isTablet ? 0 : DefaultAppStyles.GAP,paddingVertical: DefaultAppStyles.GAP_VERTICAL,- flexShrink: 1+ flexShrink: 1,+ alignSelf: "center"}}><Buttondiff --git a/apps/mobile/app/components/paywall/index.tsx b/apps/mobile/app/components/paywall/index.tsxindex 052ddea58..ed14a4631 100644--- a/apps/mobile/app/components/paywall/index.tsx+++ b/apps/mobile/app/components/paywall/index.tsx@@ -37,6 +37,7 @@ import {ScrollView,Text,TouchableOpacity,+ useWindowDimensions,View} from "react-native";import Config from "react-native-config";@@ -105,6 +106,8 @@ const PlanOverView = {const PayWall = (props: NavigationProps<"PayWall">) => {const isGithubRelease = Config.GITHUB_RELEASE === "true";const routeParams = props.route.params;+ const { width, height } = useWindowDimensions();+ const isTablet = width > 600;const [webUrl, setWebUrl] = useState("https://notesnook.com");const { colors } = useThemeColors();const pricingPlans = usePricingPlans({@@ -306,256 +309,280 @@ const PayWall = (props: NavigationProps<"PayWall">) => {</Paragraph></TouchableOpacity>- {pricingPlans.pricingPlans.map((plan) =>- plan.id !== "free" ? (- <PricingPlanCard- key={plan.id}- plan={plan}- setStep={(step) => {- if (!pricingPlans.user) {- Navigation.navigate("Auth", {- mode: AuthMode.login,- state: {- planId: pricingPlans.currentPlan?.id,- productId:- (- pricingPlans.selectedProduct as RNIap.Subscription- )?.productId ||- (pricingPlans.selectedProduct as Plan).period,- billingType: annualBilling ? "annual" : "monthly"- }- });- return;- }- setStep(step);- }}- pricingPlans={pricingPlans}- annualBilling={annualBilling}- />- ) : null- )}+ <View+ style={{+ flexDirection: isTablet ? "row" : "column",+ gap: isTablet ? DefaultAppStyles.GAP : 0+ }}+ >+ {pricingPlans.pricingPlans.map((plan) =>+ plan.id !== "free" ? (+ <PricingPlanCard+ key={plan.id}+ plan={plan}+ setStep={(step) => {+ if (!pricingPlans.user) {+ Navigation.navigate("Auth", {+ mode: AuthMode.login,+ state: {+ planId: pricingPlans.currentPlan?.id,+ productId:+ (+ pricingPlans.selectedProduct as RNIap.Subscription+ )?.productId ||+ (pricingPlans.selectedProduct as Plan).period,+ billingType: annualBilling ? "annual" : "monthly"+ }+ });+ return;+ }+ setStep(step);+ }}+ pricingPlans={pricingPlans}+ annualBilling={annualBilling}+ />+ ) : null+ )}+ </View></View><Viewstyle={{- flexDirection: "row",- maxWidth: "100%",- justifyContent: "space-between",- flexWrap: "wrap",- alignItems: "center",- flexShrink: 1+ width: "100%"}}>- <TouchableOpacity- onPress={() => {- openLinkInBrowser(- "https://github.com/streetwriters/notesnook"- );- }}- activeOpacity={0.9}+ <Viewstyle={{- padding: 16,- gap: 12,+ flexDirection: "row",+ width: "100%",+ justifyContent: "space-between",+ flexWrap: "wrap",alignItems: "center",- flexGrow: 1+ flexShrink: 1}}>- <View+ <TouchableOpacity+ onPress={() => {+ openLinkInBrowser(+ "https://github.com/streetwriters/notesnook"+ );+ }}+ activeOpacity={0.9}style={{- justifyContent: "center",+ padding: 16,+ gap: 12,alignItems: "center",- width: 50,- height: 50,- backgroundColor: "black",- borderRadius: 10+ flexGrow: 1}}>- <Icon- size={40}- name="open-source-initiative"- color={colors.static.white}- />- </View>- <Paragraph+ <View+ style={{+ justifyContent: "center",+ alignItems: "center",+ width: 50,+ height: 50,+ backgroundColor: "black",+ borderRadius: 10+ }}+ >+ <Icon+ size={40}+ name="open-source-initiative"+ color={colors.static.white}+ />+ </View>+ <Paragraph+ style={{+ flexShrink: 1+ }}+ size={AppFontSize.md}+ >+ Open Source+ </Paragraph>+ </TouchableOpacity>++ <TouchableOpacity+ onPress={() => {+ openLinkInBrowser(+ "https://github.com/streetwriters/notesnook/stargazers"+ );+ }}+ activeOpacity={0.9}style={{- flexShrink: 1+ padding: 16,+ gap: 12,+ alignItems: "center",+ justifyContent: "center",+ flexGrow: 1}}- size={AppFontSize.md}>- Open Source- </Paragraph>- </TouchableOpacity>+ <View+ style={{+ justifyContent: "center",+ alignItems: "center",+ width: 50,+ height: 50,+ backgroundColor: "black",+ borderRadius: 10+ }}+ >+ <Icon size={40} name="github" color={colors.static.white} />+ </View>+ <Paragraph+ style={{+ flexShrink: 1+ }}+ size={AppFontSize.md}+ >+ 12.5K stars+ </Paragraph>+ </TouchableOpacity>- <TouchableOpacity- onPress={() => {- openLinkInBrowser(- "https://github.com/streetwriters/notesnook/stargazers"- );- }}- activeOpacity={0.9}- style={{- padding: 16,- gap: 12,- alignItems: "center",- justifyContent: "center",- flexGrow: 1- }}- >- <View+ <TouchableOpacity+ onPress={() => {+ openLinkInBrowser(+ "https://www.privacyguides.org/en/notebooks/#notesnook"+ );+ }}+ activeOpacity={0.9}style={{justifyContent: "center",+ padding: 16,+ gap: 12,alignItems: "center",- width: 50,- height: 50,- backgroundColor: "black",- borderRadius: 10- }}- >- <Icon size={40} name="github" color={colors.static.white} />- </View>- <Paragraph- style={{- flexShrink: 1+ flexGrow: 1}}- size={AppFontSize.md}>- 12.5K stars- </Paragraph>- </TouchableOpacity>+ <SvgView width={60} height={60} src={PRIVACY_GUIDES_SVG} />+ <Paragraph+ style={{+ flexShrink: 1,+ maxWidth: 300,+ textAlign: "center"+ }}+ size={AppFontSize.md}+ >+ {strings.recommendedByPrivacyGuides()}+ </Paragraph>+ </TouchableOpacity>+ </View>- <TouchableOpacity- onPress={() => {- openLinkInBrowser(- "https://www.privacyguides.org/en/notebooks/#notesnook"- );+ <Heading+ style={{+ marginBottom: 20,+ alignSelf: "center"}}- activeOpacity={0.9}+ >+ {strings.featuredOn()}+ </Heading>++ <Viewstyle={{- justifyContent: "center",- padding: 16,- gap: 12,+ width: "100%",+ paddingHorizontal: 16,alignItems: "center",- flexGrow: 1+ paddingBottom: 16,+ flexDirection: "row",+ gap: 20,+ flexWrap: "wrap",+ justifyContent: "center"}}>- <SvgView width={60} height={60} src={PRIVACY_GUIDES_SVG} />- <Paragraph+ <Image+ source={{+ uri: NESS_LABS_PNG+ }}style={{- flexShrink: 1,- maxWidth: 300,- textAlign: "center"+ width: 100,+ height: 80}}- size={AppFontSize.md}- >- {strings.recommendedByPrivacyGuides()}- </Paragraph>- </TouchableOpacity>- </View>+ />- <Heading- style={{- marginBottom: 20,- alignSelf: "center"- }}- >- {strings.featuredOn()}- </Heading>+ <Image+ source={{+ uri: ITS_FOSS_NEWS_PNG+ }}+ resizeMode="contain"+ style={{+ width: 150,+ height: 100+ }}+ />- <View- style={{- width: "100%",- paddingHorizontal: 16,- alignItems: "center",- paddingBottom: 16,- flexDirection: "row",- gap: 20,- flexWrap: "wrap",- justifyContent: "center"- }}- >- <Image- source={{- uri: NESS_LABS_PNG- }}- style={{- width: 100,- height: 80- }}- />+ <Image+ source={{+ uri: APPLE_INSIDER_PNG+ }}+ resizeMode="contain"+ style={{+ width: 368 * 0.5,+ height: 100+ }}+ />- <Image- source={{- uri: ITS_FOSS_NEWS_PNG- }}- resizeMode="contain"- style={{- width: 150,- height: 100- }}- />+ <View+ style={{+ height: 100,+ justifyContent: "center"+ }}+ >+ <SvgView width={80} height={80} src={TECHLORE_SVG} />+ </View>- <Image- source={{- uri: APPLE_INSIDER_PNG- }}- resizeMode="contain"- style={{- width: 368 * 0.5,- height: 100- }}- />+ <View+ style={{+ height: 100,+ justifyContent: "center"+ }}+ >+ <SvgView width={100} height={100} src={XDA_SVG} />+ </View>- <View- style={{- height: 100,- justifyContent: "center"- }}- >- <SvgView width={80} height={80} src={TECHLORE_SVG} />+ <View+ style={{+ height: 100,+ justifyContent: "center"+ }}+ >+ <SvgView width={100} height={100} src={ANDROID_POLICE_SVG} />+ </View></View><Viewstyle={{- height: 100,- justifyContent: "center"+ padding: 16,+ alignSelf: "center",+ width: isTablet ? 500 : undefined}}>- <SvgView width={100} height={100} src={XDA_SVG} />- </View>+ <ReviewItem+ user="Tagby on Discord"+ link="https://discord.com/channels/796015620436787241/828701074465619990/1070172521846026271"+ userImage="data:image/webp;base64,UklGRrAFAABXRUJQVlA4WAoAAAAQAAAATwAATwAAQUxQSAoAAAABB9D+iAhERP8DVlA4IIAFAAAQGACdASpQA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+VA/RMfJtKC/AjVXRu/nH0tmGg2/Wkra7C/OWK9E2NqBVVjJvrgqvNN0V8gYZdScIl0jQSLRzA4emm2HfC+L8c4FCxheZFDMP+zGUH5JyXLkBX/hGWE+CWhcPjSJ8hAj8yBeXCyWpM07eiFPxxkqYF+Wka211fUU/HygHPX+Qj+CyoMjz9gstrjNPTX0zc3r55VrpiFUjxfgOoY32Eojwr9mWg/dcleov8wSmKuJZtzjxiXFzemVIP5kzrDIffxS6PR30mOq+d9k/ZgJfzhyuPr6W8kOmQXmLnMwbpcr1KSSgjOLmu6oBtjexL/ukI77ygGzDtdDfRPpj7klVHu34xcWAufMWOMlo70oenOeQGueYXGWPZW175I30dvCT/Ra2R+0MbxvxmdpmmoQmzC4d7l/MI2MhUHUW5N79x0vXB1PEGs+F3o+6dO+N1qqqXxJP/0N5BvADUF55dX2vpBSAXyN30UPO9IBqC0JkFPwXiOncsUir6r50C47HnS2WadAlu2QpHFL8YrTsSdhP19HAc6zWDM2/RaJZxFFQj/tqw0rYVYX//7iKKSiXWWQma12fG+HhJD2tBjEcp8+vU2nzjmd4tR6AurIEns1SsWg2cFcvrZzyzKFB0gdnvVpoCwouvl8UuSAyYc+rHMVGhWln+a+bhRgIERIb5XlrazMxJOqksed7mUs5ArKpOEuHWPYu+U+E2T1OkeusgAKL57F73Fm2xbIunW/IbW2wawYHv8u1AWGGSAB8XYJOW1XxpqIgq+V34pqd3WRpBGd1G4rGAA"+ review={`I just want to say thank you so much.- <View- style={{- height: 100,- justifyContent: "center"- }}- >- <SvgView width={100} height={100} src={ANDROID_POLICE_SVG} />+After trying all the privacy security oriented note taking apps, for the price and the features afforded to your users, Notesnook is hands down the best.`}+ /></View></View>-<Viewstyle={{- padding: 16+ alignItems: "center",+ paddingVertical: 16}}>- <ReviewItem- user="Tagby on Discord"- link="https://discord.com/channels/796015620436787241/828701074465619990/1070172521846026271"- userImage="data:image/webp;base64,UklGRrAFAABXRUJQVlA4WAoAAAAQAAAATwAATwAAQUxQ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YvujEmGRbRlO3hwfL0JvoORLh8rOJ0prBA2Tnra+VA/RMfJtKC/AjVXRu/nH0tmGg2/Wkra7C/OWK9E2NqBVVjJvrgqvNN0V8gYZdScIl0jQSLRzA4emm2HfC+L8c4FCxheZFDMP+zGUH5JyXLkBX/hGWE+CWhcPjSJ8hAj8yBeXCyWpM07eiFPxxkqYF+Wka211fUU/HygHPX+Qj+CyoMjz9gstrjNPTX0zc3r55VrpiFUjxfgOoY32Eojwr9mWg/dcleov8wSmKuJZtzjxiXFzemVIP5kzrDIffxS6PR30mOq+d9k/ZgJfzhyuPr6W8kOmQXmLnMwbpcr1KSSgjOLmu6oBtjexL/ukI77ygGzDtdDfRPpj7klVHu34xcWAufMWOMlo70oenOeQGueYXGWPZW175I30dvCT/Ra2R+0MbxvxmdpmmoQmzC4d7l/MI2MhUHUW5N79x0vXB1PEGs+F3o+6dO+N1qqqXxJP/0N5BvADUF55dX2vpBSAXyN30UPO9IBqC0JkFPwXiOncsUir6r50C47HnS2WadAlu2QpHFL8YrTsSdhP19HAc6zWDM2/RaJZxFFQj/tqw0rYVYX//7iKKSiXWWQma12fG+HhJD2tBjEcp8+vU2nzjmd4tR6AurIEns1SsWg2cFcvrZzyzKFB0gdnvVpoCwouvl8UuSAyYc+rHMVGhWln+a+bhRgIERIb5XlrazMxJOqksed7mUs5ArKpOEuHWPYu+U+E2T1OkeusgAKL57F73Fm2xbIunW/IbW2wawYHv8u1AWGGSAB8XYJOW1XxpqIgq+V34pqd3WRpBGd1G4rGAA"- review={`I just want to say thank you so much.--After trying all the privacy security oriented note taking apps, for the price and the features afforded to your users, Notesnook is hands down the best.`}- />+ <Heading>{strings.comparePlans()}</Heading></View>+<Viewstyle={{- alignItems: "center",- paddingVertical: 16+ alignSelf: "center",+ flexShrink: 1}}>- <Heading>{strings.comparePlans()}</Heading>+ <ComparePlans pricingPlans={pricingPlans} setStep={setStep} /></View>- <ComparePlans pricingPlans={pricingPlans} setStep={setStep} />+<Viewstyle={{alignItems: "center",@@ -567,8 +594,7 @@ After trying all the privacy security oriented note taking apps, for the price a<Viewstyle={{- paddingHorizontal: 16,- paddingBottom: 16+ paddingHorizontal: 16}}>{strings.checkoutFaqs.map((item) => (@@ -721,6 +747,9 @@ const ComparePlans = React.memo(setStep: (step: number) => void;}) => {const { colors } = useThemeColors();+ const { width } = useWindowDimensions();+ const isTablet = width > 600;+return (<ScrollViewhorizontal@@ -933,6 +962,8 @@ const PricingPlanCard = ({const { colors } = useThemeColors();const isFreePlan = plan.id === "free";const [regionalDiscount, setRegionaDiscount] = useState<SKUResponse>();+ const { width, height } = useWindowDimensions();+ const isTablet = width > 600;const product =plan.subscriptions?.[@@ -978,7 +1009,8 @@ const PricingPlanCard = ({plan.id === "pro" ? colors.primary.accent : colors.primary.border,borderRadius: 10,padding: 16,- width: "100%",+ width: isTablet ? undefined : "100%",+ flexShrink: isTablet ? 1 : undefined,flexDirection: "column",justifyContent: "space-between",gap: 6