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