feat(mini): align companion pages and show OTA progress
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { getParticipantArtwork } from '@/utils/artwork'
|
||||
import { getPageStyle } from '@/utils/page-style'
|
||||
import { View, Text, ScrollView, Image } from '@tarojs/components'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import Taro, { useRouter } from '@tarojs/taro'
|
||||
@@ -747,14 +749,14 @@ export default function ChatDetail() {
|
||||
}
|
||||
|
||||
return (
|
||||
<View className='chat-detail-page'>
|
||||
<View className='chat-detail-page' style={getPageStyle(true)}>
|
||||
<View className='chat-header'>
|
||||
<View className='back-btn' onClick={handleBack}>
|
||||
<Image src={require('../../../assets/tab-icons/arrow-left.png')} className='back-arrow-img' />
|
||||
</View>
|
||||
<View className='character-info'>
|
||||
<View className='character-avatar'>
|
||||
<Text>{character.icon}</Text>
|
||||
<Image className='chat-avatar-art' src={getParticipantArtwork(character.peerKind, decodedRoleKey)} mode='aspectFit' />
|
||||
</View>
|
||||
<View className='character-text'>
|
||||
<Text className='character-name'>{character.name}</Text>
|
||||
@@ -797,13 +799,13 @@ export default function ChatDetail() {
|
||||
</View>
|
||||
</View>
|
||||
<View className='user-avatar'>
|
||||
<Text className='avatar-img'>{msg.senderType === 'parent' ? '👨' : '👦'}</Text>
|
||||
<Image className='chat-avatar-art' src={getParticipantArtwork(msg.senderType)} mode='aspectFit' />
|
||||
</View>
|
||||
</View>
|
||||
) : (
|
||||
<View className='message-item peer'>
|
||||
<View className='peer-avatar'>
|
||||
<Text className='robot-emoji'>{msg.senderType === 'child' ? '🧒' : character.icon}</Text>
|
||||
<Image className='chat-avatar-art' src={getParticipantArtwork(msg.senderType || character.peerKind, decodedRoleKey)} mode='aspectFit' />
|
||||
</View>
|
||||
<View className='message-main'>
|
||||
<Text className='message-meta'>{formatParticipantLabel(msg)}</Text>
|
||||
|
||||
Reference in New Issue
Block a user