Refine device-first baby management

This commit is contained in:
stu2not
2026-07-02 11:43:09 +08:00
parent 998401f8c9
commit b4fef6d2e0
11 changed files with 275 additions and 201 deletions
+10 -10
View File
@@ -66,7 +66,7 @@ function buildLocationDetailLines(
const lines: string[] = []
if (options?.includeIdentity) {
lines.push(`设备 ${point.device_id} · ${point.child_name || '未命名儿童'}`)
lines.push(`设备 ${point.device_id} · ${point.child_name || '未命名宝贝'}`)
}
lines.push(`上报时间 ${formatTime(point.device_time)}`)
@@ -177,10 +177,10 @@ export default function Location() {
setSelectedPoint(null)
setCoordinates(DEFAULT_COORDINATES)
setEmptyState({
title: '还没有当前孩子',
desc: '请先去设置与管理页创建或选择一个孩子,再查看定位。',
actionText: '去设置与管理',
actionUrl: '/pages/sleep/index',
title: '还没有当前宝贝',
desc: '请先绑定设备,并在绑定流程中创建或选择宝贝,再查看定位。',
actionText: '去绑定设备',
actionUrl: '/pages/bind/index',
})
return
}
@@ -192,8 +192,8 @@ export default function Location() {
setSelectedPoint(null)
setCoordinates(DEFAULT_COORDINATES)
setEmptyState({
title: '当前孩子还没有绑定设备',
desc: '先给当前孩子绑定一台设备,定位和轨迹页才会有内容。',
title: '当前宝贝还没有绑定设备',
desc: '先给当前宝贝绑定一台设备,定位和轨迹页才会有内容。',
actionText: '去绑定设备',
actionUrl: '/pages/bind/index',
})
@@ -397,7 +397,7 @@ export default function Location() {
<View className='location-empty-shell'>
<View className='location-empty-card'>
<Text className='location-empty-title'>设备定位与轨迹</Text>
<Text className='location-empty-desc'>绑定设备后,可在这里查看孩子设备的位置、更新时间和定位精度。</Text>
<Text className='location-empty-desc'>绑定设备后,可在这里查看宝贝设备的位置、更新时间和定位精度。</Text>
<View
className='location-empty-action'
onClick={() => {
@@ -501,7 +501,7 @@ export default function Location() {
</View>
) : (
<View className='location-empty'>
<Text className='location-empty-title'>{locationNotice || '当前孩子暂无设备位置'}</Text>
<Text className='location-empty-title'>{locationNotice || '当前宝贝暂无设备位置'}</Text>
{locationNotice && <Text className='location-empty-desc'>请确认设备已开机并保持网络可用。</Text>}
</View>
)
@@ -545,7 +545,7 @@ export default function Location() {
<View className='location-empty'>
<Text className='location-empty-title'>暂无轨迹</Text>
<Text className='location-empty-desc'>
{trajectoryMode === 'today' ? '当前孩子今天还没有新的历史点位。' : '当前孩子最近没有新的历史点位。'}
{trajectoryMode === 'today' ? '当前宝贝今天还没有新的历史点位。' : '当前宝贝最近没有新的历史点位。'}
</Text>
</View>
)}