添加隐私协议
This commit is contained in:
115
app/privacy.tsx
Normal file
115
app/privacy.tsx
Normal file
@@ -0,0 +1,115 @@
|
||||
import { Stack } from "expo-router";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ScrollView, StyleSheet, View } from "react-native";
|
||||
|
||||
import { ThemedText } from "@/components/themed-text";
|
||||
import { useTheme } from "@/context/ThemeContext";
|
||||
|
||||
export default function PrivacyScreen() {
|
||||
const { theme } = useTheme();
|
||||
const { t } = useTranslation();
|
||||
const isDark = theme === "dark";
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack.Screen
|
||||
options={{
|
||||
title: t("privacy.title"),
|
||||
headerShown: true,
|
||||
headerStyle: {
|
||||
backgroundColor: isDark ? "#000" : "#f2f2f7",
|
||||
},
|
||||
headerTintColor: isDark ? "#FFFFFF" : "#000000",
|
||||
headerShadowVisible: false,
|
||||
presentation: "card",
|
||||
animation: "slide_from_right",
|
||||
contentStyle: { backgroundColor: isDark ? "#000" : "#f2f2f7" },
|
||||
}}
|
||||
/>
|
||||
<ScrollView
|
||||
style={[
|
||||
styles.container,
|
||||
{ backgroundColor: isDark ? "#000" : "#f2f2f7" },
|
||||
]}
|
||||
>
|
||||
<View
|
||||
style={[
|
||||
styles.content,
|
||||
{ backgroundColor: isDark ? "#1c1c1e" : "#fff" },
|
||||
]}
|
||||
>
|
||||
<ThemedText style={styles.title}>{t("privacy.page_title")}</ThemedText>
|
||||
|
||||
<ThemedText style={styles.sectionTitle}>{t("privacy.section1_title")}</ThemedText>
|
||||
<ThemedText style={styles.text}>
|
||||
{t("privacy.section1_text")}
|
||||
</ThemedText>
|
||||
|
||||
<ThemedText style={styles.sectionTitle}>{t("privacy.section2_title")}</ThemedText>
|
||||
<ThemedText style={styles.text}>
|
||||
{t("privacy.section2_text")}
|
||||
</ThemedText>
|
||||
|
||||
<ThemedText style={styles.sectionTitle}>{t("privacy.section3_title")}</ThemedText>
|
||||
<ThemedText style={styles.text}>
|
||||
{t("privacy.section3_text")}
|
||||
</ThemedText>
|
||||
|
||||
<ThemedText style={styles.sectionTitle}>{t("privacy.section4_title")}</ThemedText>
|
||||
<ThemedText style={styles.text}>
|
||||
{t("privacy.section4_text")}
|
||||
</ThemedText>
|
||||
|
||||
<ThemedText style={styles.sectionTitle}>{t("privacy.section5_title")}</ThemedText>
|
||||
<ThemedText style={styles.text}>
|
||||
{t("privacy.section5_text")}
|
||||
</ThemedText>
|
||||
|
||||
<ThemedText style={styles.sectionTitle}>{t("privacy.section6_title")}</ThemedText>
|
||||
<ThemedText style={styles.text}>
|
||||
{t("privacy.section6_text")}
|
||||
</ThemedText>
|
||||
|
||||
<ThemedText style={styles.updateText}>
|
||||
{t("privacy.last_updated")}
|
||||
</ThemedText>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
},
|
||||
content: {
|
||||
margin: 16,
|
||||
padding: 20,
|
||||
borderRadius: 12, // 稍微增加圆角,更现代
|
||||
marginBottom: 40, // 底部留白
|
||||
},
|
||||
title: {
|
||||
fontSize: 24,
|
||||
fontWeight: "bold",
|
||||
marginBottom: 8,
|
||||
},
|
||||
sectionTitle: {
|
||||
fontSize: 18,
|
||||
fontWeight: "700",
|
||||
marginTop: 24,
|
||||
marginBottom: 10,
|
||||
},
|
||||
text: {
|
||||
fontSize: 15,
|
||||
lineHeight: 22,
|
||||
opacity: 0.9,
|
||||
},
|
||||
updateText: {
|
||||
fontSize: 13,
|
||||
opacity: 0.5,
|
||||
marginTop: 32,
|
||||
textAlign: "center",
|
||||
},
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as AppleAuthentication from "expo-apple-authentication";
|
||||
import Constants from "expo-constants";
|
||||
import { Image } from "expo-image";
|
||||
import { Stack } from "expo-router";
|
||||
import { Stack, useRouter } from "expo-router";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
@@ -25,6 +25,7 @@ export default function ProfileScreen() {
|
||||
const { theme, toggleTheme, setTheme, isSystemTheme, useSystemTheme } =
|
||||
useTheme();
|
||||
const { t, i18n } = useTranslation();
|
||||
const router = useRouter();
|
||||
const isDark = theme === "dark";
|
||||
const [appleAvailable, setAppleAvailable] = React.useState(false);
|
||||
const [user, setUser] = React.useState<UserProfile | null>(null);
|
||||
@@ -277,6 +278,36 @@ export default function ProfileScreen() {
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View
|
||||
style={[
|
||||
styles.settingItem,
|
||||
{
|
||||
borderTopWidth: StyleSheet.hairlineWidth,
|
||||
borderTopColor: isDark ? "#38383a" : "#c6c6c8",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<TouchableOpacity
|
||||
style={styles.settingItemContent}
|
||||
onPress={() => router.push("/privacy" as any)}
|
||||
>
|
||||
<View style={styles.settingLabel}>
|
||||
<IconSymbol
|
||||
name="document"
|
||||
size={20}
|
||||
color={iconColor}
|
||||
style={{ marginRight: 10 }}
|
||||
/>
|
||||
<ThemedText>{t("profile.privacy")}</ThemedText>
|
||||
</View>
|
||||
<IconSymbol
|
||||
name="chevron-forward"
|
||||
size={16}
|
||||
color={subTextColor}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* <ThemedText style={styles.sectionTitle}>登录</ThemedText>
|
||||
@@ -407,6 +438,12 @@ const styles = StyleSheet.create({
|
||||
justifyContent: "space-between",
|
||||
paddingVertical: 12,
|
||||
},
|
||||
settingItemContent: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
flex: 1,
|
||||
},
|
||||
settingLabel: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
|
||||
Reference in New Issue
Block a user