feat(app-expo): env variants, local iOS prebuild, and About diagnostics
Align staging/production builds with APP_VARIANT bundle IDs, allow staging HTTP on iOS, add ios-prebuild scripts for TestFlight, and show connected API URL on About for non-production builds. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,25 +1,44 @@
|
||||
import Constants from 'expo-constants';
|
||||
import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
import { Text } from '@/components/ui/text';
|
||||
import { ScreenHeader } from '@/components/screen-header';
|
||||
import { config } from '@/core/config';
|
||||
|
||||
export default function AboutScreen() {
|
||||
const { t } = useTranslation('profile');
|
||||
const version = Constants.expoConfig?.version ?? '1.0.0';
|
||||
const showBackend = config.showAboutBackendUrl;
|
||||
|
||||
return (
|
||||
<View className="flex-1 bg-background">
|
||||
<ScreenHeader title="关于" />
|
||||
<ScreenHeader title={t('about.title')} />
|
||||
<SafeAreaView className="flex-1 items-center justify-center gap-4 px-6">
|
||||
<Text variant="h2" className="text-foreground">
|
||||
岁月时书
|
||||
{t('about.appName')}
|
||||
</Text>
|
||||
<Text className="text-muted-foreground">Life Echo</Text>
|
||||
<Text className="text-sm text-muted-foreground">版本 {version}</Text>
|
||||
<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}
|
||||
<Text className="mt-8 text-center text-sm leading-5 text-muted-foreground">
|
||||
记录你的人生故事,让回忆成书。
|
||||
{t('about.tagline')}
|
||||
</Text>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user