From b9ee26ab3c92cd9a1f324c9c024b7e1bab871f36 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 26 Nov 2024 13:38:08 -0600 Subject: [PATCH] Design --- src/screens/Subscriptions/index.tsx | 273 +++++++++++++++++++++------- 1 file changed, 208 insertions(+), 65 deletions(-) diff --git a/src/screens/Subscriptions/index.tsx b/src/screens/Subscriptions/index.tsx index c5a5d03123..86b16d82b4 100644 --- a/src/screens/Subscriptions/index.tsx +++ b/src/screens/Subscriptions/index.tsx @@ -19,7 +19,7 @@ import { NativePurchaseRestricted, } from '#/state/purchases/types' import {CenteredView} from '#/view/com/util/Views' -import {atoms as a, tokens, useTheme} from '#/alf' +import {atoms as a, tokens, useBreakpoints,useTheme} from '#/alf' import {Admonition} from '#/components/Admonition' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' @@ -36,7 +36,7 @@ import {Globe_Stroke2_Corner0_Rounded as Globe} from '#/components/icons/Globe' import {Mark} from '#/components/icons/Logo' import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' import * as Layout from '#/components/Layout' -import {createStaticClick, Link} from '#/components/Link' +import {createStaticClick, InlineLinkText, Link} from '#/components/Link' import {Loader} from '#/components/Loader' import {Text} from '#/components/Typography' @@ -102,8 +102,8 @@ function Core({ return ( - - + + {restricted === 'yes' ? ( @@ -118,15 +118,122 @@ function Core({ )} {isSubscribedToCore ? ( - - - Active subscriptions - - {coreSubscriptions.map(sub => ( - - ))} + + + {coreSubscriptions.map(sub => ( + + ))} + + + + + ) : null} + + + + + Terms and Conditions + {' '} + ·{' '} + + Privacy Policy + {' '} + ·{' '} + + EULA + + + + + ) +} + +function InfoCards() { + const t = useTheme() + const {_} = useLingui() + const {gtPhone} = useBreakpoints() + const {features} = useFeatures() + const activeFeatures = features.filter(f => f.available) + + return ( + + + + Features + + + {activeFeatures.map(f => ( + + + {f.text} + + ))} + + + + + + + Your support helps Bluesky build a better internet. Thanks for being + a part of the ATmosphere! + + + + + + Get support + + + + + FAQ + + + ) } @@ -135,49 +242,7 @@ function Purchase() { const t = useTheme() const {_} = useLingui() const control = useDialogControl() - - const features = [ - { - available: true, - icon: Check, - text: _(msg`Bluesky+ supporter badge`), - }, - { - available: true, - icon: Check, - text: _(msg`Custom app icons`), - }, - { - available: true, - icon: Check, - text: _(msg`Profile customizations`), - }, - { - available: true, - icon: Check, - text: _(msg`Higher video upload limits`), - }, - { - available: true, - icon: Check, - text: _(msg`High quality video resolution`), - }, - { - available: false, - icon: Clock, - text: _(msg`Inline post translations (coming soon)`), - }, - { - available: false, - icon: Clock, - text: _(msg`Post analytics (coming soon)`), - }, - { - available: false, - icon: Clock, - text: _(msg`Bookmark folders (coming soon)`), - }, - ] + const {features} = useFeatures() return ( <> @@ -355,14 +420,32 @@ export function Subscription({ return ( - + style={[a.px_lg, a.rounded_md, a.overflow_hidden]}> + + + + {ui.title} @@ -400,7 +483,16 @@ export function Subscription({ - + - - + + {ui.platformName} @@ -428,3 +520,54 @@ export function Subscription({ ) } + +function useFeatures() { + const {_} = useLingui() + + const features = [ + { + available: true, + icon: Check, + text: _(msg`Bluesky+ profile badge`), + }, + { + available: true, + icon: Check, + text: _(msg`Custom app icons`), + }, + { + available: true, + icon: Check, + text: _(msg`Profile customizations`), + }, + { + available: true, + icon: Check, + text: _(msg`Higher video upload limits`), + }, + { + available: true, + icon: Check, + text: _(msg`High quality video resolution`), + }, + { + available: false, + icon: Clock, + text: _(msg`Inline post translations (coming soon)`), + }, + { + available: false, + icon: Clock, + text: _(msg`Post analytics (coming soon)`), + }, + { + available: false, + icon: Clock, + text: _(msg`Bookmark folders (coming soon)`), + }, + ] + + return { + features, + } +}