about summary refs log tree commit diff
path: root/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
blob: aa667e29a0a7f1be082375056a13ea5750da83e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
import {useCallback} from 'react'
import {View} from 'react-native'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'

import {isAndroid} from '#/platform/detection'
import {useA11y} from '#/state/a11y'
import {atoms as a, useTheme} from '#/alf'
import {Button, ButtonText} from '#/components/Button'
import {InlineLinkText, Link} from '#/components/Link'
import {Badge} from '#/components/PolicyUpdateOverlay/Badge'
import {Overlay} from '#/components/PolicyUpdateOverlay/Overlay'
import {type PolicyUpdateState} from '#/components/PolicyUpdateOverlay/usePolicyUpdateState'
import {Text} from '#/components/Typography'

export function Content({state}: {state: PolicyUpdateState}) {
  const t = useTheme()
  const {_} = useLingui()
  const {screenReaderEnabled} = useA11y()

  const handleClose = useCallback(() => {
    state.complete()
  }, [state])

  const linkStyle = [a.text_md]
  const links = {
    terms: {
      overridePresentation: false,
      to: `https://bsky.social/about/support`,
      label: _(msg`Terms of Service`),
    },
    privacy: {
      overridePresentation: false,
      to: `https://bsky.social/about/support`,
      label: _(msg`Privacy Policy`),
    },
    copyright: {
      overridePresentation: false,
      to: `https://bsky.social/about/support`,
      label: _(msg`Copyright Policy`),
    },
    guidelines: {
      overridePresentation: false,
      to: `https://bsky.social/about/support`,
      label: _(msg`Community Guidelines`),
    },
    blog: {
      overridePresentation: false,
      to: `https://bsky.social/about/support`,
      label: _(msg`Our blog post`),
    },
  }
  const linkButtonStyles = {
    overridePresentation: false,
    color: 'secondary',
    size: 'small',
  } as const

  const label = isAndroid
    ? _(
        msg`We’re updating our Terms of Service, Privacy Policy, and Copyright Policy, effective September 12th, 2025. We're also updating our Community Guidelines, and we want your input! These new guidelines will take effect on October 13th, 2025. Learn more about these changes and how to share your thoughts with us by reading our blog post.`,
      )
    : _(msg`We're updating our policies`)

  return (
    <Overlay label={label}>
      <View style={[a.align_start, a.gap_xl]}>
        <Badge />

        {screenReaderEnabled ? (
          <View style={[a.gap_sm]}>
            <Text emoji style={[a.text_2xl, a.font_bold, a.leading_snug]}>
              <Trans>Hey there 👋</Trans>
            </Text>
            <Text style={[a.leading_snug, a.text_md]}>
              <Trans>
                Were updating our Terms of Service, Privacy Policy, and
                Copyright Policy, effective September 12th, 2025.
              </Trans>
            </Text>
            <Text style={[a.leading_snug, a.text_md]}>
              <Trans>
                We're also updating our Community Guidelines, and we want your
                input! These new guidelines will take effect on October 13th,
                2025.
              </Trans>
            </Text>
            <Text style={[a.leading_snug, a.text_md]}>
              <Trans>
                Learn more about these changes and how to share your thoughts
                with us by reading our blog post.
              </Trans>
            </Text>

            <Link {...links.terms} {...linkButtonStyles}>
              <ButtonText>
                <Trans>Terms of Service</Trans>
              </ButtonText>
            </Link>
            <Link {...links.privacy} {...linkButtonStyles}>
              <ButtonText>
                <Trans>Privacy Policy</Trans>
              </ButtonText>
            </Link>
            <Link {...links.copyright} {...linkButtonStyles}>
              <ButtonText>
                <Trans>Copyright Policy</Trans>
              </ButtonText>
            </Link>
            <Link {...links.blog} {...linkButtonStyles}>
              <ButtonText>
                <Trans>Read our blog post</Trans>
              </ButtonText>
            </Link>
          </View>
        ) : (
          <View style={[a.gap_sm]}>
            <Text emoji style={[a.text_2xl, a.font_bold, a.leading_snug]}>
              <Trans>Hey there 👋</Trans>
            </Text>
            <Text style={[a.leading_snug, a.text_md]}>
              <Trans>
                We’re updating our{' '}
                <InlineLinkText {...links.terms} style={linkStyle}>
                  Terms of Service
                </InlineLinkText>
                ,{' '}
                <InlineLinkText {...links.privacy} style={linkStyle}>
                  Privacy Policy
                </InlineLinkText>
                , and{' '}
                <InlineLinkText {...links.copyright} style={linkStyle}>
                  Copyright Policy
                </InlineLinkText>
                , effective September 12th, 2025.
              </Trans>
            </Text>
            <Text style={[a.leading_snug, a.text_md]}>
              <Trans>
                We're also updating our{' '}
                <InlineLinkText {...links.guidelines} style={linkStyle}>
                  Community Guidelines
                </InlineLinkText>
                , and we want your input! These new guidelines will take effect
                on October 13th, 2025.
              </Trans>
            </Text>
            <Text style={[a.leading_snug, a.text_md]}>
              <Trans>
                Learn more about these changes and how to share your thoughts
                with us by{' '}
                <InlineLinkText {...links.blog} style={linkStyle}>
                  reading our blog post.
                </InlineLinkText>
              </Trans>
            </Text>
          </View>
        )}

        <View style={[a.w_full, a.gap_md]}>
          <Button
            label={_(msg`Continue`)}
            accessibilityHint={_(
              msg`Tap to acknowledge that you understand and agree to these updates and continue using Bluesky`,
            )}
            color="primary"
            size="large"
            onPress={handleClose}>
            <ButtonText>
              <Trans>Continue</Trans>
            </ButtonText>
          </Button>

          <Text
            style={[
              a.leading_snug,
              a.text_sm,
              a.italic,
              t.atoms.text_contrast_medium,
            ]}>
            <Trans>
              By clicking "Continue" you acknowledge that you understand and
              agree to these updates.
            </Trans>
          </Text>
        </View>
      </View>
    </Overlay>
  )
}