feat(timeline): TimelineRow + DateSection + grouping tests + Diary sheet
- TimelineRow: 时间线条目单行视图 - DateSection + TimelineGrouping: 今日/昨日/本周/更早分组 - DiaryQuickSheet: 文字日记快速记录入口 - TimelineGroupingTests: 分组逻辑烟测 - SymptomEndSheet / RootView: 配套微调
This commit is contained in:
@@ -30,6 +30,7 @@ struct RootView: View {
|
||||
@State private var showRecordSheet = false
|
||||
@State private var activeFlow: ActiveFlow?
|
||||
@State private var showSymptomStart = false
|
||||
@State private var showDiary = false
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
@@ -56,7 +57,7 @@ struct RootView: View {
|
||||
case .quick: activeFlow = .quick
|
||||
case .archive: activeFlow = .archive
|
||||
case .symptom: showSymptomStart = true
|
||||
case .diary: break
|
||||
case .diary: showDiary = true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,6 +65,9 @@ struct RootView: View {
|
||||
.sheet(isPresented: $showSymptomStart) {
|
||||
SymptomStartSheet()
|
||||
}
|
||||
.sheet(isPresented: $showDiary) {
|
||||
DiaryQuickSheet()
|
||||
}
|
||||
#if os(iOS)
|
||||
.fullScreenCover(item: $activeFlow) { flow in
|
||||
switch flow {
|
||||
|
||||
Reference in New Issue
Block a user