feat: 首页更新
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user