feat(ui): 统一健康卡片标题图标并优化语音录音稳定性
- 为所有健康数据卡片添加对应功能图标,提升视觉一致性 - 将“小鱼干”文案统一为“能量值”,并更新获取说明 - 语音录音页面增加组件卸载保护、错误提示与资源清理逻辑 - 个人页支持毛玻璃按钮样式,默认用户名置空 - 新增血氧、饮食、心情、压力、睡眠、步数、体重等图标资源 - 升级 react-native-purchases 至 9.4.3 - 移除 useAuthGuard 调试日志
This commit is contained in:
@@ -6,12 +6,14 @@ import { useAppDispatch, useAppSelector } from '@/hooks/redux';
|
||||
import { useAuthGuard } from '@/hooks/useAuthGuard';
|
||||
import { useNotifications } from '@/hooks/useNotifications';
|
||||
import { DEFAULT_MEMBER_NAME, fetchActivityHistory, fetchMyProfile } from '@/store/userSlice';
|
||||
import { getItem, setItem } from '@/utils/kvStore';
|
||||
import { log } from '@/utils/logger';
|
||||
import { getNotificationEnabled, setNotificationEnabled as saveNotificationEnabled } from '@/utils/userPreferences';
|
||||
import { getItem, setItem } from '@/utils/kvStore';
|
||||
import { Button, Host, Text as SwiftText } from '@expo/ui/swift-ui';
|
||||
import { frame, glassEffect } from '@expo/ui/swift-ui/modifiers';
|
||||
import { Ionicons } from '@expo/vector-icons';
|
||||
|
||||
import { useFocusEffect } from '@react-navigation/native';
|
||||
import { isLiquidGlassAvailable } from 'expo-glass-effect';
|
||||
import { Image } from 'expo-image';
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
@@ -25,6 +27,7 @@ export default function PersonalScreen() {
|
||||
const { confirmLogout, confirmDeleteAccount, isLoggedIn, pushIfAuthedElseLogin } = useAuthGuard();
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
const isLgAvaliable = isLiquidGlassAvailable()
|
||||
|
||||
// 推送通知相关
|
||||
const {
|
||||
@@ -212,9 +215,35 @@ export default function PersonalScreen() {
|
||||
<Text style={styles.userName}>{displayName}</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<TouchableOpacity style={styles.editButton} onPress={() => pushIfAuthedElseLogin('/profile/edit')}>
|
||||
{isLgAvaliable ? <Host style={{
|
||||
marginRight: 18,
|
||||
}}>
|
||||
<Button
|
||||
variant='default'
|
||||
onPress={() => {
|
||||
console.log(111111);
|
||||
|
||||
// pushIfAuthedElseLogin('/profile/edit')
|
||||
}}
|
||||
modifiers={[
|
||||
frame({
|
||||
width: 60,
|
||||
height: 30,
|
||||
}),
|
||||
glassEffect({
|
||||
glass: {
|
||||
variant: 'regular',
|
||||
interactive: true
|
||||
}
|
||||
})
|
||||
]} >
|
||||
<SwiftText size={14} color='black' weight={'medium'}>编辑</SwiftText>
|
||||
</Button>
|
||||
</Host> : <TouchableOpacity style={styles.editButton} onPress={() => pushIfAuthedElseLogin('/profile/edit')}>
|
||||
<Text style={styles.editButtonText}>编辑</Text>
|
||||
</TouchableOpacity>
|
||||
</TouchableOpacity>}
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
</View>
|
||||
@@ -381,7 +410,7 @@ export default function PersonalScreen() {
|
||||
transition={200}
|
||||
cachePolicy="memory-disk"
|
||||
/> */}
|
||||
<Text style={styles.fishRecordText}>鱼干记录</Text>
|
||||
<Text style={styles.fishRecordText}>能量记录</Text>
|
||||
</View>
|
||||
<ActivityHeatMap />
|
||||
{menuSections.map((section, index) => (
|
||||
|
||||
Reference in New Issue
Block a user