import Link from "next/link"; import { ChevronRight, Smartphone } from "lucide-react"; import { BindDeviceForm } from "@/components/dashboard-actions"; import { PanelShell } from "@/components/panel-shell"; import { getCaregiverDevices } from "@/lib/caregiver-panel"; import { formatDateTime, getDeviceName } from "@/lib/panel-format"; import { requireCaregiverSession } from "@/lib/page-auth"; import { getCaregiverDisplayName } from "@/lib/session"; export const dynamic = "force-dynamic"; export default async function DevicesPage() { const caregiver = await requireCaregiverSession("/devices"); const devices = await getCaregiverDevices(caregiver.id); const unread = devices.reduce((n, d) => n + d.elderUnreadCount, 0); return ( 扫码绑定}>
{devices.length ? devices.map((binding) => ( {getDeviceName(binding.alias, binding.elderDevice.displayName)} {formatDateTime(binding.elderDevice.lastSeenAt)} · 留言 {binding.elderDevice._count.messages} · 对话 {binding.elderDevice._count.conversationTurns} · 服务 {binding.elderDevice._count.toolCalls} {binding.elderUnreadCount > 0 ? {binding.elderUnreadCount} : null} )) :
还没有连接设备,扫描长辈屏幕上的二维码即可添加。
}
如何连接长辈的设备?展开

1. 让长辈打开陪伴屏上的「家人连接」页面。

2. 扫描二维码,或把设备码粘贴到上方输入框。

3. 连接后即可收到长辈的留言、对话与使用动态。

); }