move hardcoded website urls to constants
This commit is contained in:
@@ -4,6 +4,7 @@ import {msg} from '@lingui/core/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {Trans} from '@lingui/react/macro'
|
import {Trans} from '@lingui/react/macro'
|
||||||
|
|
||||||
|
import {urls} from '#/lib/constants'
|
||||||
import {useA11y} from '#/state/a11y'
|
import {useA11y} from '#/state/a11y'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
@@ -27,27 +28,27 @@ export function Content({state}: {state: PolicyUpdateState}) {
|
|||||||
const links = {
|
const links = {
|
||||||
terms: {
|
terms: {
|
||||||
overridePresentation: false,
|
overridePresentation: false,
|
||||||
to: `https://bsky.social/about/support/tos`,
|
to: urls.website.support.tos,
|
||||||
label: _(msg`Terms of Service`),
|
label: _(msg`Terms of Service`),
|
||||||
},
|
},
|
||||||
privacy: {
|
privacy: {
|
||||||
overridePresentation: false,
|
overridePresentation: false,
|
||||||
to: `https://bsky.social/about/support/privacy-policy`,
|
to: urls.website.support.privacy,
|
||||||
label: _(msg`Privacy Policy`),
|
label: _(msg`Privacy Policy`),
|
||||||
},
|
},
|
||||||
copyright: {
|
copyright: {
|
||||||
overridePresentation: false,
|
overridePresentation: false,
|
||||||
to: `https://bsky.social/about/support/copyright`,
|
to: urls.website.support.copyright,
|
||||||
label: _(msg`Copyright Policy`),
|
label: _(msg`Copyright Policy`),
|
||||||
},
|
},
|
||||||
guidelines: {
|
guidelines: {
|
||||||
overridePresentation: false,
|
overridePresentation: false,
|
||||||
to: `https://bsky.social/about/support/community-guidelines`,
|
to: urls.website.support.community,
|
||||||
label: _(msg`Community Guidelines`),
|
label: _(msg`Community Guidelines`),
|
||||||
},
|
},
|
||||||
blog: {
|
blog: {
|
||||||
overridePresentation: false,
|
overridePresentation: false,
|
||||||
to: `https://bsky.social/about/blog/08-14-2025-updated-terms-and-policies`,
|
to: urls.website.blog.updatedTermsAndPolicies,
|
||||||
label: _(msg`Our blog post`),
|
label: _(msg`Our blog post`),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {msg} from '@lingui/core/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {Trans} from '@lingui/react/macro'
|
import {Trans} from '@lingui/react/macro'
|
||||||
|
|
||||||
|
import {urls} from '#/lib/constants'
|
||||||
import {useCleanError} from '#/lib/hooks/useCleanError'
|
import {useCleanError} from '#/lib/hooks/useCleanError'
|
||||||
import {isAppPassword} from '#/lib/jwt'
|
import {isAppPassword} from '#/lib/jwt'
|
||||||
import {getAge, getDateAgo} from '#/lib/strings/time'
|
import {getAge, getDateAgo} from '#/lib/strings/time'
|
||||||
@@ -177,7 +178,7 @@ function BirthdayInner({
|
|||||||
<Trans>
|
<Trans>
|
||||||
You must be at least 13 years old to use Bluesky. Read our{' '}
|
You must be at least 13 years old to use Bluesky. Read our{' '}
|
||||||
<SimpleInlineLinkText
|
<SimpleInlineLinkText
|
||||||
to="https://bsky.social/about/support/tos"
|
to={urls.website.support.tos}
|
||||||
label={_(msg`Terms of Service`)}>
|
label={_(msg`Terms of Service`)}>
|
||||||
Terms of Service
|
Terms of Service
|
||||||
</SimpleInlineLinkText>{' '}
|
</SimpleInlineLinkText>{' '}
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ import {
|
|||||||
ToolsOzoneReportDefs as OzoneReportDefs,
|
ToolsOzoneReportDefs as OzoneReportDefs,
|
||||||
} from '@atproto/api'
|
} from '@atproto/api'
|
||||||
|
|
||||||
|
import {urls} from '#/lib/constants'
|
||||||
import {type ParsedReportSubject} from '#/components/moderation/ReportDialog/types'
|
import {type ParsedReportSubject} from '#/components/moderation/ReportDialog/types'
|
||||||
|
|
||||||
export const DMCA_LINK = 'https://bsky.social/about/support/copyright'
|
export const DMCA_LINK = urls.website.support.copyright
|
||||||
export const SUPPORT_PAGE = 'https://bsky.social/about/support'
|
export const SUPPORT_PAGE = urls.website.support.index
|
||||||
|
|
||||||
export const NEW_TO_OLD_REASON_MAPPING: Record<string, string> = {}
|
export const NEW_TO_OLD_REASON_MAPPING: Record<string, string> = {}
|
||||||
|
|
||||||
|
|||||||
+20
-8
@@ -204,18 +204,37 @@ export const EMOJI_REACTION_LIMIT = 5
|
|||||||
|
|
||||||
export const urls = {
|
export const urls = {
|
||||||
website: {
|
website: {
|
||||||
|
about: 'https://bsky.social/about',
|
||||||
|
faq: 'https://bsky.social/about/faq',
|
||||||
|
jobs: 'https://bsky.social/about/join',
|
||||||
blog: {
|
blog: {
|
||||||
|
index: 'https://bsky.social/about/blog',
|
||||||
findFriendsAnnouncement:
|
findFriendsAnnouncement:
|
||||||
'https://bsky.social/about/blog/12-16-2025-find-friends',
|
'https://bsky.social/about/blog/12-16-2025-find-friends',
|
||||||
initialVerificationAnnouncement: `https://bsky.social/about/blog/04-21-2025-verification`,
|
initialVerificationAnnouncement: `https://bsky.social/about/blog/04-21-2025-verification`,
|
||||||
searchTipsAndTricks: 'https://bsky.social/about/blog/05-31-2024-search',
|
searchTipsAndTricks: 'https://bsky.social/about/blog/05-31-2024-search',
|
||||||
|
updatedTermsAndPolicies:
|
||||||
|
'https://bsky.social/about/blog/08-14-2025-updated-terms-and-policies',
|
||||||
|
handleTutorial:
|
||||||
|
'https://bsky.social/about/blog/4-28-2023-domain-handle-tutorial',
|
||||||
},
|
},
|
||||||
support: {
|
support: {
|
||||||
|
index: `https://bsky.social/about/support`,
|
||||||
findFriendsPrivacyPolicy:
|
findFriendsPrivacyPolicy:
|
||||||
'https://bsky.social/about/support/find-friends-privacy-policy',
|
'https://bsky.social/about/support/find-friends-privacy-policy',
|
||||||
|
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`,
|
||||||
|
copyright: `https://bsky.social/about/support/copyright`,
|
||||||
|
},
|
||||||
|
atproto: {
|
||||||
|
website: {
|
||||||
|
faq: 'https://atproto.com/guides/faq',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
} as const
|
||||||
|
|
||||||
export const PUBLIC_APPVIEW = 'https://api.bsky.app'
|
export const PUBLIC_APPVIEW = 'https://api.bsky.app'
|
||||||
export const PUBLIC_APPVIEW_DID = 'did:web:api.bsky.app'
|
export const PUBLIC_APPVIEW_DID = 'did:web:api.bsky.app'
|
||||||
@@ -246,10 +265,3 @@ export const BLUESKY_MOD_SERVICE_HEADERS = {
|
|||||||
export const BLUESKY_NOTIF_SERVICE_HEADERS = {
|
export const BLUESKY_NOTIF_SERVICE_HEADERS = {
|
||||||
'atproto-proxy': `${BLUESKY_PROXY_DID}#bsky_notif`,
|
'atproto-proxy': `${BLUESKY_PROXY_DID}#bsky_notif`,
|
||||||
}
|
}
|
||||||
|
|
||||||
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`,
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {Trans} from '@lingui/react/macro'
|
|||||||
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
import {useMutation} from '@tanstack/react-query'
|
import {useMutation} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {STATUS_PAGE_URL} from '#/lib/constants'
|
import {STATUS_PAGE_URL, urls} from '#/lib/constants'
|
||||||
import {type CommonNavigatorParams} from '#/lib/routes/types'
|
import {type CommonNavigatorParams} from '#/lib/routes/types'
|
||||||
import * as SettingsList from '#/screens/Settings/components/SettingsList'
|
import * as SettingsList from '#/screens/Settings/components/SettingsList'
|
||||||
import {Atom_Stroke2_Corner0_Rounded as AtomIcon} from '#/components/icons/Atom'
|
import {Atom_Stroke2_Corner0_Rounded as AtomIcon} from '#/components/icons/Atom'
|
||||||
@@ -79,7 +79,7 @@ export function AboutSettingsScreen({}: Props) {
|
|||||||
<Layout.Content>
|
<Layout.Content>
|
||||||
<SettingsList.Container>
|
<SettingsList.Container>
|
||||||
<SettingsList.LinkItem
|
<SettingsList.LinkItem
|
||||||
to="https://bsky.social/about/support/tos"
|
to={urls.website.support.tos}
|
||||||
label={_(msg`Terms of Service`)}>
|
label={_(msg`Terms of Service`)}>
|
||||||
<SettingsList.ItemIcon icon={NewspaperIcon} />
|
<SettingsList.ItemIcon icon={NewspaperIcon} />
|
||||||
<SettingsList.ItemText>
|
<SettingsList.ItemText>
|
||||||
@@ -87,7 +87,7 @@ export function AboutSettingsScreen({}: Props) {
|
|||||||
</SettingsList.ItemText>
|
</SettingsList.ItemText>
|
||||||
</SettingsList.LinkItem>
|
</SettingsList.LinkItem>
|
||||||
<SettingsList.LinkItem
|
<SettingsList.LinkItem
|
||||||
to="https://bsky.social/about/support/privacy-policy"
|
to={urls.website.support.privacy}
|
||||||
label={_(msg`Privacy Policy`)}>
|
label={_(msg`Privacy Policy`)}>
|
||||||
<SettingsList.ItemIcon icon={NewspaperIcon} />
|
<SettingsList.ItemIcon icon={NewspaperIcon} />
|
||||||
<SettingsList.ItemText>
|
<SettingsList.ItemText>
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ function ProvidedHandlePage({
|
|||||||
context: `english-only-resource`,
|
context: `english-only-resource`,
|
||||||
}),
|
}),
|
||||||
)}
|
)}
|
||||||
to="https://bsky.social/about/blog/4-28-2023-domain-handle-tutorial"
|
to={urls.website.blog.handleTutorial}
|
||||||
style={[a.font_semi_bold]}
|
style={[a.font_semi_bold]}
|
||||||
disableMismatchWarning>
|
disableMismatchWarning>
|
||||||
Learn more here.
|
Learn more here.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {msg} from '@lingui/core/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {Trans} from '@lingui/react/macro'
|
import {Trans} from '@lingui/react/macro'
|
||||||
|
|
||||||
import {DM_SERVICE_HEADERS} from '#/lib/constants'
|
import {DM_SERVICE_HEADERS, urls} from '#/lib/constants'
|
||||||
import {useCleanError} from '#/lib/hooks/useCleanError'
|
import {useCleanError} from '#/lib/hooks/useCleanError'
|
||||||
import {sanitizeHandle} from '#/lib/strings/handles'
|
import {sanitizeHandle} from '#/lib/strings/handles'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
@@ -343,7 +343,7 @@ function DeleteAccountDialogInner({
|
|||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
label={_(msg`Learn more about the AT Protocol.`)}
|
label={_(msg`Learn more about the AT Protocol.`)}
|
||||||
style={[a.text_md]}
|
style={[a.text_md]}
|
||||||
to="https://bsky.social/about/faq">
|
to={urls.website.faq}>
|
||||||
AT Protocol
|
AT Protocol
|
||||||
</InlineLinkText>{' '}
|
</InlineLinkText>{' '}
|
||||||
services you use with this account.
|
services you use with this account.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {countGraphemes} from 'unicode-segmenter/grapheme'
|
|||||||
import {
|
import {
|
||||||
BLUESKY_MOD_SERVICE_HEADERS,
|
BLUESKY_MOD_SERVICE_HEADERS,
|
||||||
MAX_REPORT_REASON_GRAPHEME_LENGTH,
|
MAX_REPORT_REASON_GRAPHEME_LENGTH,
|
||||||
|
urls,
|
||||||
} from '#/lib/constants'
|
} from '#/lib/constants'
|
||||||
import {cleanError} from '#/lib/strings/errors'
|
import {cleanError} from '#/lib/strings/errors'
|
||||||
import {useAgent, useSession, useSessionApi} from '#/state/session'
|
import {useAgent, useSession, useSessionApi} from '#/state/session'
|
||||||
@@ -211,7 +212,7 @@ export function Takendown() {
|
|||||||
Your account was found to be in violation of the{' '}
|
Your account was found to be in violation of the{' '}
|
||||||
<SimpleInlineLinkText
|
<SimpleInlineLinkText
|
||||||
label={_(msg`Bluesky Social Terms of Service`)}
|
label={_(msg`Bluesky Social Terms of Service`)}
|
||||||
to="https://bsky.social/about/support/tos"
|
to={urls.website.support.tos}
|
||||||
style={[a.text_md, a.leading_snug]}>
|
style={[a.text_md, a.leading_snug]}>
|
||||||
Bluesky Social Terms of Service
|
Bluesky Social Terms of Service
|
||||||
</SimpleInlineLinkText>
|
</SimpleInlineLinkText>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {msg} from '@lingui/core/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {Trans} from '@lingui/react/macro'
|
import {Trans} from '@lingui/react/macro'
|
||||||
|
|
||||||
|
import {urls} from '#/lib/constants'
|
||||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||||
import {useKawaiiMode} from '#/state/preferences/kawaii'
|
import {useKawaiiMode} from '#/state/preferences/kawaii'
|
||||||
import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
|
import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
|
||||||
@@ -171,17 +172,17 @@ function Footer() {
|
|||||||
]}>
|
]}>
|
||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
label={_(msg`Learn more about Bluesky`)}
|
label={_(msg`Learn more about Bluesky`)}
|
||||||
to="https://bsky.social">
|
to={urls.website.about}>
|
||||||
<Trans>Business</Trans>
|
<Trans>Business</Trans>
|
||||||
</InlineLinkText>
|
</InlineLinkText>
|
||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
label={_(msg`Read the Bluesky blog`)}
|
label={_(msg`Read the Bluesky blog`)}
|
||||||
to="https://bsky.social/about/blog">
|
to={urls.website.blog.index}>
|
||||||
<Trans>Blog</Trans>
|
<Trans>Blog</Trans>
|
||||||
</InlineLinkText>
|
</InlineLinkText>
|
||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
label={_(msg`See jobs at Bluesky`)}
|
label={_(msg`See jobs at Bluesky`)}
|
||||||
to="https://bsky.social/about/join">
|
to={urls.website.jobs}>
|
||||||
<Trans comment="Link to a page with job openings at Bluesky">
|
<Trans comment="Link to a page with job openings at Bluesky">
|
||||||
Jobs
|
Jobs
|
||||||
</Trans>
|
</Trans>
|
||||||
|
|||||||
@@ -6,13 +6,12 @@ import {useLingui} from '@lingui/react'
|
|||||||
import {Plural, Trans} from '@lingui/react/macro'
|
import {Plural, Trans} from '@lingui/react/macro'
|
||||||
import {StackActions, useNavigation} from '@react-navigation/native'
|
import {StackActions, useNavigation} from '@react-navigation/native'
|
||||||
|
|
||||||
import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants'
|
import {FEEDBACK_FORM_URL, HELP_DESK_URL, urls} from '#/lib/constants'
|
||||||
import {type PressableScale} from '#/lib/custom-animations/PressableScale'
|
import {type PressableScale} from '#/lib/custom-animations/PressableScale'
|
||||||
import {useNavigationTabState} from '#/lib/hooks/useNavigationTabState'
|
import {useNavigationTabState} from '#/lib/hooks/useNavigationTabState'
|
||||||
import {getTabState, TabState} from '#/lib/routes/helpers'
|
import {getTabState, TabState} from '#/lib/routes/helpers'
|
||||||
import {type NavigationProp} from '#/lib/routes/types'
|
import {type NavigationProp} from '#/lib/routes/types'
|
||||||
import {sanitizeHandle} from '#/lib/strings/handles'
|
import {sanitizeHandle} from '#/lib/strings/handles'
|
||||||
import {colors} from '#/lib/styles'
|
|
||||||
import {emitSoftReset} from '#/state/events'
|
import {emitSoftReset} from '#/state/events'
|
||||||
import {useKawaiiMode} from '#/state/preferences/kawaii'
|
import {useKawaiiMode} from '#/state/preferences/kawaii'
|
||||||
import {useUnreadNotifications} from '#/state/queries/notifications/unread'
|
import {useUnreadNotifications} from '#/state/queries/notifications/unread'
|
||||||
@@ -647,7 +646,7 @@ function MenuItem({icon, label, count, bold, onPress}: MenuItemProps) {
|
|||||||
a.font_semi_bold,
|
a.font_semi_bold,
|
||||||
{
|
{
|
||||||
fontVariant: ['tabular-nums'],
|
fontVariant: ['tabular-nums'],
|
||||||
color: colors.white,
|
color: t.palette.white,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
numberOfLines={1}>
|
numberOfLines={1}>
|
||||||
@@ -683,12 +682,12 @@ function ExtraLinks() {
|
|||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
style={[a.text_md]}
|
style={[a.text_md]}
|
||||||
label={_(msg`Terms of Service`)}
|
label={_(msg`Terms of Service`)}
|
||||||
to="https://bsky.social/about/support/tos">
|
to={urls.website.support.tos}>
|
||||||
<Trans>Terms of Service</Trans>
|
<Trans>Terms of Service</Trans>
|
||||||
</InlineLinkText>
|
</InlineLinkText>
|
||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
style={[a.text_md]}
|
style={[a.text_md]}
|
||||||
to="https://bsky.social/about/support/privacy-policy"
|
to={urls.website.support.privacy}
|
||||||
label={_(msg`Privacy Policy`)}>
|
label={_(msg`Privacy Policy`)}>
|
||||||
<Trans>Privacy Policy</Trans>
|
<Trans>Privacy Policy</Trans>
|
||||||
</InlineLinkText>
|
</InlineLinkText>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {useLingui} from '@lingui/react'
|
|||||||
import {Trans} from '@lingui/react/macro'
|
import {Trans} from '@lingui/react/macro'
|
||||||
import {useNavigation} from '@react-navigation/core'
|
import {useNavigation} from '@react-navigation/core'
|
||||||
|
|
||||||
import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants'
|
import {FEEDBACK_FORM_URL, HELP_DESK_URL, urls} from '#/lib/constants'
|
||||||
import {useKawaiiMode} from '#/state/preferences/kawaii'
|
import {useKawaiiMode} from '#/state/preferences/kawaii'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {DesktopFeeds} from '#/view/shell/desktop/Feeds'
|
import {DesktopFeeds} from '#/view/shell/desktop/Feeds'
|
||||||
@@ -112,14 +112,14 @@ export function DesktopRightNav({routeName}: {routeName: string}) {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
to="https://bsky.social/about/support/privacy-policy"
|
to={urls.website.support.privacy}
|
||||||
style={[t.atoms.text_contrast_medium]}
|
style={[t.atoms.text_contrast_medium]}
|
||||||
label={_(msg`Privacy`)}>
|
label={_(msg`Privacy`)}>
|
||||||
{_(msg`Privacy`)}
|
{_(msg`Privacy`)}
|
||||||
</InlineLinkText>
|
</InlineLinkText>
|
||||||
<Text style={[t.atoms.text_contrast_low]}>{' ∙ '}</Text>
|
<Text style={[t.atoms.text_contrast_low]}>{' ∙ '}</Text>
|
||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
to="https://bsky.social/about/support/tos"
|
to={urls.website.support.tos}
|
||||||
style={[t.atoms.text_contrast_medium]}
|
style={[t.atoms.text_contrast_medium]}
|
||||||
label={_(msg`Terms`)}>
|
label={_(msg`Terms`)}>
|
||||||
{_(msg`Terms`)}
|
{_(msg`Terms`)}
|
||||||
|
|||||||
Reference in New Issue
Block a user