feat: 首页更新

This commit is contained in:
2025-11-13 16:47:10 +08:00
parent 9ef9233797
commit 54bf84b19b
1244 changed files with 3507 additions and 951 deletions

View File

@@ -28,7 +28,7 @@ import {
STORAGE_KEYS,
formatDate,
formatRelativeTime,
formatChatTime
formatChatTime,
} from '@/utils';
// 状态管理
@@ -266,7 +266,7 @@ export default function DemoScreen() {
const handleThemeChange = () => {
haptics.selection();
const themes: Array<'light' | 'dark' | 'auto'> = ['light', 'dark', 'auto'];
const currentIndex = themes.indexOf(theme);
const currentIndex = themes.indexOf(theme as 'light' | 'dark' | 'auto');
const nextTheme = themes[(currentIndex + 1) % themes.length];
setTheme(nextTheme);
};
@@ -296,9 +296,7 @@ export default function DemoScreen() {
>
<Text style={styles.buttonText}> </Text>
</TouchableOpacity>
<Text style={styles.infoText}>
tabs
</Text>
<Text style={styles.infoText}> tabs</Text>
<TouchableOpacity
style={[styles.button, { backgroundColor: '#9333ea', marginTop: 12 }]}
@@ -309,9 +307,7 @@ export default function DemoScreen() {
>
<Text style={styles.buttonText}>🎨 </Text>
</TouchableOpacity>
<Text style={styles.infoText}>
</Text>
<Text style={styles.infoText}></Text>
<TouchableOpacity
style={[styles.button, { backgroundColor: '#06b6d4', marginTop: 12 }]}
@@ -322,26 +318,18 @@ export default function DemoScreen() {
>
<Text style={styles.buttonText}>📚 </Text>
</TouchableOpacity>
<Text style={styles.infoText}>
使 CSS
</Text>
<Text style={styles.infoText}>使 CSS </Text>
</View>
{/* 租户信息显示 */}
<View style={styles.section}>
<Text style={styles.sectionTitle}>🏢 </Text>
<Text style={styles.infoText}>
: {tenantLoad ? '✅ 已加载' : '❌ 未加载'}
</Text>
<Text style={styles.infoText}>: {tenantLoad ? '✅ 已加载' : '❌ 未加载'}</Text>
{tenantInfo ? (
<>
<Text style={styles.infoText}>TID: {tenantInfo.tid || '无'}</Text>
<Text style={styles.infoText}>
: {tenantInfo.create_time || '无'}
</Text>
<Text style={styles.infoText}>
: {tenantInfo.domain_addr || '无'}
</Text>
<Text style={styles.infoText}>: {tenantInfo.create_time || '无'}</Text>
<Text style={styles.infoText}>: {tenantInfo.domain_addr || '无'}</Text>
</>
) : null}
</View>

View File

@@ -82,7 +82,11 @@ export default function PaperDemo() {
🔘
</Text>
<View style={styles.buttonRow}>
<Button mode="contained" onPress={() => setSnackbarVisible(true)} style={{ marginRight: 8 }}>
<Button
mode="contained"
onPress={() => setSnackbarVisible(true)}
style={{ marginRight: 8 }}
>
Contained
</Button>
<Button mode="outlined" onPress={() => setSnackbarVisible(true)}>
@@ -90,7 +94,11 @@ export default function PaperDemo() {
</Button>
</View>
<View style={styles.buttonRow}>
<Button mode="text" onPress={() => setSnackbarVisible(true)} style={{ marginRight: 8 }}>
<Button
mode="text"
onPress={() => setSnackbarVisible(true)}
style={{ marginRight: 8 }}
>
Text
</Button>
<Button mode="elevated" onPress={() => setSnackbarVisible(true)} icon="camera">
@@ -140,10 +148,21 @@ export default function PaperDemo() {
<Chip icon="star" onPress={() => {}} style={{ marginRight: 8, marginBottom: 8 }}>
</Chip>
<Chip icon="heart" mode="outlined" onPress={() => {}} style={{ marginRight: 8, marginBottom: 8 }}>
<Chip
icon="heart"
mode="outlined"
onPress={() => {}}
style={{ marginRight: 8, marginBottom: 8 }}
>
</Chip>
<Chip icon="close" onPress={() => {}} onClose={() => {}} closeIcon="close-circle" style={{ marginBottom: 8 }}>
<Chip
icon="close"
onPress={() => {}}
onClose={() => {}}
closeIcon="close-circle"
style={{ marginBottom: 8 }}
>
</Chip>
</View>