fix: adjust ios styles

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-01-23 13:56:01 +08:00
parent ff707cf7a4
commit 585aa03b23
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
6 changed files with 56 additions and 9 deletions

View File

@ -2,12 +2,14 @@ import { resolve } from "node:path"
import type { ConfigContext, ExpoConfig } from "expo/config"
import PKG from "./package.json"
// const roundedIconPath = resolve(__dirname, "../../resources/icon.png")
const iconPath = resolve(__dirname, "./assets/icon.png")
const adaptiveIconPath = resolve(__dirname, "./assets/adaptive-icon.png")
export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
extra: {
eas: {
projectId: "a6335b14-fb84-45aa-ba80-6f6ab8926920",
@ -23,7 +25,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
name: "Follow",
slug: "follow",
version: "1.0.0",
version: __DEV__ ? "dev" : PKG.version,
orientation: "portrait",
icon: iconPath,
scheme: "follow",

View File

@ -92,6 +92,7 @@
"shiki": "1.24.1",
"tailwindcss": "3.4.16",
"usehooks-ts": "3.1.0",
"zeego": "2.0.4",
"zod": "3.24.1",
"zustand": "5.0.2"
},

View File

@ -20,7 +20,7 @@ import type {
import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native"
import Animated, { useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated"
import { accentColor } from "@/src/theme/colors"
import { accentColor, useColor } from "@/src/theme/colors"
import type { Tab } from "./types"
@ -210,9 +210,12 @@ const styles = StyleSheet.create({
})
const TabItemInner = ({ tab, isSelected }: { tab: Tab; isSelected: boolean }) => {
const gray = useColor("gray")
return (
<View className="p-2">
<Text style={{ color: isSelected ? accentColor : "gray" }}>{tab.name}</Text>
<Text style={{ color: isSelected ? accentColor : gray }} className="text-[15px] leading-none">
{tab.name}
</Text>
</View>
)
}

View File

@ -47,7 +47,6 @@ export const SearchFeed = () => {
refreshing={isLoading}
onRefresh={refetch}
keyExtractor={keyExtractor}
contentContainerClassName={"-mt-4"}
renderScrollComponent={RenderScrollComponent}
data={data?.data}
renderItem={renderItem}
@ -68,7 +67,7 @@ const SearchFeedItem: FC<ListRenderItemInfo<SearchResultItem>> = ({ item }) => {
return (
<Animated.View entering={FadeInUp}>
<ItemPressable
className="py-6"
className="py-4"
onPress={() => {
if (item.feed?.id) {
router.push(`/follow?id=${item.feed.id}`)

View File

@ -1,4 +1,5 @@
import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs"
import { getDefaultHeaderHeight } from "@react-navigation/elements"
import { useIsFocused } from "@react-navigation/native"
import { createNativeStackNavigator } from "@react-navigation/native-stack"
import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react"
@ -6,7 +7,7 @@ import type { NativeScrollEvent, NativeSyntheticEvent, ScrollView } from "react-
import { findNodeHandle, Text, UIManager } from "react-native"
import type { SharedValue } from "react-native-reanimated"
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated"
import { useSafeAreaInsets } from "react-native-safe-area-context"
import { useSafeAreaFrame, useSafeAreaInsets } from "react-native-safe-area-context"
import { useEventCallback } from "usehooks-ts"
import { ReAnimatedScrollView } from "@/src/components/common/AnimatedComponents"
@ -114,13 +115,18 @@ function Settings() {
</>
)
}
const SettingHeader = ({ scrollY }: { scrollY: SharedValue<number> }) => {
const frame = useSafeAreaFrame()
const insets = useSafeAreaInsets()
const headerHeight = getDefaultHeaderHeight(frame, false, insets.top)
const styles = useAnimatedStyle(() => {
return {
opacity: scrollY.value / 100,
height: headerHeight,
paddingTop: insets.top,
}
})
return (
<Animated.View
pointerEvents="none"
@ -129,7 +135,7 @@ const SettingHeader = ({ scrollY }: { scrollY: SharedValue<number> }) => {
>
<BlurEffect />
<Text className="text-label flex-1 text-center text-lg font-medium">Settings</Text>
<Text className="text-label flex-1 text-center text-[17px] font-semibold">Settings</Text>
</Animated.View>
)
}

View File

@ -643,6 +643,9 @@ importers:
usehooks-ts:
specifier: 3.1.0
version: 3.1.0(react@18.3.1)
zeego:
specifier: 2.0.4
version: 2.0.4(j3ti5ctilkzw4c72qtaivrgtti)
zod:
specifier: 3.24.1
version: 3.24.1
@ -5023,6 +5026,12 @@ packages:
'@react-native-community/cli-tools@14.1.0':
resolution: {integrity: sha512-r1KxSu2+OSuhWFoE//1UR7aSTXMLww/UYWQprEw4bSo/kvutGX//4r9ywgXSWp+39udpNN4jQpNTHuWhGZd/Bg==}
'@react-native-menu/menu@1.2.1':
resolution: {integrity: sha512-ut3fLnhEDR1h1VFCr/Hyx7hQ0Btc7MOvF3LXuoIOZfvaepV2OUDhXPs6dI6YImUGZxabWymjWlyWqZ90gn4Dog==}
peerDependencies:
react: '*'
react-native: '*'
'@react-native-picker/picker@2.9.0':
resolution: {integrity: sha512-khEhIW/uhfMqq/+tvg4rEAiPGT8GX+Y6QydlP2TSMSmRHoSJK+ShXvXZXSr4Sii4imkj4BwvLunGywwtQDODqg==}
peerDependencies:
@ -15198,6 +15207,14 @@ packages:
yoga-wasm-web@0.3.3:
resolution: {integrity: sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==}
zeego@2.0.4:
resolution: {integrity: sha512-mkKfUJmgcSGCTqWXW7ccqap8d8z6guQoLF5/mWlH17Jckd0BaFLVZ74y/uWvfBGaC9OawYVt/1MchPnQ8ieSxg==}
peerDependencies:
'@react-native-menu/menu': '*'
react: '*'
react-native: '*'
react-native-ios-context-menu: ~2.5.1
zip-stream@4.1.1:
resolution: {integrity: sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==}
engines: {node: '>= 10'}
@ -19810,6 +19827,11 @@ snapshots:
sudo-prompt: 9.2.1
optional: true
'@react-native-menu/menu@1.2.1(react-native@0.77.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(react@18.3.1))(react@18.3.1)':
dependencies:
react: 18.3.1
react-native: 0.77.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(react@18.3.1)
'@react-native-picker/picker@2.9.0(react-native@0.77.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(react@18.3.1))(react@18.3.1)':
dependencies:
react: 18.3.1
@ -32057,6 +32079,20 @@ snapshots:
yoga-wasm-web@0.3.3: {}
zeego@2.0.4(j3ti5ctilkzw4c72qtaivrgtti):
dependencies:
'@radix-ui/react-context-menu': 2.2.2(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@radix-ui/react-dropdown-menu': 2.1.2(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@react-native-menu/menu': 1.2.1(react-native@0.77.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(react@18.3.1))(react@18.3.1)
react: 18.3.1
react-native: 0.77.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(react@18.3.1)
react-native-ios-context-menu: 3.1.0(react-native-ios-utilities@5.1.1(react-native@0.77.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(react@18.3.1))(react@18.3.1))(react-native@0.77.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(@react-native-community/cli-server-api@14.1.0(bufferutil@4.0.8))(@types/react@18.3.14)(bufferutil@4.0.8)(react@18.3.1))(react@18.3.1)
sf-symbols-typescript: 2.0.0
transitivePeerDependencies:
- '@types/react'
- '@types/react-dom'
- react-dom
zip-stream@4.1.1:
dependencies:
archiver-utils: 3.0.4