diff --git a/src/components/dialogs/BlockingAlertDialog.tsx b/src/components/dialogs/BlockingAlertDialog.tsx deleted file mode 100644 index eed52c58da..0000000000 --- a/src/components/dialogs/BlockingAlertDialog.tsx +++ /dev/null @@ -1,211 +0,0 @@ -import {type ReactNode, useCallback} from 'react' -import {View} from 'react-native' -import {msg, Trans} from '@lingui/macro' -import {useLingui} from '@lingui/react' - -import {Logo} from '#/view/icons/Logo' -import {atoms as a, useTheme, web} from '#/alf' -import {Button, ButtonText} from '#/components/Button' -import * as Dialog from '#/components/Dialog' -import {useGlobalDialogsControlContext} from '#/components/dialogs/Context' -import {InlineLinkText} from '#/components/Link' -import {Span, Text} from '#/components/Typography' - -export function BlockingAlertDialog() { - const {enabled} = usePolicyUpdate20250801() - - return ( - <> - {enabled && ( - - - - )} - - ) -} - -function useForceClose() { - const {close} = Dialog.useDialogContext() - return useCallback( - (cb?: () => void) => { - close(cb, true) - }, - [close], - ) -} - -export function BlockingAnnouncementDialogOuter({ - children, -}: { - children: ReactNode -}) { - const {signinDialogControl: control} = useGlobalDialogsControlContext() - - Dialog.useAutoOpen(control, 1e3) - - return ( - - - {children} - - ) -} - -export function AnnouncementBadge() { - const t = useTheme() - return ( - - - - - Announcement - - - - ) -} - -function usePolicyUpdate20250801() { - return { - enabled: true, - } -} - -function PolicyUpdate20250801() { - const t = useTheme() - const {_} = useLingui() - const forceClose = useForceClose() - - const linkStyle = [a.text_md] - const links = { - terms: { - overridePresentation: true, - to: `https://bsky.social/about/support`, - label: _(msg`Terms of Service`), - style: linkStyle, - }, - privacy: { - overridePresentation: true, - to: `https://bsky.social/about/support`, - label: _(msg`Privacy Policy`), - style: linkStyle, - }, - copyright: { - overridePresentation: true, - to: `https://bsky.social/about/support`, - label: _(msg`Copyright Policy`), - style: linkStyle, - }, - guidelines: { - overridePresentation: true, - to: `https://bsky.social/about/support`, - label: _(msg`Community Guidelines`), - style: linkStyle, - }, - blog: { - overridePresentation: true, - to: `https://bsky.social/about/support`, - label: _(msg`Our blog post`), - style: linkStyle, - }, - } - - const handleClose = useCallback(() => { - forceClose(() => { - console.log('closed') - }) - }, [forceClose]) - - return ( - - - - - - - Hey there 👋 - - - - We’re updating our{' '} - Terms of Service - ,{' '} - Privacy Policy - , and{' '} - - Copyright Policy - - , effective September 1st, 2025. - - - - - We're also updating our{' '} - - Community Guidelines - - , and we want your input! These new - guidelines will take effect on{' '} - October 1st, 2025. - - - - - Learn more about these changes and how to share your thoughts with - us by{' '} - - reading our blog post. - - - - - - - - - - - By clicking "Continue" you acknowledge that you understand and - agree to these updates. - - - - - - ) -}