feat(home): 添加首页卡通形象卡片入口

- 新增 onTapCompanion 回调属性用于处理点击卡通形象卡片事件
- 在首页添加 companionCard 视图组件,显示"和康康聊聊"功能入口
- 实现卡通形象卡片样式,包含头像、标题和描述文本
- 集成 HealthChatView 全屏覆盖页面用于健康记录问答功能
- 添加相关国际化字符串支持

BREAKING CHANGE: 新增首页功能模块,改变原有界面布局结构
```
This commit is contained in:
link2026
2026-07-19 19:40:02 +08:00
parent 198570186e
commit ef5364d8c3
10 changed files with 1736 additions and 1 deletions

View File

@@ -61,6 +61,8 @@ struct RootView: View {
@State private var showMedicationScan = false
/// · :sheet + NavigationStack
@State private var showMedicationLibrary = false
/// :(RAG)
@State private var showHealthChat = false
/// ( RecordSheet onPick )
private func route(_ intent: VoiceIntent) {
@@ -90,7 +92,7 @@ struct RootView: View {
case .home: HomeView(onTapArchive: { kind in
pendingRecordsFilter = kind
select(.records)
})
}, onTapCompanion: { showHealthChat = true })
case .records: ArchiveListView(initialFilter: pendingRecordsFilter)
case .trend: TrendsView()
case .me: MeView()
@@ -185,6 +187,9 @@ struct RootView: View {
onClose: { showMedicationScan = false }
)
}
.fullScreenCover(isPresented: $showHealthChat) {
HealthChatView(onClose: { showHealthChat = false })
}
#if os(iOS)
.fullScreenCover(item: $activeFlow) { flow in
switch flow {