2026-03-09 21:29:03 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 设置页 SettingsScreen(响应式适配)
|
|
|
|
|
|
* 胡萝卜BBS - 应用设置
|
|
|
|
|
|
* 在宽屏下居中显示,最大宽度限制
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2026-03-25 05:16:54 +08:00
|
|
|
|
import React, { useMemo } from 'react';
|
2026-03-09 21:29:03 +08:00
|
|
|
|
import {
|
|
|
|
|
|
View,
|
|
|
|
|
|
StyleSheet,
|
|
|
|
|
|
TouchableOpacity,
|
|
|
|
|
|
Alert,
|
|
|
|
|
|
ScrollView,
|
|
|
|
|
|
} from 'react-native';
|
|
|
|
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
2026-03-24 14:21:31 +08:00
|
|
|
|
import { useRouter } from 'expo-router';
|
2026-03-09 21:29:03 +08:00
|
|
|
|
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
2026-03-20 19:28:42 +08:00
|
|
|
|
import Constants from 'expo-constants';
|
2026-03-25 05:16:54 +08:00
|
|
|
|
import {
|
|
|
|
|
|
useAppColors,
|
|
|
|
|
|
spacing,
|
|
|
|
|
|
fontSizes,
|
|
|
|
|
|
borderRadius,
|
|
|
|
|
|
useThemePreference,
|
|
|
|
|
|
useSetThemePreference,
|
|
|
|
|
|
type AppColors,
|
|
|
|
|
|
} from '../../theme';
|
2026-03-09 21:29:03 +08:00
|
|
|
|
import { useAuthStore } from '../../stores';
|
2026-03-29 02:34:13 +08:00
|
|
|
|
import { Text } from '../../components/common';
|
|
|
|
|
|
import { useResponsive, useResponsiveSpacing } from '../../hooks';
|
2026-03-21 03:22:28 +08:00
|
|
|
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
2026-04-01 02:17:36 +08:00
|
|
|
|
import * as hrefs from '../../navigation/hrefs';
|
2026-03-09 21:29:03 +08:00
|
|
|
|
|
2026-03-29 02:34:13 +08:00
|
|
|
|
// 设置卡片最大宽度
|
|
|
|
|
|
const SETTINGS_CARD_MAX_WIDTH = 720;
|
|
|
|
|
|
|
2026-03-09 21:29:03 +08:00
|
|
|
|
interface SettingsItem {
|
|
|
|
|
|
key: string;
|
|
|
|
|
|
title: string;
|
|
|
|
|
|
icon: string;
|
|
|
|
|
|
onPress?: () => void;
|
|
|
|
|
|
showArrow?: boolean;
|
|
|
|
|
|
danger?: boolean;
|
|
|
|
|
|
subtitle?: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-20 19:28:42 +08:00
|
|
|
|
const APP_VERSION = Constants.expoConfig?.version || '1.0.0';
|
|
|
|
|
|
|
2026-03-25 05:16:54 +08:00
|
|
|
|
const SETTINGS_GROUPS_BASE = [
|
2026-03-09 21:29:03 +08:00
|
|
|
|
{
|
|
|
|
|
|
title: '账号与安全',
|
|
|
|
|
|
icon: 'shield-check-outline',
|
|
|
|
|
|
items: [
|
|
|
|
|
|
{ key: 'edit_profile', title: '编辑资料', icon: 'account-edit-outline', showArrow: true },
|
|
|
|
|
|
{ key: 'privacy', title: '隐私设置', icon: 'shield-account-outline', showArrow: true },
|
|
|
|
|
|
{ key: 'security', title: '账号安全', icon: 'lock-outline', showArrow: true },
|
|
|
|
|
|
{ key: 'blocked_users', title: '黑名单', icon: 'account-off-outline', showArrow: true },
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '通知与通用',
|
|
|
|
|
|
icon: 'bell-outline',
|
|
|
|
|
|
items: [
|
|
|
|
|
|
{ key: 'notification_settings', title: '通知设置', icon: 'bell-cog-outline', showArrow: true, subtitle: '推送、震动、提示音' },
|
2026-04-01 02:17:36 +08:00
|
|
|
|
{ key: 'language', title: '语言设置', icon: 'translate', showArrow: true, subtitle: '简体中文' },
|
|
|
|
|
|
{ key: 'data_storage', title: '数据与存储', icon: 'database-outline', showArrow: true },
|
2026-03-09 21:29:03 +08:00
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '关于与帮助',
|
|
|
|
|
|
icon: 'information-outline',
|
|
|
|
|
|
items: [
|
2026-03-20 19:28:42 +08:00
|
|
|
|
{ key: 'about', title: '关于我们', icon: 'information-outline', showArrow: true, subtitle: `版本 ${APP_VERSION}` },
|
2026-03-09 21:29:03 +08:00
|
|
|
|
{ key: 'help', title: '帮助与反馈', icon: 'help-circle-outline', showArrow: true },
|
2026-04-01 02:17:36 +08:00
|
|
|
|
{ key: 'terms', title: '用户协议', icon: 'file-document-outline', showArrow: true },
|
|
|
|
|
|
{ key: 'privacy_policy', title: '隐私政策', icon: 'shield-outline', showArrow: true },
|
2026-03-09 21:29:03 +08:00
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2026-03-25 05:16:54 +08:00
|
|
|
|
function createSettingsStyles(colors: AppColors) {
|
|
|
|
|
|
return StyleSheet.create({
|
|
|
|
|
|
container: {
|
|
|
|
|
|
flex: 1,
|
2026-04-02 17:55:56 +08:00
|
|
|
|
backgroundColor: colors.background.paper,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
scrollContent: {
|
2026-04-02 17:55:56 +08:00
|
|
|
|
paddingVertical: spacing.lg,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
groupContainer: {
|
2026-04-02 17:55:56 +08:00
|
|
|
|
marginBottom: spacing['2xl'],
|
2026-03-29 02:34:13 +08:00
|
|
|
|
maxWidth: SETTINGS_CARD_MAX_WIDTH,
|
|
|
|
|
|
alignSelf: 'center',
|
|
|
|
|
|
width: '100%',
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
groupHeader: {
|
2026-04-02 17:55:56 +08:00
|
|
|
|
paddingHorizontal: spacing['2xl'],
|
2026-03-25 05:16:54 +08:00
|
|
|
|
marginBottom: spacing.sm,
|
2026-04-02 17:55:56 +08:00
|
|
|
|
marginTop: spacing.sm,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
groupTitle: {
|
|
|
|
|
|
fontWeight: '600',
|
|
|
|
|
|
fontSize: fontSizes.sm,
|
2026-04-02 17:55:56 +08:00
|
|
|
|
color: colors.text.secondary,
|
|
|
|
|
|
textTransform: 'uppercase',
|
|
|
|
|
|
letterSpacing: 0.5,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
settingItem: {
|
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
|
justifyContent: 'space-between',
|
2026-04-02 17:55:56 +08:00
|
|
|
|
paddingVertical: 16,
|
|
|
|
|
|
paddingHorizontal: spacing['2xl'],
|
|
|
|
|
|
borderBottomWidth: StyleSheet.hairlineWidth,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
borderBottomColor: colors.divider,
|
|
|
|
|
|
},
|
2026-04-02 17:55:56 +08:00
|
|
|
|
settingItemFirst: {},
|
2026-03-25 05:16:54 +08:00
|
|
|
|
settingItemLast: {
|
|
|
|
|
|
borderBottomWidth: 0,
|
|
|
|
|
|
},
|
|
|
|
|
|
settingItemLeft: {
|
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
|
flex: 1,
|
|
|
|
|
|
},
|
|
|
|
|
|
iconContainer: {
|
2026-04-02 17:55:56 +08:00
|
|
|
|
width: 24,
|
|
|
|
|
|
height: 24,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
|
alignItems: 'center',
|
2026-04-02 17:55:56 +08:00
|
|
|
|
marginRight: spacing.lg,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
2026-04-02 17:55:56 +08:00
|
|
|
|
dangerIconContainer: {},
|
2026-03-25 05:16:54 +08:00
|
|
|
|
settingContent: {
|
|
|
|
|
|
flex: 1,
|
|
|
|
|
|
},
|
|
|
|
|
|
subtitle: {
|
|
|
|
|
|
marginTop: 2,
|
|
|
|
|
|
},
|
|
|
|
|
|
logoutButton: {
|
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
|
justifyContent: 'center',
|
2026-04-02 17:55:56 +08:00
|
|
|
|
marginTop: spacing.lg,
|
|
|
|
|
|
marginBottom: spacing['2xl'],
|
|
|
|
|
|
paddingVertical: 16,
|
|
|
|
|
|
marginHorizontal: spacing['2xl'],
|
|
|
|
|
|
borderRadius: 14,
|
2026-03-25 05:16:54 +08:00
|
|
|
|
gap: spacing.sm,
|
2026-03-29 02:34:13 +08:00
|
|
|
|
maxWidth: SETTINGS_CARD_MAX_WIDTH,
|
|
|
|
|
|
alignSelf: 'center',
|
|
|
|
|
|
width: '100%',
|
2026-04-02 17:55:56 +08:00
|
|
|
|
backgroundColor: colors.error.light + '20',
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
logoutText: {
|
2026-04-02 17:55:56 +08:00
|
|
|
|
fontWeight: '600',
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
|
|
|
|
|
footer: {
|
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
|
marginTop: spacing.xl,
|
|
|
|
|
|
paddingBottom: spacing.xl,
|
|
|
|
|
|
},
|
|
|
|
|
|
copyright: {
|
|
|
|
|
|
marginTop: spacing.xs,
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-09 21:29:03 +08:00
|
|
|
|
export const SettingsScreen: React.FC = () => {
|
2026-03-24 14:21:31 +08:00
|
|
|
|
const router = useRouter();
|
2026-03-09 21:29:03 +08:00
|
|
|
|
const { logout } = useAuthStore();
|
2026-03-21 03:22:28 +08:00
|
|
|
|
const insets = useSafeAreaInsets();
|
|
|
|
|
|
const { isMobile } = useResponsive();
|
2026-03-29 02:34:13 +08:00
|
|
|
|
const responsivePadding = useResponsiveSpacing({ xs: 8, sm: 12, md: 16, lg: 24, xl: 32 });
|
2026-03-25 05:16:54 +08:00
|
|
|
|
const colors = useAppColors();
|
|
|
|
|
|
const styles = useMemo(() => createSettingsStyles(colors), [colors]);
|
|
|
|
|
|
const themePreference = useThemePreference();
|
|
|
|
|
|
const setThemePreference = useSetThemePreference();
|
|
|
|
|
|
|
2026-03-21 03:22:28 +08:00
|
|
|
|
const scrollBottomInset = isMobile ? 64 + 24 + insets.bottom + spacing.md : spacing.md;
|
2026-03-09 21:29:03 +08:00
|
|
|
|
|
2026-03-25 05:16:54 +08:00
|
|
|
|
const settingsGroups = useMemo(() => {
|
|
|
|
|
|
const themeSubtitle =
|
|
|
|
|
|
themePreference === 'system' ? '跟随系统' : themePreference === 'dark' ? '深色' : '浅色';
|
|
|
|
|
|
return [
|
|
|
|
|
|
{
|
2026-04-01 02:17:36 +08:00
|
|
|
|
title: '个性化',
|
2026-03-25 05:16:54 +08:00
|
|
|
|
icon: 'palette-outline',
|
|
|
|
|
|
items: [
|
2026-04-01 02:17:36 +08:00
|
|
|
|
{
|
|
|
|
|
|
key: 'chat_settings',
|
|
|
|
|
|
title: '聊天设置',
|
|
|
|
|
|
icon: 'message-text-outline',
|
|
|
|
|
|
showArrow: true,
|
|
|
|
|
|
subtitle: '字号、主题、壁纸',
|
|
|
|
|
|
},
|
2026-03-25 05:16:54 +08:00
|
|
|
|
{
|
|
|
|
|
|
key: 'theme',
|
|
|
|
|
|
title: '主题模式',
|
|
|
|
|
|
icon: 'theme-light-dark',
|
|
|
|
|
|
showArrow: true,
|
|
|
|
|
|
subtitle: themeSubtitle,
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
...SETTINGS_GROUPS_BASE,
|
|
|
|
|
|
];
|
|
|
|
|
|
}, [themePreference]);
|
|
|
|
|
|
|
2026-03-09 21:29:03 +08:00
|
|
|
|
const handleItemPress = (key: string) => {
|
|
|
|
|
|
switch (key) {
|
2026-04-01 02:17:36 +08:00
|
|
|
|
case 'chat_settings':
|
|
|
|
|
|
router.push(hrefs.hrefProfileChatSettings());
|
|
|
|
|
|
break;
|
2026-03-26 01:25:42 +08:00
|
|
|
|
case 'theme': {
|
|
|
|
|
|
Alert.alert(
|
|
|
|
|
|
'主题模式',
|
2026-04-01 02:17:36 +08:00
|
|
|
|
'选择应用界面明暗',
|
2026-03-26 01:25:42 +08:00
|
|
|
|
[
|
|
|
|
|
|
{ text: '取消', style: 'cancel' },
|
|
|
|
|
|
{
|
|
|
|
|
|
text: '跟随系统',
|
|
|
|
|
|
onPress: () => {
|
|
|
|
|
|
void setThemePreference('system');
|
|
|
|
|
|
},
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
2026-03-26 01:25:42 +08:00
|
|
|
|
{
|
|
|
|
|
|
text: '浅色',
|
|
|
|
|
|
onPress: () => {
|
|
|
|
|
|
void setThemePreference('light');
|
|
|
|
|
|
},
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
2026-03-26 01:25:42 +08:00
|
|
|
|
{
|
|
|
|
|
|
text: '深色',
|
|
|
|
|
|
onPress: () => {
|
|
|
|
|
|
void setThemePreference('dark');
|
|
|
|
|
|
},
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
2026-03-26 01:25:42 +08:00
|
|
|
|
]
|
|
|
|
|
|
);
|
2026-03-25 05:16:54 +08:00
|
|
|
|
break;
|
2026-03-26 01:25:42 +08:00
|
|
|
|
}
|
2026-04-01 02:17:36 +08:00
|
|
|
|
case 'language': {
|
|
|
|
|
|
Alert.alert(
|
|
|
|
|
|
'语言设置',
|
|
|
|
|
|
'选择应用显示语言',
|
|
|
|
|
|
[
|
|
|
|
|
|
{ text: '取消', style: 'cancel' },
|
|
|
|
|
|
{ text: '简体中文', onPress: () => {} },
|
|
|
|
|
|
{ text: '繁體中文', onPress: () => {} },
|
|
|
|
|
|
{ text: 'English', onPress: () => {} },
|
|
|
|
|
|
]
|
|
|
|
|
|
);
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
case 'data_storage': {
|
|
|
|
|
|
Alert.alert('数据与存储', '缓存清理功能即将上线!');
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
case 'terms': {
|
|
|
|
|
|
Alert.alert('用户协议', '用户协议页面即将上线!');
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
case 'privacy_policy': {
|
|
|
|
|
|
Alert.alert('隐私政策', '隐私政策页面即将上线!');
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
2026-03-09 21:29:03 +08:00
|
|
|
|
case 'edit_profile':
|
2026-03-24 14:21:31 +08:00
|
|
|
|
router.push(hrefs.hrefProfileEdit());
|
2026-03-09 21:29:03 +08:00
|
|
|
|
break;
|
|
|
|
|
|
case 'notification_settings':
|
2026-03-24 14:21:31 +08:00
|
|
|
|
router.push(hrefs.hrefProfileNotifications());
|
2026-03-09 21:29:03 +08:00
|
|
|
|
break;
|
|
|
|
|
|
case 'blocked_users':
|
2026-03-24 14:21:31 +08:00
|
|
|
|
router.push(hrefs.hrefProfileBlocked());
|
2026-03-09 21:29:03 +08:00
|
|
|
|
break;
|
|
|
|
|
|
case 'security':
|
2026-03-24 14:21:31 +08:00
|
|
|
|
router.push(hrefs.hrefProfileSecurity());
|
2026-03-09 21:29:03 +08:00
|
|
|
|
break;
|
|
|
|
|
|
case 'logout':
|
|
|
|
|
|
Alert.alert(
|
|
|
|
|
|
'退出登录',
|
|
|
|
|
|
'确定要退出登录吗?',
|
|
|
|
|
|
[
|
|
|
|
|
|
{ text: '取消', style: 'cancel' },
|
|
|
|
|
|
{
|
|
|
|
|
|
text: '确定',
|
|
|
|
|
|
style: 'destructive',
|
2026-03-24 14:21:31 +08:00
|
|
|
|
onPress: async () => {
|
|
|
|
|
|
await logout();
|
|
|
|
|
|
router.replace(hrefs.hrefAuthLogin());
|
2026-03-25 05:16:54 +08:00
|
|
|
|
},
|
2026-03-09 21:29:03 +08:00
|
|
|
|
},
|
|
|
|
|
|
]
|
|
|
|
|
|
);
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
2026-03-09 22:18:47 +08:00
|
|
|
|
break;
|
2026-03-09 21:29:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const renderSettingItem = (item: SettingsItem, index: number, total: number) => (
|
|
|
|
|
|
<TouchableOpacity
|
|
|
|
|
|
key={item.key}
|
|
|
|
|
|
style={[
|
|
|
|
|
|
styles.settingItem,
|
|
|
|
|
|
index === total - 1 && styles.settingItemLast,
|
|
|
|
|
|
]}
|
2026-03-25 05:16:54 +08:00
|
|
|
|
onPress={() => (item.onPress ? item.onPress() : handleItemPress(item.key))}
|
2026-03-09 21:29:03 +08:00
|
|
|
|
activeOpacity={0.7}
|
|
|
|
|
|
>
|
|
|
|
|
|
<View style={styles.settingItemLeft}>
|
2026-03-25 05:16:54 +08:00
|
|
|
|
<View style={[styles.iconContainer, item.danger && styles.dangerIconContainer]}>
|
2026-03-09 21:29:03 +08:00
|
|
|
|
<MaterialCommunityIcons
|
|
|
|
|
|
name={item.icon as any}
|
2026-04-02 17:55:56 +08:00
|
|
|
|
size={22}
|
|
|
|
|
|
color={item.danger ? colors.error.main : colors.text.secondary}
|
2026-03-09 21:29:03 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</View>
|
|
|
|
|
|
<View style={styles.settingContent}>
|
2026-03-25 05:16:54 +08:00
|
|
|
|
<Text variant="body" color={item.danger ? colors.error.main : colors.text.primary}>
|
2026-03-09 21:29:03 +08:00
|
|
|
|
{item.title}
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
{item.subtitle && (
|
|
|
|
|
|
<Text variant="caption" color={colors.text.secondary} style={styles.subtitle}>
|
|
|
|
|
|
{item.subtitle}
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</View>
|
|
|
|
|
|
</View>
|
|
|
|
|
|
{item.showArrow && (
|
|
|
|
|
|
<MaterialCommunityIcons name="chevron-right" size={20} color={colors.text.hint} />
|
|
|
|
|
|
)}
|
|
|
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
);
|
|
|
|
|
|
|
2026-03-25 05:16:54 +08:00
|
|
|
|
const renderGroup = (group: (typeof settingsGroups)[0]) => (
|
2026-03-09 21:29:03 +08:00
|
|
|
|
<View key={group.title} style={styles.groupContainer}>
|
|
|
|
|
|
<View style={styles.groupHeader}>
|
2026-04-02 17:55:56 +08:00
|
|
|
|
<Text variant="caption" style={styles.groupTitle}>
|
2026-03-09 21:29:03 +08:00
|
|
|
|
{group.title}
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
</View>
|
2026-04-02 17:55:56 +08:00
|
|
|
|
<View>
|
2026-03-25 05:16:54 +08:00
|
|
|
|
{group.items.map((item, index) => renderSettingItem(item, index, group.items.length))}
|
2026-03-09 21:29:03 +08:00
|
|
|
|
</View>
|
|
|
|
|
|
</View>
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const renderLogoutButton = () => (
|
|
|
|
|
|
<TouchableOpacity
|
|
|
|
|
|
style={styles.logoutButton}
|
|
|
|
|
|
onPress={() => handleItemPress('logout')}
|
|
|
|
|
|
activeOpacity={0.7}
|
|
|
|
|
|
>
|
|
|
|
|
|
<MaterialCommunityIcons name="logout-variant" size={20} color={colors.error.main} />
|
|
|
|
|
|
<Text variant="body" color={colors.error.main} style={styles.logoutText}>
|
|
|
|
|
|
退出登录
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const renderContent = () => (
|
|
|
|
|
|
<>
|
2026-04-01 02:17:36 +08:00
|
|
|
|
{/* 设置分组 */}
|
2026-03-25 05:16:54 +08:00
|
|
|
|
{settingsGroups.map((group) => renderGroup(group))}
|
2026-04-01 02:17:36 +08:00
|
|
|
|
|
2026-03-09 21:29:03 +08:00
|
|
|
|
{renderLogoutButton()}
|
|
|
|
|
|
|
|
|
|
|
|
<View style={styles.footer}>
|
|
|
|
|
|
<Text variant="caption" color={colors.text.hint}>
|
2026-03-20 19:28:42 +08:00
|
|
|
|
萝卜社区 v{APP_VERSION}
|
2026-03-09 21:29:03 +08:00
|
|
|
|
</Text>
|
|
|
|
|
|
<Text variant="caption" color={colors.text.hint} style={styles.copyright}>
|
|
|
|
|
|
© 2024 Carrot BBS. All rights reserved.
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
</View>
|
|
|
|
|
|
</>
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<SafeAreaView style={styles.container} edges={['bottom']}>
|
2026-03-29 02:34:13 +08:00
|
|
|
|
<ScrollView contentContainerStyle={[styles.scrollContent, { paddingBottom: scrollBottomInset, paddingHorizontal: responsivePadding }]}>
|
|
|
|
|
|
{renderContent()}
|
|
|
|
|
|
</ScrollView>
|
2026-03-09 21:29:03 +08:00
|
|
|
|
</SafeAreaView>
|
|
|
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default SettingsScreen;
|