forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 💫
1import {useCallback} from 'react'
2import {View} from 'react-native'
3import {msg} from '@lingui/core/macro'
4import {useLingui} from '@lingui/react'
5import {Trans} from '@lingui/react/macro'
6
7import {useA11y} from '#/state/a11y'
8import {atoms as a, useTheme} from '#/alf'
9import {Button, ButtonText} from '#/components/Button'
10import {InlineLinkText, Link} from '#/components/Link'
11import {Badge} from '#/components/PolicyUpdateOverlay/Badge'
12import {Overlay} from '#/components/PolicyUpdateOverlay/Overlay'
13import {type PolicyUpdateState} from '#/components/PolicyUpdateOverlay/usePolicyUpdateState'
14import {Text} from '#/components/Typography'
15import {IS_ANDROID} from '#/env'
16
17export function Content({state}: {state: PolicyUpdateState}) {
18 const t = useTheme()
19 const {_} = useLingui()
20 const {screenReaderEnabled} = useA11y()
21
22 const handleClose = useCallback(() => {
23 state.complete()
24 }, [state])
25
26 const linkStyle = [a.text_md]
27 const links = {
28 terms: {
29 overridePresentation: false,
30 to: `https://bsky.social/about/support/tos`,
31 label: _(msg`Terms of Service`),
32 },
33 privacy: {
34 overridePresentation: false,
35 to: `https://bsky.social/about/support/privacy-policy`,
36 label: _(msg`Privacy Policy`),
37 },
38 copyright: {
39 overridePresentation: false,
40 to: `https://bsky.social/about/support/copyright`,
41 label: _(msg`Copyright Policy`),
42 },
43 guidelines: {
44 overridePresentation: false,
45 to: `https://bsky.social/about/support/community-guidelines`,
46 label: _(msg`Community Guidelines`),
47 },
48 blog: {
49 overridePresentation: false,
50 to: `https://bsky.social/about/blog/08-14-2025-updated-terms-and-policies`,
51 label: _(msg`Our blog post`),
52 },
53 }
54 const linkButtonStyles = {
55 overridePresentation: false,
56 color: 'secondary',
57 size: 'small',
58 } as const
59
60 const label = IS_ANDROID
61 ? _(
62 msg`We’re updating our Terms of Service, Privacy Policy, and Copyright Policy, effective September 15th, 2025. We're also updating our Community Guidelines, and we want your input! These new guidelines will take effect on October 15th, 2025. Learn more about these changes and how to share your thoughts with us by reading our blog post.`,
63 )
64 : _(msg`We're updating our policies`)
65
66 return (
67 <Overlay label={label}>
68 <View style={[a.align_start, a.gap_xl]}>
69 <Badge />
70
71 {screenReaderEnabled ? (
72 <View style={[a.gap_sm]}>
73 <Text emoji style={[a.text_2xl, a.font_semi_bold, a.leading_snug]}>
74 <Trans>Hey there 👋</Trans>
75 </Text>
76 <Text style={[a.leading_snug, a.text_md]}>
77 <Trans>
78 We’re updating our Terms of Service, Privacy Policy, and
79 Copyright Policy, effective September 15th, 2025.
80 </Trans>
81 </Text>
82 <Text style={[a.leading_snug, a.text_md]}>
83 <Trans>
84 We're also updating our Community Guidelines, and we want your
85 input! These new guidelines will take effect on October 15th,
86 2025.
87 </Trans>
88 </Text>
89 <Text style={[a.leading_snug, a.text_md]}>
90 <Trans>
91 Learn more about these changes and how to share your thoughts
92 with us by reading our blog post.
93 </Trans>
94 </Text>
95
96 <Link {...links.terms} {...linkButtonStyles}>
97 <ButtonText>
98 <Trans>Terms of Service</Trans>
99 </ButtonText>
100 </Link>
101 <Link {...links.privacy} {...linkButtonStyles}>
102 <ButtonText>
103 <Trans>Privacy Policy</Trans>
104 </ButtonText>
105 </Link>
106 <Link {...links.copyright} {...linkButtonStyles}>
107 <ButtonText>
108 <Trans>Copyright Policy</Trans>
109 </ButtonText>
110 </Link>
111 <Link {...links.blog} {...linkButtonStyles}>
112 <ButtonText>
113 <Trans>Read our blog post</Trans>
114 </ButtonText>
115 </Link>
116 </View>
117 ) : (
118 <View style={[a.gap_sm]}>
119 <Text emoji style={[a.text_2xl, a.font_semi_bold, a.leading_snug]}>
120 <Trans>Hey there 👋</Trans>
121 </Text>
122 <Text style={[a.leading_snug, a.text_md]}>
123 <Trans>
124 We’re updating our{' '}
125 <InlineLinkText {...links.terms} style={linkStyle}>
126 Terms of Service
127 </InlineLinkText>
128 ,{' '}
129 <InlineLinkText {...links.privacy} style={linkStyle}>
130 Privacy Policy
131 </InlineLinkText>
132 , and{' '}
133 <InlineLinkText {...links.copyright} style={linkStyle}>
134 Copyright Policy
135 </InlineLinkText>
136 , effective September 15th, 2025.
137 </Trans>
138 </Text>
139 <Text style={[a.leading_snug, a.text_md]}>
140 <Trans>
141 We're also updating our{' '}
142 <InlineLinkText {...links.guidelines} style={linkStyle}>
143 Community Guidelines
144 </InlineLinkText>
145 , and we want your input! These new guidelines will take effect
146 on October 15th, 2025.
147 </Trans>
148 </Text>
149 <Text style={[a.leading_snug, a.text_md]}>
150 <Trans>
151 Learn more about these changes and how to share your thoughts
152 with us by{' '}
153 <InlineLinkText {...links.blog} style={linkStyle}>
154 reading our blog post.
155 </InlineLinkText>
156 </Trans>
157 </Text>
158 </View>
159 )}
160
161 <View style={[a.w_full, a.gap_md]}>
162 <Button
163 label={_(msg`Continue`)}
164 accessibilityHint={_(
165 msg`Tap to acknowledge that you understand and agree to these updates and continue using Bluesky`,
166 )}
167 color="primary"
168 size="large"
169 onPress={handleClose}>
170 <ButtonText>
171 <Trans>Continue</Trans>
172 </ButtonText>
173 </Button>
174
175 <Text
176 style={[
177 a.leading_snug,
178 a.text_sm,
179 a.italic,
180 t.atoms.text_contrast_medium,
181 ]}>
182 <Trans>
183 By clicking "Continue" you acknowledge that you understand and
184 agree to these updates.
185 </Trans>
186 </Text>
187 </View>
188 </View>
189 </Overlay>
190 )
191}