feat: add about page
This commit is contained in:
@@ -28,12 +28,14 @@ export default function TabLayout() {
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="explore"
|
||||
name="about"
|
||||
options={{
|
||||
title: "Explore",
|
||||
title: "About",
|
||||
tabBarIcon: ({ color, focused }) => (
|
||||
<TabBarIcon
|
||||
name={focused ? "code-slash" : "code-slash-outline"}
|
||||
name={
|
||||
focused ? "information-circle" : "information-circle-outline"
|
||||
}
|
||||
color={color}
|
||||
/>
|
||||
),
|
||||
|
56
app/(tabs)/about.tsx
Normal file
56
app/(tabs)/about.tsx
Normal file
@@ -0,0 +1,56 @@
|
||||
import { View, Text, TouchableOpacity } from "react-native";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import * as Linking from "expo-linking";
|
||||
|
||||
export default function AboutPage() {
|
||||
return (
|
||||
<SafeAreaView className="flex-1 items-start p-4">
|
||||
<Text className="pt-20 text-4xl font-bold text-white mb-4">About</Text>
|
||||
<View className="flex-col">
|
||||
<AboutItem
|
||||
title="Source Code"
|
||||
description="Source code is available on GitHub"
|
||||
onPress={() => {
|
||||
Linking.openURL("https://github.com/kennethnym/doors-wallpaper");
|
||||
}}
|
||||
/>
|
||||
<AboutItem
|
||||
title="Request wallpaper"
|
||||
description="Request wallpaper through my email"
|
||||
onPress={() => {
|
||||
Linking.openURL("mailto:kennethnym@outlook.com");
|
||||
}}
|
||||
/>
|
||||
<AboutItem
|
||||
title="Find me on X (formerly Twitter)"
|
||||
description="@kennethnym"
|
||||
onPress={() => {
|
||||
Linking.openURL("https://x.com/kennethnym");
|
||||
}}
|
||||
/>
|
||||
<AboutItem
|
||||
title="Find me on GitHub"
|
||||
description="@kennethnym"
|
||||
onPress={() => {
|
||||
Linking.openURL("https://github.com/kennethnym");
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
}
|
||||
|
||||
function AboutItem({
|
||||
title,
|
||||
description,
|
||||
onPress,
|
||||
}: { title: string; description: string; onPress: () => void }) {
|
||||
return (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<View className="flex-col items-start pb-3">
|
||||
<Text className="text-lg font-bold text-white">{title}</Text>
|
||||
<Text className="text-white opacity-50">{description}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
import { View } from "react-native";
|
||||
|
||||
export default function TabTwoScreen() {
|
||||
return <View />;
|
||||
}
|
@@ -88,7 +88,7 @@ export default function WallpaperPage() {
|
||||
{selectedWallpaper.creator_name ? (
|
||||
<Text className="text-white text-center opacity-50 text-xs">
|
||||
{selectedWallpaper.creator_name}
|
||||
{selectedWallpaper.is_ai_generated ? "· AI Generated" : ""}
|
||||
{selectedWallpaper.is_ai_generated ? " · AI Generated" : ""}
|
||||
</Text>
|
||||
) : null}
|
||||
{selectedWallpaper.source_url ? (
|
||||
|
Reference in New Issue
Block a user