ai/at
1
0

test gemini

This commit is contained in:
2025-12-07 22:38:16 +09:00
parent 61349055af
commit ceca299c06
7 changed files with 231 additions and 173 deletions

View File

@@ -1,53 +1,42 @@
diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index fa33a9d56..a9b724c4e 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -67,6 +67,7 @@ import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy'
import {Storybook} from '#/view/screens/Storybook'
import {SupportScreen} from '#/view/screens/Support'
import {TermsOfServiceScreen} from '#/view/screens/TermsOfService'
+import {LicenseScreen} from '#/view/screens/License'
import {BottomBar} from '#/view/shell/bottom-bar/BottomBar'
import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth'
import {BookmarksScreen} from '#/screens/Bookmarks'
@@ -335,6 +336,11 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) {
getComponent={() => TermsOfServiceScreen}
options={{title: title(msg`Terms of Service`)}}
/>
+ <Stack.Screen
+ name="License"
+ getComponent={() => LicenseScreen}
+ options={{title: title(msg`License`)}}
+ />
<Stack.Screen
name="CommunityGuidelines"
getComponent={() => CommunityGuidelinesScreen}
diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts
index c315a8341..9b2f50a83 100644
--- a/src/lib/routes/types.ts
+++ b/src/lib/routes/types.ts
@@ -39,6 +39,7 @@ export type CommonNavigatorParams = {
Support: undefined
PrivacyPolicy: undefined
TermsOfService: undefined
+ License: undefined
CommunityGuidelines: undefined
CopyrightPolicy: undefined
LanguageSettings: undefined
diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx
index ed2a6cfb7..0b429e6f3 100644
index ed2a6cfb7..b9776af52 100644
--- a/src/view/shell/Drawer.tsx
+++ b/src/view/shell/Drawer.tsx
@@ -460,6 +460,11 @@ function ExtraLinks() {
<Text style={[a.text_md, t.atoms.text_contrast_medium]}>
<Trans>Privacy Policy</Trans>
</Text>
</TouchableOpacity>
@@ -689,21 +689,25 @@ function ExtraLinks() {
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">
- <Trans>Terms of Service</Trans>
- </InlineLinkText>
- <InlineLinkText
- style={[a.text_md]}
- to="https://bsky.social/about/support/privacy-policy"
- label={_(msg`Privacy Policy`)}>
- <Trans>Privacy Policy</Trans>
- </InlineLinkText>
+ <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>
+ <TouchableOpacity onPress={() => navigation.navigate('License')}>
+ <Text style={[a.text_md, t.atoms.text_contrast_medium]}>
+ <Trans>License</Trans>
+ </Text>
+ </TouchableOpacity>
</View>
)
}
{kawaii && (
<Text style={t.atoms.text_contrast_medium}>
<Trans>

View File

@@ -1,73 +1,16 @@
diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx
index 6b8257b91..db64d6a69 100644
index 6b8257b91..88a181dcb 100644
--- a/src/screens/Settings/AboutSettings.tsx
+++ b/src/screens/Settings/AboutSettings.tsx
@@ -1,40 +1,40 @@
-import {useMemo} from 'react'
-import {Platform} from 'react-native'
-import {setStringAsync} from 'expo-clipboard'
+import { useMemo } from 'react'
+import { Platform } from 'react-native'
+import { setStringAsync } from 'expo-clipboard'
import * as FileSystem from 'expo-file-system/legacy'
-import {Image} from 'expo-image'
-import {msg, Trans} from '@lingui/macro'
-import {useLingui} from '@lingui/react'
-import {type NativeStackScreenProps} from '@react-navigation/native-stack'
-import {useMutation} from '@tanstack/react-query'
-import {Statsig} from 'statsig-react-native-expo'
+import { Image } from 'expo-image'
+import { msg, Trans } from '@lingui/macro'
+import { useLingui } from '@lingui/react'
+import { type NativeStackScreenProps } from '@react-navigation/native-stack'
+import { useMutation } from '@tanstack/react-query'
+import { Statsig } from 'statsig-react-native-expo'
-import {STATUS_PAGE_URL} from '#/lib/constants'
-import {type CommonNavigatorParams} from '#/lib/routes/types'
-import {isAndroid, isIOS, isNative} from '#/platform/detection'
+import { STATUS_PAGE_URL } from '#/lib/constants'
+import { type CommonNavigatorParams } from '#/lib/routes/types'
+import { isAndroid, isIOS, isNative } from '#/platform/detection'
import * as Toast from '#/view/com/util/Toast'
import * as SettingsList from '#/screens/Settings/components/SettingsList'
-import {Atom_Stroke2_Corner0_Rounded as AtomIcon} from '#/components/icons/Atom'
-import {BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon} from '#/components/icons/BroomSparkle'
-import {CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon} from '#/components/icons/CodeLines'
-import {Globe_Stroke2_Corner0_Rounded as GlobeIcon} from '#/components/icons/Globe'
-import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/icons/Newspaper'
-import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
+import { Atom_Stroke2_Corner0_Rounded as AtomIcon } from '#/components/icons/Atom'
+import { BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon } from '#/components/icons/BroomSparkle'
+import { CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon } from '#/components/icons/CodeLines'
+import { Globe_Stroke2_Corner0_Rounded as GlobeIcon } from '#/components/icons/Globe'
+import { Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon } from '#/components/icons/Newspaper'
+import { Wrench_Stroke2_Corner2_Rounded as WrenchIcon } from '#/components/icons/Wrench'
import * as Layout from '#/components/Layout'
-import {Loader} from '#/components/Loader'
+import { Loader } from '#/components/Loader'
import * as env from '#/env'
-import {useDemoMode} from '#/storage/hooks/demo-mode'
-import {useDevMode} from '#/storage/hooks/dev-mode'
-import {OTAInfo} from './components/OTAInfo'
+import { useDemoMode } from '#/storage/hooks/demo-mode'
+import { useDevMode } from '#/storage/hooks/dev-mode'
+import { OTAInfo } from './components/OTAInfo'
@@ -28,7 +28,7 @@ import {useDevMode} from '#/storage/hooks/dev-mode'
import {OTAInfo} from './components/OTAInfo'
type Props = NativeStackScreenProps<CommonNavigatorParams, 'AboutSettings'>
-export function AboutSettingsScreen({}: Props) {
- const {_, i18n} = useLingui()
+export function AboutSettingsScreen({ }: Props) {
+ const { _, i18n } = useLingui()
+export function AboutSettingsScreen({navigation}: Props) {
const {_, i18n} = useLingui()
const [devModeEnabled, setDevModeEnabled] = useDevMode()
const [demoModeEnabled, setDemoModeEnabled] = useDemoMode()
const stableID = useMemo(() => Statsig.getStableID(), [])
- const {mutate: onClearImageCache, isPending: isClearingImageCache} =
+ const { mutate: onClearImageCache, isPending: isClearingImageCache } =
useMutation({
mutationFn: async () => {
const freeSpaceBefore = await FileSystem.getFreeDiskStorageAsync()
@@ -80,7 +80,7 @@ export function AboutSettingsScreen({}: Props) {
<Layout.Content>
<SettingsList.Container>
@@ -77,57 +20,27 @@ index 6b8257b91..db64d6a69 100644
label={_(msg`Terms of Service`)}>
<SettingsList.ItemIcon icon={NewspaperIcon} />
<SettingsList.ItemText>
@@ -88,7 +88,15 @@ export function AboutSettingsScreen({}: Props) {
@@ -88,13 +88,22 @@ export function AboutSettingsScreen({}: Props) {
</SettingsList.ItemText>
</SettingsList.LinkItem>
<SettingsList.LinkItem
- to="https://bsky.social/about/support/privacy-policy"
+ to="/support/license"
+ to="https://syu.is/about/support/privacy-policy"
label={_(msg`Privacy Policy`)}>
<SettingsList.ItemIcon icon={NewspaperIcon} />
<SettingsList.ItemText>
<Trans>Privacy Policy</Trans>
</SettingsList.ItemText>
</SettingsList.LinkItem>
+ <SettingsList.PressableItem
+ onPress={() => navigation.navigate('License')}
+ label={_(msg`License`)}>
+ <SettingsList.ItemIcon icon={NewspaperIcon} />
+ <SettingsList.ItemText>
+ <Trans>License</Trans>
+ </SettingsList.ItemText>
+ </SettingsList.LinkItem>
+ <SettingsList.LinkItem
+ to="https://syu.is/about/support/privacy-policy"
label={_(msg`Privacy Policy`)}>
<SettingsList.ItemIcon icon={NewspaperIcon} />
<SettingsList.ItemText>
@@ -131,17 +139,17 @@ export function AboutSettingsScreen({}: Props) {
Toast.show(
newDevModeEnabled
? _(
- msg({
- message: 'Developer mode enabled',
- context: 'toast',
- }),
- )
+ msg({
+ message: 'Developer mode enabled',
+ context: 'toast',
+ }),
+ )
: _(
- msg({
- message: 'Developer mode disabled',
- context: 'toast',
- }),
- ),
+ msg({
+ message: 'Developer mode disabled',
+ context: 'toast',
+ }),
+ ),
)
}}
onPress={() => {
@@ -166,7 +174,7 @@ export function AboutSettingsScreen({}: Props) {
setDemoModeEnabled(newDemoModeEnabled)
Toast.show(
'Demo mode ' +
- (newDemoModeEnabled ? 'enabled' : 'disabled'),
+ (newDemoModeEnabled ? 'enabled' : 'disabled'),
)
}}
label={
+ </SettingsList.PressableItem>
+
<SettingsList.LinkItem
to={STATUS_PAGE_URL}
label={_(msg`Status Page`)}>

View File

@@ -1,21 +1,60 @@
diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx
index e058e2883..e762b1418 100644
--- a/src/view/screens/Home.tsx
+++ b/src/view/screens/Home.tsx
@@ -39,6 +39,16 @@ 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()
diff --git a/src/view/com/posts/FollowingEmptyState.tsx b/src/view/com/posts/FollowingEmptyState.tsx
index 352cc1dc0..06987be51 100644
--- a/src/view/com/posts/FollowingEmptyState.tsx
+++ b/src/view/com/posts/FollowingEmptyState.tsx
@@ -45,36 +45,6 @@ export function FollowingEmptyState() {
happening.
</Trans>
</Text>
- <Button
- type="inverted"
- style={styles.emptyBtn}
- onPress={onPressFindAccounts}>
- <Text type="lg-medium" style={palInverted.text}>
- <Trans>Find accounts to follow</Trans>
- </Text>
- <FontAwesomeIcon
- icon="angle-right"
- style={palInverted.text as FontAwesomeIconStyle}
- size={14}
- />
- </Button>
-
- <Text type="xl-medium" style={[s.textCenter, pal.text, s.mt20]}>
- <Trans>You can also discover new Custom Feeds to follow.</Trans>
- </Text>
- <Button
- type="inverted"
- style={[styles.emptyBtn, s.mt10]}
- onPress={onPressDiscoverFeeds}>
- <Text type="lg-medium" style={palInverted.text}>
- <Trans>Discover new custom feeds</Trans>
- </Text>
- <FontAwesomeIcon
- icon="angle-right"
- style={palInverted.text as FontAwesomeIconStyle}
- size={14}
- />
- </Button>
</View>
</View>
)
diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx
index 4f25468c9..c35ad1c1a 100644
--- a/src/view/com/posts/PostFeed.tsx
+++ b/src/view/com/posts/PostFeed.tsx
@@ -543,14 +543,6 @@ let PostFeed = ({
})
}
} else if (feedKind === 'following') {
- if (sliceIndex === 0) {
- // Show composer prompt for Following feed
- if (hasSession && gate('show_composer_prompt')) {
- arr.push({
- type: 'composerPrompt',
- key: 'composerPrompt-' + sliceIndex,
- })
- }
}
} else if (feedKind === 'profile') {
if (sliceIndex === 5) {

View File

@@ -0,0 +1,91 @@
diff --git a/src/view/icons/Logo.tsx b/src/view/icons/Logo.tsx
index d7208df13..2763800ac 100644
--- a/src/view/icons/Logo.tsx
+++ b/src/view/icons/Logo.tsx
@@ -1,75 +1,17 @@
import React from 'react'
-import {type TextProps} from 'react-native'
-import Svg, {
- Defs,
- LinearGradient,
- Path,
- type PathProps,
- Stop,
- type SvgProps,
-} from 'react-native-svg'
import {Image} from 'expo-image'
+import {flatten} from '#/alf'
-import {useKawaiiMode} from '#/state/preferences/kawaii'
-import {flatten, useTheme} from '#/alf'
-
-const ratio = 57 / 64
-
-type Props = {
- fill?: PathProps['fill']
- style?: TextProps['style']
-} & Omit<SvgProps, 'style'>
-
-export const Logo = React.forwardRef(function LogoImpl(props: Props, ref) {
- const t = useTheme()
- const {fill, ...rest} = props
- const gradient = fill === 'sky'
- const styles = flatten(props.style)
- const _fill = gradient
- ? 'url(#sky)'
- : fill || styles?.color || t.palette.primary_500
- // @ts-ignore it's fiiiiine
- const size = parseInt(rest.width || 32, 10)
-
- const isKawaii = useKawaiiMode()
-
- if (isKawaii) {
- return (
- <Image
- source={
- size > 100
- ? require('../../../assets/kawaii.png')
- : require('../../../assets/kawaii_smol.png')
- }
- accessibilityLabel="Bluesky"
- accessibilityHint=""
- accessibilityIgnoresInvertColors
- style={[{height: size, aspectRatio: 1.4}]}
- />
- )
- }
-
+export const Logo = React.forwardRef(function LogoImpl(props: any, ref) {
+ const {width, style} = props
+ // @ts-ignore
+ const size = parseInt(width || 32, 10)
return (
- <Svg
- fill="none"
- // @ts-ignore it's fiiiiine
- ref={ref}
- viewBox="0 0 64 57"
- {...rest}
- style={[{width: size, height: size * ratio}, styles]}>
- {gradient && (
- <Defs>
- <LinearGradient id="sky" x1="0" y1="0" x2="0" y2="1">
- <Stop offset="0" stopColor="#0A7AFF" stopOpacity="1" />
- <Stop offset="1" stopColor="#59B9FF" stopOpacity="1" />
- </LinearGradient>
- </Defs>
- )}
-
- <Path
- fill={_fill}
- d="M13.873 3.805C21.21 9.332 29.103 20.537 32 26.55v15.882c0-.338-.13.044-.41.867-1.512 4.456-7.418 21.847-20.923 7.944-7.111-7.32-3.819-14.64 9.125-16.85-7.405 1.264-15.73-.825-18.014-9.015C1.12 23.022 0 8.51 0 6.55 0-3.268 8.579-.182 13.873 3.805ZM50.127 3.805C42.79 9.332 34.897 20.537 32 26.55v15.882c0-.338.13.044.41.867 1.512 4.456 7.418 21.847 20.923 7.944 7.111-7.32 3.819-14.64-9.125-16.85 7.405 1.264 15.73-.825 18.014-9.015C62.88 23.022 64 8.51 64 6.55c0-9.818-8.578-6.732-13.873-2.745Z"
- />
- </Svg>
+ <Image
+ source={require('../../../assets/logo.png')}
+ style={[{width: size, height: size}, flatten(style)]}
+ contentFit="contain"
+ accessibilityLabel="Logo"
+ />
)
})

View File

@@ -0,0 +1,20 @@
diff --git a/src/ageAssurance/index.tsx b/src/ageAssurance/index.tsx
index 9a0a9c9d5..908dbd567 100644
--- a/src/ageAssurance/index.tsx
+++ b/src/ageAssurance/index.tsx
@@ -88,12 +88,9 @@ function InnerProvider({children}: {children: React.ReactNode}) {
return (
<AgeAssuranceStateContext.Provider
value={useMemo(() => {
- const chatDisabled = state.access !== AgeAssuranceAccess.Full
- const isUnderage = data?.birthdate
- ? isUserUnderAdultAge(data.birthdate)
- : true
- const adultContentDisabled =
- state.access !== AgeAssuranceAccess.Full || isUnderage
+ const chatDisabled = false
+ const isUnderage = false
+ const adultContentDisabled = false
return {
Access: AgeAssuranceAccess,
Status: AgeAssuranceStatus,

View File

@@ -135,6 +135,8 @@ function ios-copy-new-files() {
# Copy app-icons
if [ -d "$d/ios/app-icons" ]; then
cp -rf "$d/ios/app-icons" "$target_dir/assets/"
cp -rf "$d/ios/icon.png" "$target_dir/assets/"
cp -rf "$d/ios/icon.png" "$target_dir/assets/logo.png"
echo "✅ Copied app-icons"
fi

View File

@@ -2,3 +2,7 @@
- Do not reformat existing code unless explicitly requested.
- Maintain existing import styles (newlines, sorting).
- Keep patches minimal (clean deltas).
## Failure Record
- "Do not reformat/minimal patch" violations: >100 (Recorded at User Request)
- Corrective Action: ALWAYS revert file first. NEVER use auto-format tools. USE string replacement scripts. Verify diff lines < 10.