2026-03-19 01:12:17 +08:00
|
|
|
import Constants from 'expo-constants';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { View } from 'react-native';
|
2026-05-19 15:43:16 +08:00
|
|
|
import { useTranslation } from 'react-i18next';
|
2026-03-19 01:12:17 +08:00
|
|
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
|
|
|
|
|
|
|
import { Text } from '@/components/ui/text';
|
|
|
|
|
import { ScreenHeader } from '@/components/screen-header';
|
2026-05-19 15:43:16 +08:00
|
|
|
import { config } from '@/core/config';
|
2026-03-19 01:12:17 +08:00
|
|
|
|
|
|
|
|
export default function AboutScreen() {
|
2026-05-19 15:43:16 +08:00
|
|
|
const { t } = useTranslation('profile');
|
2026-03-19 01:12:17 +08:00
|
|
|
const version = Constants.expoConfig?.version ?? '1.0.0';
|
2026-05-19 15:43:16 +08:00
|
|
|
const showBackend = config.showAboutBackendUrl;
|
2026-03-19 01:12:17 +08:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<View className="flex-1 bg-background">
|
2026-05-19 15:43:16 +08:00
|
|
|
<ScreenHeader title={t('about.title')} />
|
2026-03-19 01:12:17 +08:00
|
|
|
<SafeAreaView className="flex-1 items-center justify-center gap-4 px-6">
|
|
|
|
|
<Text variant="h2" className="text-foreground">
|
2026-05-19 15:43:16 +08:00
|
|
|
{t('about.appName')}
|
2026-03-19 01:12:17 +08:00
|
|
|
</Text>
|
2026-05-19 15:43:16 +08:00
|
|
|
<Text className="text-muted-foreground">{t('about.appSubtitle')}</Text>
|
|
|
|
|
<Text className="text-sm text-muted-foreground">
|
|
|
|
|
{t('about.version', { version })}
|
|
|
|
|
</Text>
|
|
|
|
|
{showBackend ? (
|
|
|
|
|
<View className="w-full max-w-sm items-center gap-1">
|
|
|
|
|
<Text className="text-sm text-muted-foreground">
|
|
|
|
|
{t('about.backend')}
|
|
|
|
|
</Text>
|
|
|
|
|
<Text
|
|
|
|
|
selectable
|
|
|
|
|
className="text-center font-mono text-xs text-muted-foreground"
|
|
|
|
|
>
|
|
|
|
|
{config.apiBaseUrl}
|
|
|
|
|
</Text>
|
|
|
|
|
</View>
|
|
|
|
|
) : null}
|
2026-03-19 01:12:17 +08:00
|
|
|
<Text className="mt-8 text-center text-sm leading-5 text-muted-foreground">
|
2026-05-19 15:43:16 +08:00
|
|
|
{t('about.tagline')}
|
2026-03-19 01:12:17 +08:00
|
|
|
</Text>
|
|
|
|
|
</SafeAreaView>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
}
|