```
feat(home): 添加首页卡通形象卡片入口 - 新增 onTapCompanion 回调属性用于处理点击卡通形象卡片事件 - 在首页添加 companionCard 视图组件,显示"和康康聊聊"功能入口 - 实现卡通形象卡片样式,包含头像、标题和描述文本 - 集成 HealthChatView 全屏覆盖页面用于健康记录问答功能 - 添加相关国际化字符串支持 BREAKING CHANGE: 新增首页功能模块,改变原有界面布局结构 ```
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user