Align copy, add notice to chat screens
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
|||||||
useDialogControl,
|
useDialogControl,
|
||||||
} from '#/components/ageAssurance/AgeAssuranceInitDialog'
|
} from '#/components/ageAssurance/AgeAssuranceInitDialog'
|
||||||
import {IsAgeRestricted} from '#/components/ageAssurance/IsAgeRestricted'
|
import {IsAgeRestricted} from '#/components/ageAssurance/IsAgeRestricted'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {createStaticClick, InlineLinkText} from '#/components/Link'
|
import {createStaticClick, InlineLinkText} from '#/components/Link'
|
||||||
@@ -35,6 +36,7 @@ function Inner({style}: ViewStyleProp & {}) {
|
|||||||
const appealControl = Dialog.useDialogControl()
|
const appealControl = Dialog.useDialogControl()
|
||||||
const getTimeAgo = useGetTimeAgo()
|
const getTimeAgo = useGetTimeAgo()
|
||||||
const {gtPhone} = useBreakpoints()
|
const {gtPhone} = useBreakpoints()
|
||||||
|
const copy = useAgeAssuranceCopy()
|
||||||
|
|
||||||
const isBlocked = status === 'blocked'
|
const isBlocked = status === 'blocked'
|
||||||
const timeAgo = lastInitiatedAt
|
const timeAgo = lastInitiatedAt
|
||||||
@@ -105,13 +107,7 @@ function Inner({style}: ViewStyleProp & {}) {
|
|||||||
a.align_start,
|
a.align_start,
|
||||||
gtPhone ? [a.flex_row, a.gap_xl] : [a.gap_md],
|
gtPhone ? [a.flex_row, a.gap_xl] : [a.gap_md],
|
||||||
]}>
|
]}>
|
||||||
<Text style={[a.text_sm, a.leading_snug]}>
|
<Text style={[a.text_sm, a.leading_snug]}>{copy.notice}</Text>
|
||||||
<Trans>
|
|
||||||
The laws in your location require that you verify your age
|
|
||||||
before accessing certain features on Bluesky like adult content
|
|
||||||
and direct messaging.
|
|
||||||
</Trans>
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
{!isBlocked && (
|
{!isBlocked && (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
useDialogControl,
|
useDialogControl,
|
||||||
} from '#/components/ageAssurance/AgeAssuranceInitDialog'
|
} from '#/components/ageAssurance/AgeAssuranceInitDialog'
|
||||||
import {IsAgeRestricted} from '#/components/ageAssurance/IsAgeRestricted'
|
import {IsAgeRestricted} from '#/components/ageAssurance/IsAgeRestricted'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import type * as Dialog from '#/components/Dialog'
|
import type * as Dialog from '#/components/Dialog'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
@@ -40,6 +41,7 @@ function Inner({
|
|||||||
}: ViewStyleProp & {control: Dialog.DialogControlProps}) {
|
}: ViewStyleProp & {control: Dialog.DialogControlProps}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const copy = useAgeAssuranceCopy()
|
||||||
const {mutate: save} = useSaveNux()
|
const {mutate: save} = useSaveNux()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -66,13 +68,7 @@ function Inner({
|
|||||||
<View style={[a.align_start, a.pb_md]}>
|
<View style={[a.align_start, a.pb_md]}>
|
||||||
<AgeAssuranceBadge />
|
<AgeAssuranceBadge />
|
||||||
</View>
|
</View>
|
||||||
<Text style={[a.text_md, a.leading_snug]}>
|
<Text style={[a.text_md, a.leading_snug]}>{copy.notice}</Text>
|
||||||
<Trans>
|
|
||||||
The laws in your location require that you verify your age before
|
|
||||||
accessing certain features on Bluesky like adult content and
|
|
||||||
direct messaging.
|
|
||||||
</Trans>
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
<Divider
|
<Divider
|
||||||
style={[
|
style={[
|
||||||
@@ -107,7 +103,7 @@ function Inner({
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<Trans>Age verification takes only a few minutes</Trans>
|
{copy.noticeSub}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import {msg, Trans} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {atoms as a, select, useTheme} from '#/alf'
|
import {atoms as a, select, useTheme} from '#/alf'
|
||||||
|
import {Admonition} from '#/components/Admonition'
|
||||||
import {AgeAssuranceBadge} from '#/components/ageAssurance/AgeAssuranceBadge'
|
import {AgeAssuranceBadge} from '#/components/ageAssurance/AgeAssuranceBadge'
|
||||||
import {
|
import {
|
||||||
AgeAssuranceInitDialog,
|
AgeAssuranceInitDialog,
|
||||||
useDialogControl,
|
useDialogControl,
|
||||||
} from '#/components/ageAssurance/AgeAssuranceInitDialog'
|
} from '#/components/ageAssurance/AgeAssuranceInitDialog'
|
||||||
import {IsAgeRestricted} from '#/components/ageAssurance/IsAgeRestricted'
|
import {IsAgeRestricted} from '#/components/ageAssurance/IsAgeRestricted'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
@@ -19,13 +21,16 @@ export function AgeRestrictedScreen({
|
|||||||
children,
|
children,
|
||||||
fallback,
|
fallback,
|
||||||
screenTitle,
|
screenTitle,
|
||||||
|
infoText,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
fallback?: React.ReactNode
|
fallback?: React.ReactNode
|
||||||
screenTitle?: string
|
screenTitle?: string
|
||||||
|
infoText?: string
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const copy = useAgeAssuranceCopy()
|
||||||
const control = useDialogControl()
|
const control = useDialogControl()
|
||||||
const screenFallback = useMemo(() => {
|
const screenFallback = useMemo(() => {
|
||||||
return (
|
return (
|
||||||
@@ -57,7 +62,7 @@ export function AgeRestrictedScreen({
|
|||||||
<Layout.Header.Slot />
|
<Layout.Header.Slot />
|
||||||
</Layout.Header.Outer>
|
</Layout.Header.Outer>
|
||||||
<Layout.Content>
|
<Layout.Content>
|
||||||
<View style={[a.p_lg]}>
|
<View style={[a.p_lg, a.gap_lg]}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.p_lg,
|
a.p_lg,
|
||||||
@@ -83,11 +88,7 @@ export function AgeRestrictedScreen({
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text style={[a.text_md, a.leading_snug, a.pb_sm]}>
|
<Text style={[a.text_md, a.leading_snug, a.pb_sm]}>
|
||||||
<Trans>
|
<Trans>{copy.notice}</Trans>
|
||||||
The laws in your location require that you verify your age
|
|
||||||
before accessing certain features on Bluesky like adult
|
|
||||||
content and direct messaging.
|
|
||||||
</Trans>
|
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text style={[a.text_md, a.leading_snug]}>
|
<Text style={[a.text_md, a.leading_snug]}>
|
||||||
@@ -116,7 +117,7 @@ export function AgeRestrictedScreen({
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<Trans>Age verification takes only a few minutes</Trans>
|
{copy.noticeSub}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -131,6 +132,8 @@ export function AgeRestrictedScreen({
|
|||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
{infoText && <Admonition type="info">{infoText}</Admonition>}
|
||||||
</View>
|
</View>
|
||||||
</Layout.Content>
|
</Layout.Content>
|
||||||
</Layout.Screen>
|
</Layout.Screen>
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import {useMemo} from 'react'
|
||||||
|
import {msg} from '@lingui/macro'
|
||||||
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
export function useAgeAssuranceCopy() {
|
||||||
|
const {_} = useLingui()
|
||||||
|
|
||||||
|
return useMemo(() => {
|
||||||
|
return {
|
||||||
|
notice: _(
|
||||||
|
msg`The laws in your location require that you verify your age before accessing certain features on Bluesky like adult content and direct messaging.`,
|
||||||
|
),
|
||||||
|
noticeSub: _(msg`Age verification takes only a few minutes`),
|
||||||
|
chatsInfoText: _(
|
||||||
|
msg`Don't worry! All existing messages and settings are saved and will be available after you complete age verification.`,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
}, [_])
|
||||||
|
}
|
||||||
@@ -24,6 +24,7 @@ import {List, type ListRef} from '#/view/com/util/List'
|
|||||||
import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {type DialogControlProps, useDialogControl} from '#/components/Dialog'
|
import {type DialogControlProps, useDialogControl} from '#/components/Dialog'
|
||||||
import {NewChat} from '#/components/dms/dialogs/NewChatDialog'
|
import {NewChat} from '#/components/dms/dialogs/NewChatDialog'
|
||||||
@@ -68,8 +69,12 @@ type Props = NativeStackScreenProps<MessagesTabNavigatorParams, 'Messages'>
|
|||||||
|
|
||||||
export function MessagesScreen(props: Props) {
|
export function MessagesScreen(props: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const aaCopy = useAgeAssuranceCopy()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AgeRestrictedScreen screenTitle={_(msg`Chats`)}>
|
<AgeRestrictedScreen
|
||||||
|
screenTitle={_(msg`Chats`)}
|
||||||
|
infoText={aaCopy.chatsInfoText}>
|
||||||
<MessagesScreenInner {...props} />
|
<MessagesScreenInner {...props} />
|
||||||
</AgeRestrictedScreen>
|
</AgeRestrictedScreen>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import {useSetMinimalShellMode} from '#/state/shell'
|
|||||||
import {MessagesList} from '#/screens/Messages/components/MessagesList'
|
import {MessagesList} from '#/screens/Messages/components/MessagesList'
|
||||||
import {atoms as a, useBreakpoints, useTheme, web} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme, web} from '#/alf'
|
||||||
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {
|
import {
|
||||||
EmailDialogScreenID,
|
EmailDialogScreenID,
|
||||||
useEmailDialogControl,
|
useEmailDialogControl,
|
||||||
@@ -50,8 +51,11 @@ type Props = NativeStackScreenProps<
|
|||||||
|
|
||||||
export function MessagesConversationScreen(props: Props) {
|
export function MessagesConversationScreen(props: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const aaCopy = useAgeAssuranceCopy()
|
||||||
return (
|
return (
|
||||||
<AgeRestrictedScreen screenTitle={_(msg`Conversation`)}>
|
<AgeRestrictedScreen
|
||||||
|
screenTitle={_(msg`Conversation`)}
|
||||||
|
infoText={aaCopy.chatsInfoText}>
|
||||||
<MessagesConversationScreenInner {...props} />
|
<MessagesConversationScreenInner {...props} />
|
||||||
</AgeRestrictedScreen>
|
</AgeRestrictedScreen>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
|||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {useRefreshOnFocus} from '#/components/hooks/useRefreshOnFocus'
|
import {useRefreshOnFocus} from '#/components/hooks/useRefreshOnFocus'
|
||||||
import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeftIcon} from '#/components/icons/Arrow'
|
import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeftIcon} from '#/components/icons/Arrow'
|
||||||
@@ -49,8 +50,11 @@ type Props = NativeStackScreenProps<CommonNavigatorParams, 'MessagesInbox'>
|
|||||||
|
|
||||||
export function MessagesInboxScreen(props: Props) {
|
export function MessagesInboxScreen(props: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const aaCopy = useAgeAssuranceCopy()
|
||||||
return (
|
return (
|
||||||
<AgeRestrictedScreen screenTitle={_(msg`Chat requests`)}>
|
<AgeRestrictedScreen
|
||||||
|
screenTitle={_(msg`Chat requests`)}
|
||||||
|
infoText={aaCopy.chatsInfoText}>
|
||||||
<MessagesInboxScreenInner {...props} />
|
<MessagesInboxScreenInner {...props} />
|
||||||
</AgeRestrictedScreen>
|
</AgeRestrictedScreen>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import * as Toast from '#/view/com/util/Toast'
|
|||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
import {Admonition} from '#/components/Admonition'
|
import {Admonition} from '#/components/Admonition'
|
||||||
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen'
|
||||||
|
import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
import * as Toggle from '#/components/forms/Toggle'
|
import * as Toggle from '#/components/forms/Toggle'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
@@ -25,8 +26,12 @@ type Props = NativeStackScreenProps<CommonNavigatorParams, 'MessagesSettings'>
|
|||||||
|
|
||||||
export function MessagesSettingsScreen(props: Props) {
|
export function MessagesSettingsScreen(props: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
|
const aaCopy = useAgeAssuranceCopy()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AgeRestrictedScreen screenTitle={_(msg`Chat Settings`)}>
|
<AgeRestrictedScreen
|
||||||
|
screenTitle={_(msg`Chat Settings`)}
|
||||||
|
infoText={aaCopy.chatsInfoText}>
|
||||||
<MessagesSettingsScreenInner {...props} />
|
<MessagesSettingsScreenInner {...props} />
|
||||||
</AgeRestrictedScreen>
|
</AgeRestrictedScreen>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user