[LEG-203] Add onboarding text for policy updates (#8783)
* Add onboarding text for policy updates * Add gate, add to other case * Update other UI cases to use Admonitions * Th * Update date
This commit is contained in:
@@ -207,3 +207,10 @@ export const PUBLIC_APPVIEW_DID = 'did:web:api.bsky.app'
|
|||||||
export const PUBLIC_STAGING_APPVIEW_DID = 'did:web:api.staging.bsky.dev'
|
export const PUBLIC_STAGING_APPVIEW_DID = 'did:web:api.staging.bsky.dev'
|
||||||
|
|
||||||
export const DEV_ENV_APPVIEW = `http://localhost:2584` // always the same
|
export const DEV_ENV_APPVIEW = `http://localhost:2584` // always the same
|
||||||
|
|
||||||
|
export const webLinks = {
|
||||||
|
tos: `https://bsky.social/about/support/tos`,
|
||||||
|
privacy: `https://bsky.social/about/support/privacy-policy`,
|
||||||
|
community: `https://bsky.social/about/support/community-guidelines`,
|
||||||
|
communityDeprecated: `https://bsky.social/about/support/community-guidelines-deprecated`,
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export type Gate =
|
|||||||
| 'alt_share_icon'
|
| 'alt_share_icon'
|
||||||
| 'debug_show_feedcontext'
|
| 'debug_show_feedcontext'
|
||||||
| 'debug_subscriptions'
|
| 'debug_subscriptions'
|
||||||
|
| 'disable_onboarding_policy_update_notice'
|
||||||
| 'explore_show_suggested_feeds'
|
| 'explore_show_suggested_feeds'
|
||||||
| 'old_postonboarding'
|
| 'old_postonboarding'
|
||||||
| 'onboarding_add_video_feed'
|
| 'onboarding_add_video_feed'
|
||||||
|
|||||||
@@ -4,11 +4,42 @@ import {type ComAtprotoServerDescribeServer} from '@atproto/api'
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {webLinks} from '#/lib/constants'
|
||||||
|
import {useGate} from '#/lib/statsig/statsig'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo'
|
import {Admonition} from '#/components/Admonition'
|
||||||
import {InlineLinkText} from '#/components/Link'
|
import {InlineLinkText} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
|
function CommunityGuidelinesNotice({}: {}) {
|
||||||
|
const {_} = useLingui()
|
||||||
|
const gate = useGate()
|
||||||
|
|
||||||
|
if (gate('disable_onboarding_policy_update_notice')) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={[a.pt_xs]}>
|
||||||
|
<Admonition type="tip">
|
||||||
|
<Trans>
|
||||||
|
You also agree to{' '}
|
||||||
|
<InlineLinkText
|
||||||
|
label={_(msg`Bluesky's Community Guidelines`)}
|
||||||
|
to={webLinks.communityDeprecated}>
|
||||||
|
Bluesky’s Community Guidelines
|
||||||
|
</InlineLinkText>
|
||||||
|
. An{' '}
|
||||||
|
<InlineLinkText
|
||||||
|
label={_(msg`Bluesky's Updated Community Guidelines`)}
|
||||||
|
to={webLinks.community}>
|
||||||
|
updated version of our Community Guidelines
|
||||||
|
</InlineLinkText>{' '}
|
||||||
|
will take effect on October 13th.
|
||||||
|
</Trans>
|
||||||
|
</Admonition>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export const Policies = ({
|
export const Policies = ({
|
||||||
serviceDescription,
|
serviceDescription,
|
||||||
needsGuardian,
|
needsGuardian,
|
||||||
@@ -30,14 +61,13 @@ export const Policies = ({
|
|||||||
|
|
||||||
if (!tos && !pp) {
|
if (!tos && !pp) {
|
||||||
return (
|
return (
|
||||||
<View style={[a.flex_row, a.align_center, a.gap_xs]}>
|
<View style={[a.gap_sm]}>
|
||||||
<CircleInfo size="md" fill={t.atoms.text_contrast_low.color} />
|
<Admonition type="info">
|
||||||
|
|
||||||
<Text style={[t.atoms.text_contrast_medium]}>
|
|
||||||
<Trans>
|
<Trans>
|
||||||
This service has not provided terms of service or a privacy policy.
|
This service has not provided terms of service or a privacy policy.
|
||||||
</Trans>
|
</Trans>
|
||||||
</Text>
|
</Admonition>
|
||||||
|
<CommunityGuidelinesNotice />
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -102,19 +132,21 @@ export const Policies = ({
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{under13 ? (
|
{under13 ? (
|
||||||
<Text style={[a.font_bold, a.leading_snug, t.atoms.text_contrast_high]}>
|
<Admonition type="error">
|
||||||
<Trans>
|
<Trans>
|
||||||
You must be 13 years of age or older to create an account.
|
You must be 13 years of age or older to create an account.
|
||||||
</Trans>
|
</Trans>
|
||||||
</Text>
|
</Admonition>
|
||||||
) : needsGuardian ? (
|
) : needsGuardian ? (
|
||||||
<Text style={[a.font_bold, a.leading_snug, t.atoms.text_contrast_high]}>
|
<Admonition type="warning">
|
||||||
<Trans>
|
<Trans>
|
||||||
If you are not yet an adult according to the laws of your country,
|
If you are not yet an adult according to the laws of your country,
|
||||||
your parent or legal guardian must read these Terms on your behalf.
|
your parent or legal guardian must read these Terms on your behalf.
|
||||||
</Trans>
|
</Trans>
|
||||||
</Text>
|
</Admonition>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|
||||||
|
<CommunityGuidelinesNotice />
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user