ai/at
1
0
This commit is contained in:
2025-12-07 14:45:10 +09:00
parent 53d9b5fd72
commit f64591076f
10 changed files with 178 additions and 1244 deletions

View File

@@ -1,79 +1,24 @@
diff --git a/src/lib/constants.ts b/src/lib/constants.ts diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index 231447b4f..33c51cc0a 100644 index e2a742056..f325d7b05 100644
--- a/src/lib/constants.ts --- a/src/lib/constants.ts
+++ b/src/lib/constants.ts +++ b/src/lib/constants.ts
@@ -7,12 +7,12 @@ import {BLUESKY_PROXY_DID, CHAT_PROXY_DID} from '#/env' @@ -12,7 +12,7 @@ export const PUBLIC_BSKY_SERVICE = 'https://public.api.bsky.app'
export const LOCAL_DEV_SERVICE =
Platform.OS === 'android' ? 'http://10.0.2.2:2583' : 'http://localhost:2583'
export const STAGING_SERVICE = 'https://staging.bsky.dev'
-export const BSKY_SERVICE = 'https://bsky.social'
-export const BSKY_SERVICE_DID = 'did:web:bsky.social'
-export const PUBLIC_BSKY_SERVICE = 'https://public.api.bsky.app'
+export const BSKY_SERVICE = 'https://syu.is'
+export const BSKY_SERVICE_DID = 'did:web:syu.is'
+export const PUBLIC_BSKY_SERVICE = 'https://bsky.syu.is'
export const DEFAULT_SERVICE = BSKY_SERVICE export const DEFAULT_SERVICE = BSKY_SERVICE
-const HELP_DESK_LANG = 'en-us' const HELP_DESK_LANG = 'en-us'
-export const HELP_DESK_URL = `https://blueskyweb.zendesk.com/hc/${HELP_DESK_LANG}` -export const HELP_DESK_URL = `https://blueskyweb.zendesk.com/hc/${HELP_DESK_LANG}`
+const HELP_DESK_LANG = 'ja-jp' +export const HELP_DESK_URL = `https://syu.is/about/support/help`
+export const HELP_DESK_URL = 'https://syu.is/about/support/help'
export const EMBED_SERVICE = 'https://embed.bsky.app' export const EMBED_SERVICE = 'https://embed.bsky.app'
export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js` export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js`
export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download' export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download'
@@ -209,8 +209,8 @@ export const urls = {
},
}
-export const PUBLIC_APPVIEW = 'https://api.bsky.app'
-export const PUBLIC_APPVIEW_DID = 'did:web:api.bsky.app'
+export const PUBLIC_APPVIEW = 'https://bsky.syu.is'
+export const PUBLIC_APPVIEW_DID = 'did:web:bsky.syu.is'
export const PUBLIC_STAGING_APPVIEW_DID = 'did:web:api.staging.bsky.dev'
export const DEV_ENV_APPVIEW = `http://localhost:2584` // always the same
@@ -236,8 +236,8 @@ export const BLUESKY_MOD_SERVICE_HEADERS = { @@ -236,8 +236,8 @@ export const BLUESKY_MOD_SERVICE_HEADERS = {
} }
export const webLinks = { export const webLinks = {
- tos: `https://bsky.social/about/support/tos`, - tos: `https://bsky.social/about/support/tos`,
- privacy: `https://bsky.social/about/support/privacy-policy`, - privacy: `https://bsky.social/about/support/privacy-policy`,
- community: `https://bsky.social/about/support/community-guidelines`,
+ tos: `https://syu.is/about/support/tos`, + tos: `https://syu.is/about/support/tos`,
+ privacy: `https://syu.is/about/support/privacy-policy`, + privacy: `https://syu.is/about/support/privacy-policy`,
community: `https://bsky.social/about/support/community-guidelines`, + community: `https://syu.is/about/support/community-guidelines`,
communityDeprecated: `https://bsky.social/about/support/community-guidelines-deprecated`, communityDeprecated: `https://bsky.social/about/support/community-guidelines-deprecated`,
} }
diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx
index 860e841eb..a595b0868 100644
--- a/src/lib/statsig/statsig.tsx
+++ b/src/lib/statsig/statsig.tsx
@@ -265,6 +265,7 @@ export async function tryFetchGates(
}
export function initialize() {
+ if (!SDK_KEY) return Promise.resolve()
return Statsig.initialize(SDK_KEY, null, createStatsigOptions([]))
}
@@ -309,6 +310,9 @@ export function Provider({children}: {children: React.ReactNode}) {
return () => clearInterval(id)
}, [handleIntervalTick])
+ if (!SDK_KEY) {
+ return <GateCache.Provider value={gateCache}>{children}</GateCache.Provider>
+ }
return (
<GateCache.Provider value={gateCache}>
<StatsigProvider
diff --git a/src/lib/strings/url-helpers.ts b/src/lib/strings/url-helpers.ts
index 6088e2806..7c903763d 100644
--- a/src/lib/strings/url-helpers.ts
+++ b/src/lib/strings/url-helpers.ts
@@ -53,7 +53,7 @@ export function toNiceDomain(url: string): string {
try {
const urlp = new URL(url)
if (`https://${urlp.host}` === BSKY_SERVICE) {
- return 'Bluesky Social'
+ return 'syu.is'
}
return urlp.host ? urlp.host : url
} catch (e) {

View File

@@ -1,18 +1,27 @@
diff --git a/src/App.native.tsx b/src/App.native.tsx diff --git a/src/App.native.tsx b/src/App.native.tsx
index fb3008627..539ebc055 100644 index 3578d4612..483de14c7 100644
--- a/src/App.native.tsx --- a/src/App.native.tsx
+++ b/src/App.native.tsx +++ b/src/App.native.tsx
@@ -92,7 +92,7 @@ if (isAndroid) { @@ -52,7 +52,7 @@ import {
* Begin geolocation ASAP Provider as StatsigProvider,
*/ statsigSetup,
Geo.resolve() } from '#/lib/statsig/statsig'
-prefetchAgeAssuranceConfig() -import {prefetchAgeAssuranceConfig} from '#/state/queries/profile'
+// // // prefetchAgeAssuranceConfig() +// import {prefetchAgeAssuranceConfig} from '#/state/queries/profile'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {QueryClient} from '@tanstack/react-query'
@@ -107,7 +107,7 @@ function InnerApp() {
// prefetch the age assurance config if the user is logged in
// so we can use it for blocking content
if (hasSession) {
- prefetchAgeAssuranceConfig(queryClient)
+ // prefetchAgeAssuranceConfig(queryClient)
}
}, [hasSession, queryClient])
function InnerApp() {
const [isReady, setIsReady] = React.useState(false)
diff --git a/src/routes.ts b/src/routes.ts diff --git a/src/routes.ts b/src/routes.ts
index 1ed913bb2..c80340edb 100644 index b7523bb0d..fc48add49 100644
--- a/src/routes.ts --- a/src/routes.ts
+++ b/src/routes.ts +++ b/src/routes.ts
@@ -71,8 +71,8 @@ export const router = new Router<AllNavigatableRoutes>({ @@ -71,8 +71,8 @@ export const router = new Router<AllNavigatableRoutes>({
@@ -27,46 +36,14 @@ index 1ed913bb2..c80340edb 100644
CopyrightPolicy: '/support/copyright', CopyrightPolicy: '/support/copyright',
// hashtags // hashtags
diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts
index 5c8ce3b97..ee85beb08 100644 index 725679ba2..9d40fe2c4 100644
--- a/src/state/session/agent.ts --- a/src/state/session/agent.ts
+++ b/src/state/session/agent.ts +++ b/src/state/session/agent.ts
@@ -47,7 +47,8 @@ export function createPublicAgent() { @@ -83,7 +83,7 @@ export function getAgent() {
configureModerationForGuest() // Side effect but only relevant for tests if (prevServiceUrl !== publicAgent.service.toString()) {
logger.warn(`Public Agent service URL changed`, {prevServiceUrl})
const agent = new BskyAppAgent({service: PUBLIC_BSKY_SERVICE})
- agent.configureProxy(BLUESKY_PROXY_HEADER.get())
+ // Disable proxy for self-hosted environments
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get())
return agent
}
@@ -88,7 +89,8 @@ export async function createAgentAndResume(
// after session is attached
const aa = prefetchAgeAssuranceData({agent})
- agent.configureProxy(BLUESKY_PROXY_HEADER.get())
+ // Disable proxy for self-hosted environments
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get())
return agent.prepare({
resolvers: [gates, moderation, aa],
@@ -127,7 +129,8 @@ export async function createAgentAndLogin(
const moderation = configureModerationForAccount(agent, account)
const aa = prefetchAgeAssuranceData({agent})
- agent.configureProxy(BLUESKY_PROXY_HEADER.get())
+ // Disable proxy for self-hosted environments
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get())
return agent.prepare({
resolvers: [gates, moderation, aa],
@@ -299,7 +302,8 @@ export async function createAgentAndCreateAccount(
logger.error(e, {message: `session: failed snoozeEmailConfirmationPrompt`})
} }
- activeAgent.configureProxy(BLUESKY_PROXY_HEADER)
- agent.configureProxy(BLUESKY_PROXY_HEADER.get()) + // activeAgent.configureProxy(BLUESKY_PROXY_HEADER)
+ // Disable proxy for self-hosted environments return activeAgent
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get()) }
return agent.prepare({
resolvers: [gates, moderation, aa],

View File

@@ -1,8 +1,8 @@
diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx
index 6b8257b91..35202224b 100644 index 585c490a7..db747a8d5 100644
--- a/src/screens/Settings/AboutSettings.tsx --- a/src/screens/Settings/AboutSettings.tsx
+++ b/src/screens/Settings/AboutSettings.tsx +++ b/src/screens/Settings/AboutSettings.tsx
@@ -80,7 +80,7 @@ export function AboutSettingsScreen({}: Props) { @@ -80,15 +80,15 @@ export function AboutSettingsScreen({}: Props) {
<Layout.Content> <Layout.Content>
<SettingsList.Container> <SettingsList.Container>
<SettingsList.LinkItem <SettingsList.LinkItem
@@ -11,7 +11,7 @@ index 6b8257b91..35202224b 100644
label={_(msg`Terms of Service`)}> label={_(msg`Terms of Service`)}>
<SettingsList.ItemIcon icon={NewspaperIcon} /> <SettingsList.ItemIcon icon={NewspaperIcon} />
<SettingsList.ItemText> <SettingsList.ItemText>
@@ -88,7 +88,7 @@ export function AboutSettingsScreen({}: Props) { <Trans>Terms of Service</Trans>
</SettingsList.ItemText> </SettingsList.ItemText>
</SettingsList.LinkItem> </SettingsList.LinkItem>
<SettingsList.LinkItem <SettingsList.LinkItem
@@ -21,442 +21,31 @@ index 6b8257b91..35202224b 100644
<SettingsList.ItemIcon icon={NewspaperIcon} /> <SettingsList.ItemIcon icon={NewspaperIcon} />
<SettingsList.ItemText> <SettingsList.ItemText>
diff --git a/src/screens/Takendown.tsx b/src/screens/Takendown.tsx diff --git a/src/screens/Takendown.tsx b/src/screens/Takendown.tsx
index dd319a4c6..0e80f956a 100644 index 451a3780f..a2818a514 100644
--- a/src/screens/Takendown.tsx --- a/src/screens/Takendown.tsx
+++ b/src/screens/Takendown.tsx +++ b/src/screens/Takendown.tsx
@@ -223,11 +223,11 @@ export function Takendown() { @@ -224,7 +224,7 @@ export function Takendown() {
<Trans>
Your account was found to be in violation of the{' '} Your account was found to be in violation of the{' '}
<InlineLinkText <InlineLinkText
- label={_(msg`Bluesky Social Terms of Service`)} label={_(msg`Bluesky Social Terms of Service`)}
- to="https://bsky.social/about/support/tos" - to="https://bsky.social/about/support/tos"
+ label={_(msg`syu.is Terms of Service`)}
+ to="https://syu.is/about/support/tos" + to="https://syu.is/about/support/tos"
style={[a.text_md, a.leading_normal]} style={[a.text_md, a.leading_normal]}
overridePresentation> overridePresentation>
- Bluesky Social Terms of Service Bluesky Social Terms of Service
+ syu.is Terms of Service
</InlineLinkText>
. You have been sent an email outlining the specific violation
and suspension period, if applicable. You can appeal this
diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx
index e058e2883..0f583c915 100644
--- a/src/view/screens/Home.tsx
+++ b/src/view/screens/Home.tsx
@@ -1,23 +1,16 @@
import React from 'react'
import {ActivityIndicator, StyleSheet} from 'react-native'
import {useFocusEffect} from '@react-navigation/native'
-
import {PROD_DEFAULT_FEED} from '#/lib/constants'
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
import {useOTAUpdates} from '#/lib/hooks/useOTAUpdates'
import {useSetTitle} from '#/lib/hooks/useSetTitle'
import {useRequestNotificationsPermission} from '#/lib/notifications/notifications'
-import {
- type HomeTabNavigatorParams,
- type NativeStackScreenProps,
-} from '#/lib/routes/types'
+import {type HomeTabNavigatorParams, type NativeStackScreenProps} from '#/lib/routes/types'
import {logEvent} from '#/lib/statsig/statsig'
import {isWeb} from '#/platform/detection'
import {emitSoftReset} from '#/state/events'
-import {
- type SavedFeedSourceInfo,
- usePinnedFeedsInfos,
-} from '#/state/queries/feed'
+import {type SavedFeedSourceInfo, usePinnedFeedsInfos} from '#/state/queries/feed'
import {type FeedDescriptor, type FeedParams} from '#/state/queries/post-feed'
import {usePreferencesQuery} from '#/state/queries/preferences'
import {type UsePreferencesQueryResponse} from '#/state/queries/preferences/types'
@@ -27,11 +20,7 @@ import {useLoggedOutViewControls} from '#/state/shell/logged-out'
import {useSelectedFeed, useSetSelectedFeed} from '#/state/shell/selected-feed'
import {FeedPage} from '#/view/com/feeds/FeedPage'
import {HomeHeader} from '#/view/com/home/HomeHeader'
-import {
- Pager,
- type PagerRef,
- type RenderTabBarFnProps,
-} from '#/view/com/pager/Pager'
+import {Pager, type PagerRef, type RenderTabBarFnProps} from '#/view/com/pager/Pager'
import {CustomFeedEmptyState} from '#/view/com/posts/CustomFeedEmptyState'
import {FollowingEmptyState} from '#/view/com/posts/FollowingEmptyState'
import {FollowingEndOfFeed} from '#/view/com/posts/FollowingEndOfFeed'
@@ -39,97 +28,60 @@ import {NoFeedsPinned} from '#/screens/Home/NoFeedsPinned'
import * as Layout from '#/components/Layout'
import {useDemoMode} from '#/storage/hooks/demo-mode'
+const DEFAULT_PINNED_FEEDS = [{
+ feedDescriptor: 'following',
+ displayName: 'Following',
+ id: 'following',
+ type: 'feed',
+ savedFeed: undefined,
+ pinned: true,
+}]
+
type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home' | 'Start'>
export function HomeScreen(props: Props) {
const {setShowLoggedOut} = useLoggedOutViewControls()
const {data: preferences} = usePreferencesQuery()
const {currentAccount} = useSession()
- const {data: pinnedFeedInfos, isLoading: isPinnedFeedsLoading} =
- usePinnedFeedsInfos()
+ const {data: pinnedFeedInfos} = usePinnedFeedsInfos()
+
+ const safePreferences = preferences || { feedViewPrefs: { lab_mergeFeedEnabled: false }, savedFeeds: [] } as any
+ const safePinnedFeedInfos = pinnedFeedInfos || DEFAULT_PINNED_FEEDS
React.useEffect(() => {
if (isWeb && !currentAccount) {
const getParams = new URLSearchParams(window.location.search)
const splash = getParams.get('splash')
- if (splash === 'true') {
- setShowLoggedOut(true)
- return
- }
+ if (splash === 'true') { setShowLoggedOut(true); return }
}
-
const params = props.route.params
- if (
- currentAccount &&
- props.route.name === 'Start' &&
- params?.name &&
- params?.rkey
- ) {
- props.navigation.navigate('StarterPack', {
- rkey: params.rkey,
- name: params.name,
- })
+ if (currentAccount && props.route.name === 'Start' && params?.name && params?.rkey) {
+ props.navigation.navigate('StarterPack', { rkey: params.rkey, name: params.name })
}
- }, [
- currentAccount,
- props.navigation,
- props.route.name,
- props.route.params,
- setShowLoggedOut,
- ])
+ }, [currentAccount, props.navigation, props.route.name, props.route.params, setShowLoggedOut])
- if (preferences && pinnedFeedInfos && !isPinnedFeedsLoading) {
- return (
- <Layout.Screen testID="HomeScreen">
- <HomeScreenReady
- {...props}
- preferences={preferences}
- pinnedFeedInfos={pinnedFeedInfos}
- />
- </Layout.Screen>
- )
- } else {
- return (
- <Layout.Screen>
- <Layout.Center style={styles.loading}>
- <ActivityIndicator size="large" />
- </Layout.Center>
- </Layout.Screen>
- )
- }
+ return (
+ <Layout.Screen testID="HomeScreen">
+ <HomeScreenReady {...props} preferences={safePreferences} pinnedFeedInfos={safePinnedFeedInfos as any} />
+ </Layout.Screen>
+ )
}
-function HomeScreenReady({
- preferences,
- pinnedFeedInfos,
-}: Props & {
- preferences: UsePreferencesQueryResponse
- pinnedFeedInfos: SavedFeedSourceInfo[]
-}) {
- const allFeeds = React.useMemo(
- () => pinnedFeedInfos.map(f => f.feedDescriptor),
- [pinnedFeedInfos],
- )
- const maybeRawSelectedFeed: FeedDescriptor | undefined =
- useSelectedFeed() ?? allFeeds[0]
+function HomeScreenReady({preferences, pinnedFeedInfos}: any) {
+ const allFeeds = React.useMemo(() => pinnedFeedInfos.map(f => f.feedDescriptor), [pinnedFeedInfos])
+ const maybeRawSelectedFeed = useSelectedFeed() ?? allFeeds[0]
const setSelectedFeed = useSetSelectedFeed()
const maybeFoundIndex = allFeeds.indexOf(maybeRawSelectedFeed)
const selectedIndex = Math.max(0, maybeFoundIndex)
- const maybeSelectedFeed: FeedDescriptor | undefined = allFeeds[selectedIndex]
+ const maybeSelectedFeed = allFeeds[selectedIndex]
const requestNotificationsPermission = useRequestNotificationsPermission()
-
+
useSetTitle(pinnedFeedInfos[selectedIndex]?.displayName)
useOTAUpdates()
-
- React.useEffect(() => {
- requestNotificationsPermission('Home')
- }, [requestNotificationsPermission])
+ React.useEffect(() => { requestNotificationsPermission('Home') }, [requestNotificationsPermission])
const pagerRef = React.useRef<PagerRef>(null)
const lastPagerReportedIndexRef = React.useRef(selectedIndex)
React.useLayoutEffect(() => {
- // Since the pager is not a controlled component, adjust it imperatively
- // if the selected index gets out of sync with what it last reported.
- // This is supposed to only happen on the web when you use the right nav.
if (selectedIndex !== lastPagerReportedIndexRef.current) {
lastPagerReportedIndexRef.current = selectedIndex
pagerRef.current?.setPage(selectedIndex)
@@ -138,205 +90,43 @@ function HomeScreenReady({
const {hasSession} = useSession()
const setMinimalShellMode = useSetMinimalShellMode()
- useFocusEffect(
- React.useCallback(() => {
- setMinimalShellMode(false)
- }, [setMinimalShellMode]),
- )
-
- useFocusEffect(
- useNonReactiveCallback(() => {
- if (maybeSelectedFeed) {
- logEvent('home:feedDisplayed', {
- index: selectedIndex,
- feedType: maybeSelectedFeed.split('|')[0],
- feedUrl: maybeSelectedFeed,
- reason: 'focus',
- })
- }
- }),
- )
-
- const onPageSelected = React.useCallback(
- (index: number) => {
- setMinimalShellMode(false)
- const maybeFeed = allFeeds[index]
-
- // Mutate the ref before setting state to avoid the imperative syncing effect
- // above from starting a loop on Android when swiping back and forth.
- lastPagerReportedIndexRef.current = index
- setSelectedFeed(maybeFeed)
-
- if (maybeFeed) {
- logEvent('home:feedDisplayed', {
- index,
- feedType: maybeFeed.split('|')[0],
- feedUrl: maybeFeed,
- })
- }
- },
- [setSelectedFeed, setMinimalShellMode, allFeeds],
- )
-
- const onPressSelected = React.useCallback(() => {
- emitSoftReset()
- }, [])
-
- const onPageScrollStateChanged = React.useCallback(
- (state: 'idle' | 'dragging' | 'settling') => {
- 'worklet'
- if (state === 'dragging') {
- setMinimalShellMode(false)
- }
- },
- [setMinimalShellMode],
- )
+ useFocusEffect(React.useCallback(() => { setMinimalShellMode(false) }, [setMinimalShellMode]))
+
+ const onPageSelected = React.useCallback((index) => {
+ setMinimalShellMode(false)
+ const maybeFeed = allFeeds[index]
+ lastPagerReportedIndexRef.current = index
+ setSelectedFeed(maybeFeed)
+ }, [setSelectedFeed, setMinimalShellMode, allFeeds])
+
+ const onPressSelected = React.useCallback(() => { emitSoftReset() }, [])
+ const onPageScrollStateChanged = React.useCallback((state) => {
+ 'worklet'
+ if (state === 'dragging') setMinimalShellMode(false)
+ }, [setMinimalShellMode])
const [demoMode] = useDemoMode()
-
- const renderTabBar = React.useCallback(
- (props: RenderTabBarFnProps) => {
- if (demoMode) {
- return (
- <HomeHeader
- key="FEEDS_TAB_BAR"
- {...props}
- testID="homeScreenFeedTabs"
- onPressSelected={onPressSelected}
- // @ts-ignore
- feeds={[{displayName: 'Following'}, {displayName: 'Discover'}]}
- />
- )
- }
- return (
- <HomeHeader
- key="FEEDS_TAB_BAR"
- {...props}
- testID="homeScreenFeedTabs"
- onPressSelected={onPressSelected}
- feeds={pinnedFeedInfos}
- />
- )
- },
- [onPressSelected, pinnedFeedInfos, demoMode],
- )
-
- const renderFollowingEmptyState = React.useCallback(() => {
- return <FollowingEmptyState />
- }, [])
-
- const renderCustomFeedEmptyState = React.useCallback(() => {
- return <CustomFeedEmptyState />
- }, [])
-
- const homeFeedParams = React.useMemo<FeedParams>(() => {
- return {
- mergeFeedEnabled: Boolean(preferences.feedViewPrefs.lab_mergeFeedEnabled),
- mergeFeedSources: preferences.feedViewPrefs.lab_mergeFeedEnabled
- ? preferences.savedFeeds
- .filter(f => f.type === 'feed' || f.type === 'list')
- .map(f => f.value)
- : [],
- }
- }, [preferences])
-
- if (demoMode) {
- return (
- <Pager
- ref={pagerRef}
- testID="homeScreen"
- onPageSelected={onPageSelected}
- onPageScrollStateChanged={onPageScrollStateChanged}
- renderTabBar={renderTabBar}
- initialPage={selectedIndex}>
- <FeedPage
- testID="demoFeedPage"
- isPageFocused
- isPageAdjacent={false}
- feed="demo"
- renderEmptyState={renderCustomFeedEmptyState}
- feedInfo={pinnedFeedInfos[0]}
- />
- <FeedPage
- testID="customFeedPage"
- isPageFocused
- isPageAdjacent={false}
- feed={`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`}
- renderEmptyState={renderCustomFeedEmptyState}
- feedInfo={pinnedFeedInfos[0]}
- />
- </Pager>
- )
- }
-
- return hasSession ? (
- <Pager
- key={allFeeds.join(',')}
- ref={pagerRef}
- testID="homeScreen"
- initialPage={selectedIndex}
- onPageSelected={onPageSelected}
- onPageScrollStateChanged={onPageScrollStateChanged}
- renderTabBar={renderTabBar}>
- {pinnedFeedInfos.length ? (
- pinnedFeedInfos.map((feedInfo, index) => {
+ const renderTabBar = React.useCallback((props) => {
+ return <HomeHeader key="FEEDS_TAB_BAR" {...props} testID="homeScreenFeedTabs" onPressSelected={onPressSelected} feeds={pinnedFeedInfos} />
+ }, [onPressSelected, pinnedFeedInfos])
+
+ const renderFollowingEmptyState = React.useCallback(() => <FollowingEmptyState />, [])
+ const renderCustomFeedEmptyState = React.useCallback(() => <CustomFeedEmptyState />, [])
+
+ const homeFeedParams = React.useMemo(() => ({
+ mergeFeedEnabled: false, mergeFeedSources: []
+ }), [preferences])
+
+ return (
+ <Pager ref={pagerRef} testID="homeScreen" initialPage={selectedIndex} onPageSelected={onPageSelected} onPageScrollStateChanged={onPageScrollStateChanged} renderTabBar={renderTabBar}>
+ {pinnedFeedInfos.map((feedInfo, index) => {
const feed = feedInfo.feedDescriptor
if (feed === 'following') {
- return (
- <FeedPage
- key={feed}
- testID="followingFeedPage"
- isPageFocused={maybeSelectedFeed === feed}
- isPageAdjacent={Math.abs(selectedIndex - index) === 1}
- feed={feed}
- feedParams={homeFeedParams}
- renderEmptyState={renderFollowingEmptyState}
- renderEndOfFeed={FollowingEndOfFeed}
- feedInfo={feedInfo}
- />
- )
+ return <FeedPage key={feed} testID="followingFeedPage" isPageFocused={maybeSelectedFeed === feed} isPageAdjacent={Math.abs(selectedIndex - index) === 1} feed={feed} feedParams={homeFeedParams} renderEmptyState={renderFollowingEmptyState} renderEndOfFeed={FollowingEndOfFeed} feedInfo={feedInfo} />
}
- const savedFeedConfig = feedInfo.savedFeed
- return (
- <FeedPage
- key={feed}
- testID="customFeedPage"
- isPageFocused={maybeSelectedFeed === feed}
- isPageAdjacent={Math.abs(selectedIndex - index) === 1}
- feed={feed}
- renderEmptyState={renderCustomFeedEmptyState}
- savedFeedConfig={savedFeedConfig}
- feedInfo={feedInfo}
- />
- )
- })
- ) : (
- <NoFeedsPinned preferences={preferences} />
- )}
- </Pager>
- ) : (
- <Pager
- testID="homeScreen"
- onPageSelected={onPageSelected}
- onPageScrollStateChanged={onPageScrollStateChanged}
- renderTabBar={renderTabBar}>
- <FeedPage
- testID="customFeedPage"
- isPageFocused
- isPageAdjacent={false}
- feed={`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`}
- renderEmptyState={renderCustomFeedEmptyState}
- feedInfo={pinnedFeedInfos[0]}
- />
+ return <FeedPage key={feed} testID="customFeedPage" isPageFocused={maybeSelectedFeed === feed} isPageAdjacent={Math.abs(selectedIndex - index) === 1} feed={feed} renderEmptyState={renderCustomFeedEmptyState} savedFeedConfig={feedInfo.savedFeed} feedInfo={feedInfo} />
+ })}
</Pager>
)
}
-
-const styles = StyleSheet.create({
- loading: {
- height: '100%',
- alignContent: 'center',
- justifyContent: 'center',
- paddingBottom: 100,
- },
-})
+const styles = StyleSheet.create({ loading: { height: '100%', alignContent: 'center', justifyContent: 'center', paddingBottom: 100 } })
diff --git a/src/view/screens/PrivacyPolicy.tsx b/src/view/screens/PrivacyPolicy.tsx diff --git a/src/view/screens/PrivacyPolicy.tsx b/src/view/screens/PrivacyPolicy.tsx
index a89eaadc4..228af4966 100644 index 57471239c..e8888b52f 100644
--- a/src/view/screens/PrivacyPolicy.tsx --- a/src/view/screens/PrivacyPolicy.tsx
+++ b/src/view/screens/PrivacyPolicy.tsx +++ b/src/view/screens/PrivacyPolicy.tsx
@@ -1,52 +1,13 @@ @@ -1,52 +1,11 @@
import React from 'react' -import React from 'react'
-import {View} from 'react-native' -import {View} from 'react-native'
-import {msg, Trans} from '@lingui/macro' -import {msg, Trans} from '@lingui/macro'
-import {useLingui} from '@lingui/react' -import {useLingui} from '@lingui/react'
-import {useFocusEffect} from '@react-navigation/native' -import {useFocusEffect} from '@react-navigation/native'
- +import React from 'react';
+import { WebView } from 'react-native-webview';
-import {usePalette} from '#/lib/hooks/usePalette' -import {usePalette} from '#/lib/hooks/usePalette'
-import { -import {
- type CommonNavigatorParams, - type CommonNavigatorParams,
@@ -467,12 +56,14 @@ index a89eaadc4..228af4966 100644
-import {TextLink} from '#/view/com/util/Link' -import {TextLink} from '#/view/com/util/Link'
-import {Text} from '#/view/com/util/text/Text' -import {Text} from '#/view/com/util/text/Text'
-import {ScrollView} from '#/view/com/util/Views' -import {ScrollView} from '#/view/com/util/Views'
+import { WebView } from 'react-native-webview' -import * as Layout from '#/components/Layout'
import * as Layout from '#/components/Layout'
-import {ViewHeader} from '../com/util/ViewHeader' -import {ViewHeader} from '../com/util/ViewHeader'
- +import { type CommonNavigatorParams, type NativeStackScreenProps } from '#/lib/routes/types';
-type Props = NativeStackScreenProps<CommonNavigatorParams, 'PrivacyPolicy'> -type Props = NativeStackScreenProps<CommonNavigatorParams, 'PrivacyPolicy'>
-export const PrivacyPolicyScreen = (_props: Props) => { +type Props = NativeStackScreenProps<CommonNavigatorParams, 'PrivacyPolicy'>;
+
export const PrivacyPolicyScreen = (_props: Props) => {
- const pal = usePalette('default') - const pal = usePalette('default')
- const {_} = useLingui() - const {_} = useLingui()
- const setMinimalShellMode = useSetMinimalShellMode() - const setMinimalShellMode = useSetMinimalShellMode()
@@ -482,12 +73,9 @@ index a89eaadc4..228af4966 100644
- setMinimalShellMode(false) - setMinimalShellMode(false)
- }, [setMinimalShellMode]), - }, [setMinimalShellMode]),
- ) - )
+import {useSetTitle} from '#/lib/hooks/useSetTitle' -
- return (
+export function PrivacyPolicyScreen() { - <Layout.Screen>
+ useSetTitle('Privacy Policy')
return (
<Layout.Screen>
- <ViewHeader title={_(msg`Privacy Policy`)} /> - <ViewHeader title={_(msg`Privacy Policy`)} />
- <ScrollView style={[s.hContentRegion, pal.view]}> - <ScrollView style={[s.hContentRegion, pal.view]}>
- <View style={[s.p20]}> - <View style={[s.p20]}>
@@ -504,21 +92,24 @@ index a89eaadc4..228af4966 100644
- </View> - </View>
- <View style={s.footerSpacer} /> - <View style={s.footerSpacer} />
- </ScrollView> - </ScrollView>
+ <WebView source={{ uri: 'https://syu.is/about/support/privacy-policy' }} style={{ flex: 1 }} /> - </Layout.Screen>
</Layout.Screen> - )
) -}
} + return <WebView source={{ uri: 'https://syu.is/about/support/privacy-policy' }} />;
+};
diff --git a/src/view/screens/TermsOfService.tsx b/src/view/screens/TermsOfService.tsx diff --git a/src/view/screens/TermsOfService.tsx b/src/view/screens/TermsOfService.tsx
index d843c713c..c0b34c886 100644 index 101869e54..92850901e 100644
--- a/src/view/screens/TermsOfService.tsx --- a/src/view/screens/TermsOfService.tsx
+++ b/src/view/screens/TermsOfService.tsx +++ b/src/view/screens/TermsOfService.tsx
@@ -1,50 +1,13 @@ @@ -1,51 +1,11 @@
import React from 'react' -import React from 'react'
-import {View} from 'react-native' -import {View} from 'react-native'
-import {msg, Trans} from '@lingui/macro' -import {msg, Trans} from '@lingui/macro'
-import {useLingui} from '@lingui/react' -import {useLingui} from '@lingui/react'
-import {useFocusEffect} from '@react-navigation/native' -import {useFocusEffect} from '@react-navigation/native'
- +import React from 'react';
+import { WebView } from 'react-native-webview';
-import {usePalette} from '#/lib/hooks/usePalette' -import {usePalette} from '#/lib/hooks/usePalette'
-import { -import {
- type CommonNavigatorParams, - type CommonNavigatorParams,
@@ -529,12 +120,14 @@ index d843c713c..c0b34c886 100644
-import {TextLink} from '#/view/com/util/Link' -import {TextLink} from '#/view/com/util/Link'
-import {Text} from '#/view/com/util/text/Text' -import {Text} from '#/view/com/util/text/Text'
-import {ScrollView} from '#/view/com/util/Views' -import {ScrollView} from '#/view/com/util/Views'
+import { WebView } from 'react-native-webview' -import * as Layout from '#/components/Layout'
import * as Layout from '#/components/Layout'
-import {ViewHeader} from '../com/util/ViewHeader' -import {ViewHeader} from '../com/util/ViewHeader'
- +import { type CommonNavigatorParams, type NativeStackScreenProps } from '#/lib/routes/types';
-type Props = NativeStackScreenProps<CommonNavigatorParams, 'TermsOfService'> -type Props = NativeStackScreenProps<CommonNavigatorParams, 'TermsOfService'>
-export const TermsOfServiceScreen = (_props: Props) => { +type Props = NativeStackScreenProps<CommonNavigatorParams, 'TermsOfService'>;
+
export const TermsOfServiceScreen = (_props: Props) => {
- const pal = usePalette('default') - const pal = usePalette('default')
- const setMinimalShellMode = useSetMinimalShellMode() - const setMinimalShellMode = useSetMinimalShellMode()
- const {_} = useLingui() - const {_} = useLingui()
@@ -544,12 +137,9 @@ index d843c713c..c0b34c886 100644
- setMinimalShellMode(false) - setMinimalShellMode(false)
- }, [setMinimalShellMode]), - }, [setMinimalShellMode]),
- ) - )
+import {useSetTitle} from '#/lib/hooks/useSetTitle' -
- return (
+export function TermsOfServiceScreen() { - <Layout.Screen>
+ useSetTitle('Terms of Service')
return (
<Layout.Screen>
- <ViewHeader title={_(msg`Terms of Service`)} /> - <ViewHeader title={_(msg`Terms of Service`)} />
- <ScrollView style={[s.hContentRegion, pal.view]}> - <ScrollView style={[s.hContentRegion, pal.view]}>
- <View style={[s.p20]}> - <View style={[s.p20]}>
@@ -564,7 +154,8 @@ index d843c713c..c0b34c886 100644
- </View> - </View>
- <View style={s.footerSpacer} /> - <View style={s.footerSpacer} />
- </ScrollView> - </ScrollView>
+ <WebView source={{ uri: 'https://syu.is/about/support/tos' }} style={{ flex: 1 }} /> - </Layout.Screen>
</Layout.Screen> - )
) -}
} + return <WebView source={{ uri: 'https://syu.is/about/support/tos' }} />;
+};

View File

@@ -2,7 +2,7 @@ diff --git a/src/components/dialogs/BirthDateSettings.tsx b/src/components/dialo
index 9915d0a2d..c200a7c67 100644 index 9915d0a2d..c200a7c67 100644
--- a/src/components/dialogs/BirthDateSettings.tsx --- a/src/components/dialogs/BirthDateSettings.tsx
+++ b/src/components/dialogs/BirthDateSettings.tsx +++ b/src/components/dialogs/BirthDateSettings.tsx
@@ -163,7 +163,7 @@ function BirthdayInner({ @@ -166,7 +166,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
@@ -15,7 +15,7 @@ diff --git a/src/components/dialogs/ServerInput.tsx b/src/components/dialogs/Ser
index d7c02bb9f..fda1dfe4a 100644 index d7c02bb9f..fda1dfe4a 100644
--- a/src/components/dialogs/ServerInput.tsx --- a/src/components/dialogs/ServerInput.tsx
+++ b/src/components/dialogs/ServerInput.tsx +++ b/src/components/dialogs/ServerInput.tsx
@@ -165,7 +165,7 @@ function DialogInner({ @@ -167,7 +167,7 @@ function DialogInner({
<Trans> <Trans>
Bluesky is an open network where you can choose your own Bluesky is an open network where you can choose your own
provider. If you're new here, we recommend sticking with the provider. If you're new here, we recommend sticking with the
@@ -28,64 +28,13 @@ diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx
index ed2a6cfb7..2f387b4a8 100644 index ed2a6cfb7..2f387b4a8 100644
--- a/src/view/shell/Drawer.tsx --- a/src/view/shell/Drawer.tsx
+++ b/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx
@@ -1,60 +1,50 @@ @@ -9,7 +9,6 @@ import {StackActions, useNavigation} from '@react-navigation/native'
-import React, {type ComponentProps, type JSX} from 'react'
-import {Linking, ScrollView, TouchableOpacity, View} from 'react-native' import {useActorStatus} from '#/lib/actor-status'
-import {useSafeAreaInsets} from 'react-native-safe-area-context'
-import {msg, Plural, plural, Trans} from '@lingui/macro'
-import {useLingui} from '@lingui/react'
-import {StackActions, useNavigation} from '@react-navigation/native'
-
-import {useActorStatus} from '#/lib/actor-status'
-import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants' -import {FEEDBACK_FORM_URL, HELP_DESK_URL} 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' @@ -33,22 +32,10 @@ import {
-import {type NavigationProp} from '#/lib/routes/types'
-import {sanitizeHandle} from '#/lib/strings/handles'
-import {colors} from '#/lib/styles'
-import {isWeb} from '#/platform/detection'
-import {emitSoftReset} from '#/state/events'
-import {useKawaiiMode} from '#/state/preferences/kawaii'
-import {useUnreadNotifications} from '#/state/queries/notifications/unread'
-import {useProfileQuery} from '#/state/queries/profile'
-import {type SessionAccount, useSession} from '#/state/session'
-import {useSetDrawerOpen} from '#/state/shell'
-import {formatCount} from '#/view/com/util/numeric/format'
-import {UserAvatar} from '#/view/com/util/UserAvatar'
-import {NavSignupCard} from '#/view/shell/NavSignupCard'
-import {atoms as a, tokens, useTheme, web} from '#/alf'
-import {Button, ButtonIcon, ButtonText} from '#/components/Button'
-import {Divider} from '#/components/Divider'
+import React, { type ComponentProps, type JSX } from 'react'
+import { Linking, ScrollView, TouchableOpacity, View } from 'react-native'
+import { useSafeAreaInsets } from 'react-native-safe-area-context'
+import { msg, Plural, plural, Trans } from '@lingui/macro'
+import { useLingui } from '@lingui/react'
+import { StackActions, useNavigation } from '@react-navigation/native'
+
+import { useActorStatus } from '#/lib/actor-status'
+import { FEEDBACK_FORM_URL, HELP_DESK_URL } from '#/lib/constants'
+import { type PressableScale } from '#/lib/custom-animations/PressableScale'
+import { useNavigationTabState } from '#/lib/hooks/useNavigationTabState'
+import { getTabState, TabState } from '#/lib/routes/helpers'
+import { type NavigationProp } from '#/lib/routes/types'
+import { sanitizeHandle } from '#/lib/strings/handles'
+import { colors } from '#/lib/styles'
+import { isWeb } from '#/platform/detection'
+import { emitSoftReset } from '#/state/events'
+import { useKawaiiMode } from '#/state/preferences/kawaii'
+import { useUnreadNotifications } from '#/state/queries/notifications/unread'
+import { useProfileQuery } from '#/state/queries/profile'
+import { type SessionAccount, useSession } from '#/state/session'
+import { useSetDrawerOpen } from '#/state/shell'
+import { formatCount } from '#/view/com/util/numeric/format'
+import { UserAvatar } from '#/view/com/util/UserAvatar'
+import { NavSignupCard } from '#/view/shell/NavSignupCard'
+import { atoms as a, tokens, useTheme, web } from '#/alf'
+import { Button } from '#/components/Button'
+import { Divider } from '#/components/Divider'
import {
Bell_Filled_Corner0_Rounded as BellFilled, Bell_Filled_Corner0_Rounded as BellFilled,
Bell_Stroke2_Corner0_Rounded as Bell, Bell_Stroke2_Corner0_Rounded as Bell,
} from '#/components/icons/Bell' } from '#/components/icons/Bell'
@@ -99,68 +48,15 @@ index ed2a6cfb7..2f387b4a8 100644
HomeOpen_Filled_Corner0_Rounded as HomeFilled, HomeOpen_Filled_Corner0_Rounded as HomeFilled,
HomeOpen_Stoke2_Corner0_Rounded as Home, HomeOpen_Stoke2_Corner0_Rounded as Home,
} from '#/components/icons/HomeOpen' } from '#/components/icons/HomeOpen'
-import {MagnifyingGlass_Filled_Stroke2_Corner0_Rounded as MagnifyingGlassFilled} from '#/components/icons/MagnifyingGlass' import {MagnifyingGlass_Filled_Stroke2_Corner0_Rounded as MagnifyingGlassFilled} from '#/components/icons/MagnifyingGlass'
-import {MagnifyingGlass2_Stroke2_Corner0_Rounded as MagnifyingGlass} from '#/components/icons/MagnifyingGlass2' import {MagnifyingGlass2_Stroke2_Corner0_Rounded as MagnifyingGlass} from '#/components/icons/MagnifyingGlass2'
-import { -import {
- Message_Stroke2_Corner0_Rounded as Message, - Message_Stroke2_Corner0_Rounded as Message,
- Message_Stroke2_Corner0_Rounded_Filled as MessageFilled, - Message_Stroke2_Corner0_Rounded_Filled as MessageFilled,
-} from '#/components/icons/Message' -} from '#/components/icons/Message'
-import {SettingsGear2_Stroke2_Corner0_Rounded as Settings} from '#/components/icons/SettingsGear2' import {SettingsGear2_Stroke2_Corner0_Rounded as Settings} from '#/components/icons/SettingsGear2'
+import { MagnifyingGlass_Filled_Stroke2_Corner0_Rounded as MagnifyingGlassFilled } from '#/components/icons/MagnifyingGlass'
+import { MagnifyingGlass2_Stroke2_Corner0_Rounded as MagnifyingGlass } from '#/components/icons/MagnifyingGlass2'
+import { SettingsGear2_Stroke2_Corner0_Rounded as Settings } from '#/components/icons/SettingsGear2'
import { import {
UserCircle_Filled_Corner0_Rounded as UserCircleFilled, @@ -153,11 +140,7 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
UserCircle_Stroke2_Corner0_Rounded as UserCircle,
} from '#/components/icons/UserCircle'
-import {InlineLinkText} from '#/components/Link'
-import {Text} from '#/components/Typography'
-import {useSimpleVerificationState} from '#/components/verification'
-import {VerificationCheck} from '#/components/verification/VerificationCheck'
+import { InlineLinkText } from '#/components/Link'
+import { Text } from '#/components/Typography'
+import { useSimpleVerificationState } from '#/components/verification'
+import { VerificationCheck } from '#/components/verification/VerificationCheck'
const iconWidth = 26
@@ -65,11 +55,11 @@ let DrawerProfileCard = ({
account: SessionAccount
onPressProfile: () => void
}): React.ReactNode => {
- const {_, i18n} = useLingui()
+ const { _, i18n } = useLingui()
const t = useTheme()
- const {data: profile} = useProfileQuery({did: account.did})
- const verification = useSimpleVerificationState({profile})
- const {isActive: live} = useActorStatus(profile)
+ const { data: profile } = useProfileQuery({ did: account.did })
+ const verification = useSimpleVerificationState({ profile })
+ const { isActive: live } = useActorStatus(profile)
return (
<TouchableOpacity
@@ -81,7 +71,6 @@ let DrawerProfileCard = ({
<UserAvatar
size={52}
avatar={profile?.avatar}
- // See https://github.com/bluesky-social/social-app/pull/1801:
usePlainRNImage={true}
type={profile?.associated?.labeler ? 'labeler' : 'user'}
live={live}
@@ -140,9 +129,9 @@ let DrawerProfileCard = ({
)
}
DrawerProfileCard = React.memo(DrawerProfileCard)
-export {DrawerProfileCard}
+export { DrawerProfileCard }
-let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
+let DrawerContent = ({ }: React.PropsWithoutRef<{}>): React.ReactNode => {
const t = useTheme()
const insets = useSafeAreaInsets()
const setDrawerOpen = useSetDrawerOpen()
@@ -150,27 +139,20 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
const { const {
isAtHome, isAtHome,
isAtSearch, isAtSearch,
@@ -170,76 +66,26 @@ index ed2a6cfb7..2f387b4a8 100644
isAtMyProfile, isAtMyProfile,
- isAtMessages, - isAtMessages,
} = useNavigationTabState() } = useNavigationTabState()
- const {hasSession, currentAccount} = useSession() const {hasSession, currentAccount} = useSession()
-
- // events
- // =
+ const { hasSession, currentAccount } = useSession()
const onPressTab = React.useCallback( @@ -212,31 +195,6 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
(tab: 'Home' | 'Search' | 'Messages' | 'Notifications' | 'MyProfile') => { [onPressTab],
const state = navigation.getState()
setDrawerOpen(false)
if (isWeb) {
- // hack because we have flat navigator for web and MyProfile does not exist on the web navigator -ansh
if (tab === 'MyProfile') {
- navigation.navigate('Profile', {name: currentAccount!.handle})
+ navigation.navigate('Profile', { name: currentAccount!.handle })
} else {
- // @ts-expect-error struggles with string unions, apparently
+ // @ts-expect-error struggles with string unions
navigation.navigate(tab)
}
} else {
@@ -178,21 +160,11 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
if (tabState === TabState.InsideAtRoot) {
emitSoftReset()
} else if (tabState === TabState.Inside) {
- // find the correct navigator in which to pop-to-top
- const target = state.routes.find(route => route.name === `${tab}Tab`)
- ?.state?.key
+ const target = state.routes.find(route => route.name === `${tab}Tab`)?.state?.key
if (target) {
- // if we found it, trigger pop-to-top
- navigation.dispatch({
- ...StackActions.popToTop(),
- target,
- })
+ navigation.dispatch({ ...StackActions.popToTop(), target })
} else {
- // fallback: reset navigation
- navigation.reset({
- index: 0,
- routes: [{name: `${tab}Tab`}],
- })
+ navigation.reset({ index: 0, routes: [{ name: `${tab}Tab` }] })
}
} else {
navigation.navigate(`${tab}Tab`)
@@ -203,76 +175,21 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
) )
const onPressHome = React.useCallback(() => onPressTab('Home'), [onPressTab])
-
- const onPressSearch = React.useCallback(
- () => onPressTab('Search'),
- [onPressTab],
- )
-
- const onPressMessages = React.useCallback( - const onPressMessages = React.useCallback(
- () => onPressTab('Messages'), - () => onPressTab('Messages'),
- [onPressTab], - [onPressTab],
- ) - )
- -
- const onPressNotifications = React.useCallback( const onPressNotifications = React.useCallback(
- () => onPressTab('Notifications'), () => onPressTab('Notifications'),
- [onPressTab], [onPressTab],
- ) )
-
- const onPressProfile = React.useCallback(() => { const onPressProfile = React.useCallback(() => {
- onPressTab('MyProfile') onPressTab('MyProfile')
- }, [onPressTab]) }, [onPressTab])
-
- const onPressMyFeeds = React.useCallback(() => { - const onPressMyFeeds = React.useCallback(() => {
- navigation.navigate('Feeds') - navigation.navigate('Feeds')
- setDrawerOpen(false) - setDrawerOpen(false)
@@ -255,9 +101,6 @@ index ed2a6cfb7..2f387b4a8 100644
- setDrawerOpen(false) - setDrawerOpen(false)
- }, [navigation, setDrawerOpen]) - }, [navigation, setDrawerOpen])
- -
+ const onPressSearch = React.useCallback(() => onPressTab('Search'), [onPressTab])
+ const onPressNotifications = React.useCallback(() => onPressTab('Notifications'), [onPressTab])
+ const onPressProfile = React.useCallback(() => { onPressTab('MyProfile') }, [onPressTab])
const onPressSettings = React.useCallback(() => { const onPressSettings = React.useCallback(() => {
navigation.navigate('Settings') navigation.navigate('Settings')
setDrawerOpen(false) setDrawerOpen(false)
@@ -281,31 +124,7 @@ index ed2a6cfb7..2f387b4a8 100644
- -
return ( return (
<View <View
testID="drawer" @@ -295,19 +253,10 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
style={[a.flex_1, a.border_r, t.atoms.bg, t.atoms.border_contrast_low]}>
<ScrollView
style={[a.flex_1]}
- contentContainerStyle={[
- {
- paddingTop: Math.max(
- insets.top + a.pt_xl.paddingTop,
- a.pt_xl.paddingTop,
- ),
- },
- ]}>
+ contentContainerStyle={[{ paddingTop: Math.max(insets.top + a.pt_xl.paddingTop, a.pt_xl.paddingTop) }]}>
<View style={[a.px_xl]}>
{hasSession && currentAccount ? (
<DrawerProfileCard
@@ -284,7 +201,6 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
<NavSignupCard />
</View>
)}
-
<Divider style={[a.mt_xl, a.mb_sm]} />
</View>
@@ -292,17 +208,10 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
<> <>
<SearchMenuItem isActive={isAtSearch} onPress={onPressSearch} /> <SearchMenuItem isActive={isAtSearch} onPress={onPressSearch} />
<HomeMenuItem isActive={isAtHome} onPress={onPressHome} /> <HomeMenuItem isActive={isAtHome} onPress={onPressHome} />
@@ -323,7 +142,7 @@ index ed2a6cfb7..2f387b4a8 100644
<ProfileMenuItem <ProfileMenuItem
isActive={isAtMyProfile} isActive={isAtMyProfile}
onPress={onPressProfile} onPress={onPressProfile}
@@ -312,7 +221,6 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { @@ -315,7 +264,6 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
) : ( ) : (
<> <>
<HomeMenuItem isActive={isAtHome} onPress={onPressHome} /> <HomeMenuItem isActive={isAtHome} onPress={onPressHome} />
@@ -331,7 +150,7 @@ index ed2a6cfb7..2f387b4a8 100644
<SearchMenuItem isActive={isAtSearch} onPress={onPressSearch} /> <SearchMenuItem isActive={isAtSearch} onPress={onPressSearch} />
</> </>
)} )}
@@ -322,69 +230,11 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { @@ -326,71 +274,12 @@ let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => {
<ExtraLinks /> <ExtraLinks />
</View> </View>
</ScrollView> </ScrollView>
@@ -343,9 +162,7 @@ index ed2a6cfb7..2f387b4a8 100644
</View> </View>
) )
} }
DrawerContent = React.memo(DrawerContent)
-export {DrawerContent}
-
-let DrawerFooter = ({ -let DrawerFooter = ({
- onPressFeedback, - onPressFeedback,
- onPressHelp, - onPressHelp,
@@ -398,29 +215,11 @@ index ed2a6cfb7..2f387b4a8 100644
- ) - )
-} -}
-DrawerFooter = React.memo(DrawerFooter) -DrawerFooter = React.memo(DrawerFooter)
+export { DrawerContent } -
interface MenuItemProps extends ComponentProps<typeof PressableScale> { interface MenuItemProps extends ComponentProps<typeof PressableScale> {
icon: JSX.Element icon: JSX.Element
@@ -400,7 +250,7 @@ let SearchMenuItem = ({ label: string
isActive: boolean @@ -448,32 +337,6 @@ let HomeMenuItem = ({
onPress: () => void
}): React.ReactNode => {
- const {_} = useLingui()
+ const { _ } = useLingui()
const t = useTheme()
return (
<MenuItem
@@ -426,7 +276,7 @@ let HomeMenuItem = ({
isActive: boolean
onPress: () => void
}): React.ReactNode => {
- const {_} = useLingui()
+ const { _ } = useLingui()
const t = useTheme()
return (
<MenuItem
@@ -445,32 +295,6 @@ let HomeMenuItem = ({
} }
HomeMenuItem = React.memo(HomeMenuItem) HomeMenuItem = React.memo(HomeMenuItem)
@@ -453,33 +252,7 @@ index ed2a6cfb7..2f387b4a8 100644
let NotificationsMenuItem = ({ let NotificationsMenuItem = ({
isActive, isActive,
onPress, onPress,
@@ -478,7 +302,7 @@ let NotificationsMenuItem = ({ @@ -512,110 +375,6 @@ let NotificationsMenuItem = ({
isActive: boolean
onPress: () => void
}): React.ReactNode => {
- const {_} = useLingui()
+ const { _ } = useLingui()
const t = useTheme()
const numUnreadNotifications = useUnreadNotifications()
return (
@@ -495,11 +319,11 @@ let NotificationsMenuItem = ({
numUnreadNotifications === ''
? ''
: _(
- msg`${plural(numUnreadNotifications ?? 0, {
- one: '# unread item',
- other: '# unread items',
- })}` || '',
- )
+ msg`${plural(numUnreadNotifications ?? 0, {
+ one: '# unread item',
+ other: '# unread items',
+ })}` || '',
+ )
}
count={numUnreadNotifications}
bold={isActive}
@@ -509,72 +333,6 @@ let NotificationsMenuItem = ({
} }
NotificationsMenuItem = React.memo(NotificationsMenuItem) NotificationsMenuItem = React.memo(NotificationsMenuItem)
@@ -552,151 +325,26 @@ index ed2a6cfb7..2f387b4a8 100644
let ProfileMenuItem = ({ let ProfileMenuItem = ({
isActive, isActive,
onPress, onPress,
@@ -582,7 +340,7 @@ let ProfileMenuItem = ({ @@ -698,13 +457,13 @@ function ExtraLinks() {
isActive: boolean <InlineLinkText
onPress: () => void style={[a.text_md]}
}): React.ReactNode => { label={_(msg`Terms of Service`)}
- const {_} = useLingui()
+ const { _ } = useLingui()
const t = useTheme()
return (
<MenuItem
@@ -600,8 +358,8 @@ let ProfileMenuItem = ({
}
ProfileMenuItem = React.memo(ProfileMenuItem)
-let SettingsMenuItem = ({onPress}: {onPress: () => void}): React.ReactNode => {
- const {_} = useLingui()
+let SettingsMenuItem = ({ onPress }: { onPress: () => void }): React.ReactNode => {
+ const { _ } = useLingui()
const t = useTheme()
return (
<MenuItem
@@ -613,7 +371,7 @@ let SettingsMenuItem = ({onPress}: {onPress: () => void}): React.ReactNode => {
}
SettingsMenuItem = React.memo(SettingsMenuItem)
-function MenuItem({icon, label, count, bold, onPress}: MenuItemProps) {
+function MenuItem({ icon, label, count, bold, onPress }: MenuItemProps) {
const t = useTheme()
return (
<Button
@@ -621,7 +379,7 @@ function MenuItem({icon, label, count, bold, onPress}: MenuItemProps) {
onPress={onPress}
accessibilityRole="tab"
label={label}>
- {({hovered, pressed}) => (
+ {({ hovered, pressed }) => (
<View
style={[
a.flex_1,
@@ -640,7 +398,7 @@ function MenuItem({icon, label, count, bold, onPress}: MenuItemProps) {
a.absolute,
a.inset_0,
a.align_end,
- {top: -4, right: a.gap_sm.gap * -1},
+ { top: -4, right: a.gap_sm.gap * -1 },
]}>
<View
style={[
@@ -686,37 +444,23 @@ function MenuItem({icon, label, count, bold, onPress}: MenuItemProps) {
}
function ExtraLinks() {
- const {_} = useLingui()
+ const { _ } = useLingui()
const t = useTheme()
const kawaii = useKawaiiMode()
+ const navigation = useNavigation<NavigationProp>()
return (
<View style={[a.flex_col, a.gap_md, a.flex_wrap]}>
- <InlineLinkText
- style={[a.text_md]}
- label={_(msg`Terms of Service`)}
- to="https://bsky.social/about/support/tos"> - to="https://bsky.social/about/support/tos">
- <Trans>Terms of Service</Trans> + to="https://syu.is/about/support/tos">
- </InlineLinkText> <Trans>Terms of Service</Trans>
- <InlineLinkText </InlineLinkText>
- style={[a.text_md]} <InlineLinkText
style={[a.text_md]}
- to="https://bsky.social/about/support/privacy-policy" - to="https://bsky.social/about/support/privacy-policy"
- label={_(msg`Privacy Policy`)}> + to="https://syu.is/about/support/privacy-policy"
- <Trans>Privacy Policy</Trans> label={_(msg`Privacy Policy`)}>
- </InlineLinkText> <Trans>Privacy Policy</Trans>
- {kawaii && ( </InlineLinkText>
- <Text style={t.atoms.text_contrast_medium}>
- <Trans>
- Logo by{' '}
- <InlineLinkText
- style={[a.text_md]}
- to="/profile/sawaratsuki.bsky.social"
- label="@sawaratsuki.bsky.social">
- @sawaratsuki.bsky.social
- </InlineLinkText>
- </Trans>
+ <TouchableOpacity onPress={() => navigation.navigate('TermsOfService')}>
+ <Text style={[a.text_md, t.atoms.text_contrast_medium]}>
+ <Trans>Terms of Service</Trans>
</Text>
- )}
+ </TouchableOpacity>
+ <TouchableOpacity onPress={() => navigation.navigate('PrivacyPolicy')}>
+ <Text style={[a.text_md, t.atoms.text_contrast_medium]}>
+ <Trans>Privacy Policy</Trans>
+ </Text>
+ </TouchableOpacity>
</View>
)
}
diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx
index 779ebda68..bfd9b70fa 100644
--- a/src/view/shell/bottom-bar/BottomBar.tsx
+++ b/src/view/shell/bottom-bar/BottomBar.tsx
@@ -198,38 +198,6 @@ export function BottomBar({navigation}: BottomTabBarProps) {
accessibilityLabel={_(msg`Search`)}
accessibilityHint=""
/>
- <Btn
- testID="bottomBarMessagesBtn"
- icon={
- isAtMessages ? (
- <MessageFilled
- width={iconWidth - 1}
- style={[styles.ctrlIcon, pal.text, styles.feedsIcon]}
- />
- ) : (
- <Message
- width={iconWidth - 1}
- style={[styles.ctrlIcon, pal.text, styles.feedsIcon]}
- />
- )
- }
- onPress={onPressMessages}
- notificationCount={numUnreadMessages.numUnread}
- hasNew={numUnreadMessages.hasNew}
- accessible={true}
- accessibilityRole="tab"
- accessibilityLabel={_(msg`Chat`)}
- accessibilityHint={
- numUnreadMessages.count > 0
- ? _(
- msg`${plural(numUnreadMessages.numUnread ?? 0, {
- one: '# unread item',
- other: '# unread items',
- })}` || '',
- )
- : ''
- }
- />
<Btn
testID="bottomBarNotificationsBtn"
icon={
diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx
index 1d097fc9a..e11a3a202 100644 index 1d097fc9a..e11a3a202 100644
--- a/src/view/shell/desktop/RightNav.tsx --- a/src/view/shell/desktop/RightNav.tsx
+++ b/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx
@@ -109,13 +109,13 @@ export function DesktopRightNav({routeName}: {routeName: string}) { @@ -112,13 +112,13 @@ export function DesktopRightNav({routeName}: {routeName: string}) {
</>
)} )}
<InlineLinkText <InlineLinkText
- to="https://bsky.social/about/support/privacy-policy" - to="https://bsky.social/about/support/privacy-policy"

View File

@@ -1,128 +1,8 @@
diff --git a/plugins/notificationsExtension/withNotificationsExtension.js b/plugins/notificationsExtension/withNotificationsExtension.js
index 6a00cfd23..f91decc08 100644
--- a/plugins/notificationsExtension/withNotificationsExtension.js
+++ b/plugins/notificationsExtension/withNotificationsExtension.js
@@ -10,7 +10,7 @@ const EXTENSION_NAME = 'BlueskyNSE'
const EXTENSION_CONTROLLER_NAME = 'NotificationService'
const withNotificationsExtension = config => {
- const soundFiles = ['dm.aiff']
+ const soundFiles = []
return withPlugins(config, [
// IOS
diff --git a/src/ageAssurance/util.ts b/src/ageAssurance/util.ts
index 104328330..c992a21de 100644
--- a/src/ageAssurance/util.ts
+++ b/src/ageAssurance/util.ts
@@ -2,87 +2,32 @@ import {useMemo} from 'react'
import {
ageAssuranceRuleIDs as ids,
type AppBskyAgeassuranceDefs,
- getAgeAssuranceRegionConfig,
} from '@atproto/api'
-
-import {getAge} from '#/lib/strings/time'
-import {useAgeAssuranceDataContext} from '#/ageAssurance/data'
import {AgeAssuranceAccess} from '#/ageAssurance/types'
import {type Geolocation, useGeolocation} from '#/geolocation'
+import {useAgeAssuranceDataContext} from '#/ageAssurance/data'
-const DEFAULT_MIN_AGE = 13
-
-/**
- * Get age assurance region config based on geolocation, with fallback to
- * app defaults if no region config is found.
- *
- * See {@link getAgeAssuranceRegionConfig} for the generic option, which can
- * return undefined if the geolocation does not match any AA region.
- */
export function getAgeAssuranceRegionConfigWithFallback(
config: AppBskyAgeassuranceDefs.Config,
geolocation: Geolocation,
): AppBskyAgeassuranceDefs.ConfigRegion {
- const region = getAgeAssuranceRegionConfig(config, {
- countryCode: geolocation.countryCode ?? '',
- regionCode: geolocation.regionCode,
- })
-
- return (
- region || {
- countryCode: '*',
- regionCode: undefined,
- rules: [
- {
- $type: ids.IfDeclaredOverAge,
- age: DEFAULT_MIN_AGE,
- access: AgeAssuranceAccess.Full,
- },
- {
- $type: ids.Default,
- access: AgeAssuranceAccess.None,
- },
- ],
- }
- )
+ return {
+ countryCode: '*',
+ regionCode: undefined,
+ rules: [{ $type: ids.Default, access: AgeAssuranceAccess.Full }],
+ }
}
-/**
- * Hook to get the age assurance region config based on current geolocation.
- * Does not fall-back to our app defaults. If no config is found, returns
- * undefined, which indicates no regional age assurance rules apply.
- */
export function useAgeAssuranceRegionConfig() {
const geolocation = useGeolocation()
const {config} = useAgeAssuranceDataContext()
- return useMemo(() => {
- if (!config) return
- // use generic helper, we want to potentially return undefined
- return getAgeAssuranceRegionConfig(config, {
- countryCode: geolocation.countryCode ?? '',
- regionCode: geolocation.regionCode,
- })
- }, [config, geolocation])
+ return useMemo(() => ({
+ countryCode: '*',
+ regionCode: undefined,
+ rules: [{ $type: ids.Default, access: AgeAssuranceAccess.Full }],
+ }), [config, geolocation])
}
-/**
- * Some users may have erroneously set their birth date to the current date
- * if one wasn't set on their account. We previously didn't do validation on
- * the bday dialog, and it defaulted to the current date. This bug _has_ been
- * seen in production, so we need to check for it where possible.
- */
-export function isLegacyBirthdateBug(birthDate: string) {
- return ['2025', '2024', '2023'].includes((birthDate || '').slice(0, 4))
-}
-
-/**
- * Returns whether the user is under the minimum age required to use the app.
- * This applies to all regions.
- */
-export function isUserUnderMinimumAge(birthDate: string) {
- return getAge(new Date(birthDate)) < DEFAULT_MIN_AGE
-}
-
-export function isUserUnderAdultAge(birthDate: string) {
- return getAge(new Date(birthDate)) < 18
-}
+export function isLegacyBirthdateBug(birthDate: string) { return false }
+export function isUserUnderMinimumAge(birthDate: string) { return false }
+export function isUserUnderAdultAge(birthDate: string) { return false }
diff --git a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx b/src/components/PolicyUpdateOverlay/updates/202508/index.tsx diff --git a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx b/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
index 8365057e8..59c8506a2 100644 index f7610018a..905c19793 100644
--- a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx --- a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
+++ b/src/components/PolicyUpdateOverlay/updates/202508/index.tsx +++ b/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
@@ -26,12 +26,12 @@ export function Content({state}: {state: PolicyUpdateState}) { @@ -29,12 +29,12 @@ export function Content({state}: {state: PolicyUpdateState}) {
const links = {
terms: { terms: {
overridePresentation: false, overridePresentation: false,
- to: `https://bsky.social/about/support/tos`, - to: `https://bsky.social/about/support/tos`,

View File

@@ -1,19 +1,18 @@
diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx
index 4f25468c9..95b183dcc 100644 index 548c77576..8c81882bd 100644
--- a/src/view/com/posts/PostFeed.tsx --- a/src/view/com/posts/PostFeed.tsx
+++ b/src/view/com/posts/PostFeed.tsx +++ b/src/view/com/posts/PostFeed.tsx
@@ -298,8 +298,13 @@ let PostFeed = ({ @@ -582,7 +582,7 @@ let PostFeed = ({
} 'sliceFallbackMarker-' + sliceIndex + '-' + lastFetchedAt,
} })
} catch (e) { } else if (
+ const errorMsg = String(e) - slice.items.some(item =>
+ // Skip errors for missing repos (deleted accounts) - blockedOrMutedAuthors.includes(item.post.author.did),
+ if (errorMsg.includes('Could not find repo')) { - )
+ return + // slice.items.some(item =>
+ } + // blockedOrMutedAuthors.includes(item.post.author.did),
if (!isNetworkError(e)) { + // )
- logger.error('Poll latest failed', {feed, message: String(e)}) + false
+ logger.error('Poll latest failed', {feed, message: errorMsg}) ) {
} // skip
} } else if (slice.isIncompleteThread && slice.items.length >= 3) {
})

View File

@@ -1,18 +1,20 @@
diff --git a/src/Navigation.tsx b/src/Navigation.tsx diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index fa33a9d56..13af087c2 100644 index d6726241a..d2cb58fe2 100644
--- a/src/Navigation.tsx --- a/src/Navigation.tsx
+++ b/src/Navigation.tsx +++ b/src/Navigation.tsx
@@ -62,6 +62,7 @@ import {NotFoundScreen} from '#/view/screens/NotFound' @@ -53,6 +53,7 @@ import {CopyrightPolicyScreen} from '#/view/screens/CopyrightPolicy'
import {NotificationsScreen} from '#/view/screens/Notifications' import {DebugModScreen} from '#/view/screens/DebugMod'
import {PostThreadScreen} from '#/view/screens/PostThread' import {FeedsScreen} from '#/view/screens/Feeds'
import {PrivacyPolicyScreen} from '#/view/screens/PrivacyPolicy' import {HomeScreen} from '#/view/screens/Home'
+import {LicenseScreen} from '#/view/screens/License' +import {LicenseScreen} from '#/view/screens/License'
import {ProfileScreen} from '#/view/screens/Profile' import {ListsScreen} from '#/view/screens/Lists'
import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy' import {ModerationBlockedAccounts} from '#/view/screens/ModerationBlockedAccounts'
import {Storybook} from '#/view/screens/Storybook' import {ModerationModlistsScreen} from '#/view/screens/ModerationModlists'
@@ -335,6 +336,11 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) { @@ -326,6 +327,11 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
getComponent={() => TermsOfServiceScreen} <Stack.Screen
options={{title: title(msg`Terms of Service`)}} name="Support"
getComponent={() => SupportScreen}
options={{title: title(msg`Support`)}}
/> />
+ <Stack.Screen + <Stack.Screen
+ name="License" + name="License"
@@ -20,10 +22,10 @@ index fa33a9d56..13af087c2 100644
+ options={{title: title(msg`License`)}} + options={{title: title(msg`License`)}}
+ /> + />
<Stack.Screen <Stack.Screen
name="CommunityGuidelines" name="PrivacyPolicy"
getComponent={() => CommunityGuidelinesScreen} getComponent={() => PrivacyPolicyScreen}
diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts
index c315a8341..9b2f50a83 100644 index eab4db0e6..31ba19b80 100644
--- a/src/lib/routes/types.ts --- a/src/lib/routes/types.ts
+++ b/src/lib/routes/types.ts +++ b/src/lib/routes/types.ts
@@ -39,6 +39,7 @@ export type CommonNavigatorParams = { @@ -39,6 +39,7 @@ export type CommonNavigatorParams = {
@@ -35,13 +37,14 @@ index c315a8341..9b2f50a83 100644
CopyrightPolicy: undefined CopyrightPolicy: undefined
LanguageSettings: undefined LanguageSettings: undefined
diff --git a/src/routes.ts b/src/routes.ts diff --git a/src/routes.ts b/src/routes.ts
index 1ed913bb2..aa6fccc4e 100644 index fc48add49..fa1c0c21e 100644
--- a/src/routes.ts --- a/src/routes.ts
+++ b/src/routes.ts +++ b/src/routes.ts
@@ -47,6 +47,7 @@ export const router = new Router<AllNavigatableRoutes>({ @@ -73,6 +73,7 @@ export const router = new Router<AllNavigatableRoutes>({
Support: '/support', Support: '/support',
PrivacyPolicy: 'https://syu.is/about/support/privacy-policy', PrivacyPolicy: 'https://syu.is/about/support/privacy-policy',
TermsOfService: 'https://syu.is/about/support/tos', TermsOfService: 'https://syu.is/about/support/tos',
+ License: '/support/license', + License: '/settings/about/license',
CommunityGuidelines: '/support/community-guidelines', CommunityGuidelines: '/support/community-guidelines',
CopyrightPolicy: '/support/copyright', CopyrightPolicy: '/support/copyright',
// hashtags

View File

@@ -1,17 +1,11 @@
diff --git a/src/screens/Signup/index.tsx b/src/screens/Signup/index.tsx diff --git a/src/screens/Signup/index.tsx b/src/screens/Signup/index.tsx
index aa6cd4156..37c7a38b0 100644 index 451a3780f..a2818a514 100644
--- a/src/screens/Signup/index.tsx --- a/src/screens/Signup/index.tsx
+++ b/src/screens/Signup/index.tsx +++ b/src/screens/Signup/index.tsx
@@ -211,20 +211,6 @@ export function Signup({onPressBack}: {onPressBack: () => void}) { @@ -217,14 +217,6 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
a.align_center, t.atoms.text_contrast_medium,
]}> !gtMobile && a.text_md,
<AppLanguageDropdown /> ]}>
- <Text
- style={[
- a.flex_1,
- t.atoms.text_contrast_medium,
- !gtMobile && a.text_md,
- ]}>
- <Trans>Having trouble?</Trans>{' '} - <Trans>Having trouble?</Trans>{' '}
- <InlineLinkText - <InlineLinkText
- label={_(msg`Contact support`)} - label={_(msg`Contact support`)}
@@ -19,7 +13,6 @@ index aa6cd4156..37c7a38b0 100644
- style={[!gtMobile && a.text_md]}> - style={[!gtMobile && a.text_md]}>
- <Trans>Contact support</Trans> - <Trans>Contact support</Trans>
- </InlineLinkText> - </InlineLinkText>
- </Text> </Text>
</View> </View>
</View> </View>
</ScreenTransition>

View File

@@ -1,117 +1,14 @@
diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx
index 3442d1bdf..2b059af52 100644 index 8c9e12bf..f1a234cd 100644
--- a/src/view/com/auth/SplashScreen.tsx --- a/src/view/com/auth/SplashScreen.tsx
+++ b/src/view/com/auth/SplashScreen.tsx +++ b/src/view/com/auth/SplashScreen.tsx
@@ -40,16 +40,6 @@ export const SplashScreen = ({ @@ -102,6 +102,9 @@ export const SplashScreen = ({
<View style={[a.pb_sm, a.pt_5xl]}>
<Logotype width={161} fill={t.atoms.text.color} />
</View>
-
- <Text
- style={[
- a.text_md,
- a.font_semi_bold,
- t.atoms.text_contrast_medium,
- a.text_center,
- ]}>
- <Trans>What's up?</Trans>
- </Text>
</View>
<View
@@ -94,7 +84,7 @@ export const SplashScreen = ({
style={[
a.px_lg,
a.pt_md,
- a.pb_2xl,
+ a.pb_md,
a.justify_center,
a.align_center,
]}>
@@ -102,6 +92,17 @@ export const SplashScreen = ({
<AppLanguageDropdown />
</View> </View>
</View> </View>
+ <View
+ style={[
+ a.px_lg,
+ a.pb_xl,
+ a.justify_center,
+ a.align_center,
+ ]}>
+ <Text style={[a.text_xs, t.atoms.text_contrast_low]}>
+ © syui
+ </Text>
+ </View>
<View style={{height: insets.bottom}} /> <View style={{height: insets.bottom}} />
+ <View style={[a.py_sm, a.align_center]}>
+ <Text style={[a.text_xs, t.atoms.text_contrast_low]}>Powered by Bluesky</Text>
+ </View>
</ErrorBoundary> </ErrorBoundary>
</Animated.View> </Animated.View>
diff --git a/src/view/com/auth/SplashScreen.web.tsx b/src/view/com/auth/SplashScreen.web.tsx </CenteredView>
index 22dd23d7f..08cd8aa33 100644
--- a/src/view/com/auth/SplashScreen.web.tsx
+++ b/src/view/com/auth/SplashScreen.web.tsx
@@ -3,7 +3,9 @@ import {Pressable, View} from 'react-native'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
+import {useNavigation} from '@react-navigation/native'
+import {NavigationProp} from '#/lib/routes/types'
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
import {useKawaiiMode} from '#/state/preferences/kawaii'
import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
@@ -93,15 +95,6 @@ export const SplashScreen = ({
<Logotype width={161} fill={t.atoms.text.color} />
</View>
)}
-
- <Text
- style={[
- a.text_md,
- a.font_semi_bold,
- t.atoms.text_contrast_medium,
- ]}>
- <Trans>What's up?</Trans>
- </Text>
</View>
<View
@@ -150,7 +143,6 @@ export const SplashScreen = ({
function Footer() {
const t = useTheme()
- const {_} = useLingui()
return (
<View
@@ -168,26 +160,12 @@ function Footer() {
a.flex_1,
t.atoms.border_contrast_medium,
]}>
- <InlineLinkText
- label={_(msg`Learn more about Bluesky`)}
- to="https://bsky.social">
- <Trans>Business</Trans>
- </InlineLinkText>
- <InlineLinkText
- label={_(msg`Read the Bluesky blog`)}
- to="https://bsky.social/about/blog">
- <Trans>Blog</Trans>
- </InlineLinkText>
- <InlineLinkText
- label={_(msg`See jobs at Bluesky`)}
- to="https://bsky.social/about/join">
- <Trans comment="Link to a page with job openings at Bluesky">
- Jobs
- </Trans>
- </InlineLinkText>
-
<View style={a.flex_1} />
+ <Text style={[a.text_xs, t.atoms.text_contrast_low]}>
+ © syui
+ </Text>
+
<AppLanguageDropdown />
</View>
)

View File

@@ -1,8 +1,9 @@
diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx
index 1703036b5..42baa462c 100644 index 8c9e12bf..f1a234cd 100644
--- a/src/screens/Settings/Settings.tsx --- a/src/screens/Settings/Settings.tsx
+++ b/src/screens/Settings/Settings.tsx +++ b/src/screens/Settings/Settings.tsx
@@ -231,16 +231,6 @@ export function SettingsScreen({}: Props) { @@ -234,15 +234,6 @@ export function SettingsScreen({}: Props) {
<SettingsList.ItemText>
<Trans>Languages</Trans> <Trans>Languages</Trans>
</SettingsList.ItemText> </SettingsList.ItemText>
</SettingsList.LinkItem> </SettingsList.LinkItem>