chore: debug menu in prod

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-01-03 01:03:08 +08:00
parent 6d10d670cd
commit c7f64e8327
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
4 changed files with 33 additions and 3 deletions

View File

@ -15,6 +15,10 @@ export default function ModalLayout() {
title: "RSSHub Form",
}}
/>
<Stack.Screen
name="loading"
options={{ presentation: "transparentModal", headerShown: false, animation: "fade" }}
/>
</Stack>
)
}

View File

@ -0,0 +1,12 @@
import { router } from "expo-router"
import { Text, TouchableOpacity, View } from "react-native"
export default function Loading() {
return (
<View className="flex-1 items-center justify-center bg-transparent">
<TouchableOpacity onPress={() => router.back()}>
<Text className="text-text">Loading...</Text>
</TouchableOpacity>
</View>
)
}

View File

@ -1,6 +1,6 @@
import { FeedViewType } from "@follow/constants"
import { PlatformPressable } from "@react-navigation/elements/src/PlatformPressable"
import { Tabs } from "expo-router"
import { router, Tabs } from "expo-router"
import { View } from "react-native"
import { Gesture, GestureDetector } from "react-native-gesture-handler"
import { runOnJS } from "react-native-reanimated"
@ -19,6 +19,12 @@ const doubleTap = Gesture.Tap()
runOnJS(setCurrentView)(FeedViewType.Articles)
})
const fifthTap = Gesture.Tap()
.numberOfTaps(5)
.onStart(() => {
runOnJS(router.push)("/debug")
})
export default function TabLayout() {
return (
<Tabs
@ -63,6 +69,15 @@ export default function TabLayout() {
options={{
title: "Settings",
headerShown: false,
tabBarButton(props) {
return (
<GestureDetector gesture={fifthTap}>
<View className="flex-1">
<PlatformPressable {...props} />
</View>
</GestureDetector>
)
},
tabBarIcon: ({ color, focused }) => {
const Icon = !focused ? Settings7CuteReIcon : Setting7CuteFi
return <Icon color={color} width={24} height={24} />

View File

@ -27,8 +27,7 @@ export default function RootLayout() {
<Stack.Screen name="(modal)" options={{ headerShown: false, presentation: "modal" }} />
</Stack>
{/* {__DEV__ && <DebugButton />} */}
<DebugButton />
{__DEV__ && <DebugButton />}
</RootProviders>
)
}