diff --git a/apps/mobile/src/components/ui/tabview/TabBar.tsx b/apps/mobile/src/components/ui/tabview/TabBar.tsx index 36e4ddb49c..1f0a8f8fd6 100644 --- a/apps/mobile/src/components/ui/tabview/TabBar.tsx +++ b/apps/mobile/src/components/ui/tabview/TabBar.tsx @@ -147,12 +147,12 @@ export const TabBar = forwardRef( const { width, x } = event.nativeEvent.layout setTabWidths((prev) => { const newWidths = [...prev] - newWidths[index] = width + newWidths[index] = width - 16 return newWidths }) setTabPositions((prev) => { const newPositions = [...prev] - newPositions[index] = x + newPositions[index] = x + 12 return newPositions }) }, []) @@ -197,17 +197,19 @@ export const TabBar = forwardRef( contentContainerStyle={styles.tabScroller} style={[styles.root, tabbarStyle]} > - {tabs.map((tab, index) => ( - - ))} + + {tabs.map((tab, index) => ( + + ))} + @@ -234,8 +236,11 @@ const styles = StyleSheet.create({ const TabItemInner = ({ tab, isSelected }: { tab: Tab; isSelected: boolean }) => { const gray = useColor("gray") return ( - - + + {tab.name} diff --git a/apps/mobile/src/modules/discover/RecommendationListItem.tsx b/apps/mobile/src/modules/discover/RecommendationListItem.tsx index 8b3826fcc9..114a4c975a 100644 --- a/apps/mobile/src/modules/discover/RecommendationListItem.tsx +++ b/apps/mobile/src/modules/discover/RecommendationListItem.tsx @@ -42,8 +42,23 @@ export const RecommendationListItem: FC<{ - - {data.name} + + + {data.name} + {/* Tags */} + + {categories.map((c) => ( + + + {RSSHubCategoryCopyMap[c as keyof typeof RSSHubCategoryCopyMap]} + + + ))} + + {/* Maintainers */} {maintainers.map((m) => ( @@ -91,23 +106,10 @@ export const RecommendationListItem: FC<{ ))} - {/* Tags */} - - {categories.map((c) => ( - - - {RSSHubCategoryCopyMap[c as keyof typeof RSSHubCategoryCopyMap]} - - - ))} - {/* Items */} - + {Object.keys(data.routes).map((route) => ( - + {data.routes[route]!.name} diff --git a/apps/mobile/src/modules/discover/Recommendations.tsx b/apps/mobile/src/modules/discover/Recommendations.tsx index 4f84c8791c..793639d632 100644 --- a/apps/mobile/src/modules/discover/Recommendations.tsx +++ b/apps/mobile/src/modules/discover/Recommendations.tsx @@ -225,8 +225,8 @@ const ItemRenderer = ({ if (typeof item === "string") { // Rendering header return ( - - {item} + + {item} ) } else { diff --git a/apps/mobile/src/modules/discover/search.tsx b/apps/mobile/src/modules/discover/search.tsx index 1e3796519f..084a8d16ee 100644 --- a/apps/mobile/src/modules/discover/search.tsx +++ b/apps/mobile/src/modules/discover/search.tsx @@ -14,7 +14,6 @@ import Animated, { } from "react-native-reanimated" import { useSafeAreaFrame, useSafeAreaInsets } from "react-native-safe-area-context" -import { BlurEffect } from "@/src/components/common/BlurEffect" import { TabBar } from "@/src/components/ui/tabview/TabBar" import { Search2CuteReIcon } from "@/src/icons/search_2_cute_re" import { accentColor, useColor } from "@/src/theme/colors" @@ -39,7 +38,6 @@ export const SearchHeader: FC<{ className="relative" onLayout={onLayout} > - @@ -58,16 +56,16 @@ const DiscoverHeaderImpl = () => { const { animatedX, currentTabAtom, headerHeightAtom } = useContext(DiscoverContext) const setCurrentTab = useSetAtom(currentTabAtom) const setHeaderHeight = useSetAtom(headerHeightAtom) + const bgColor = useColor("systemBackground") return ( { setHeaderHeight(e.nativeEvent.layout.height) }} > - @@ -86,6 +84,7 @@ const DiscoverHeaderImpl = () => { onTabItemPress={(index) => { setCurrentTab(index) }} + tabbarClassName="border-b border-b-quaternary-system-fill" /> ) @@ -133,7 +132,7 @@ const ComposeSearchBar = () => { } }} > - Cancel + Cancel ) @@ -251,9 +250,8 @@ const styles = StyleSheet.create({ header: { flex: 1, alignItems: "center", - marginTop: -3, flexDirection: "row", - marginBottom: 6, + marginBottom: 14, marginHorizontal: 16, position: "relative", }, @@ -269,7 +267,7 @@ const styles = StyleSheet.create({ alignItems: "center", justifyContent: "center", borderRadius: 50, - height: 32, + height: 40, position: "relative", }, searchInput: {