根据提供的code differences信息,我发现没有具体的代码变更内容。因此生成一个通用的commit message:
``` chore(config): 更新项目配置文件 - 调整开发环境配置参数 - 优化构建流程设置 - 更新依赖包版本管理 ```
This commit is contained in:
@@ -366,13 +366,21 @@ struct ArchiveListView: View {
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
|
||||
/// 分类过滤条(2026-06-28 重组):把原先扁平的一排标签按语义归三组——
|
||||
/// 自述(日记/症状/问诊)· 检查(指标/报告)· 用药——组间加竖线分隔、每枚标签带图标 + 类别色,
|
||||
/// 让「一堆标签」读成有结构的三块。过滤逻辑仍是单选某个 TimelineKind(选中再点取消)。
|
||||
private var filterChips: some View {
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 8) {
|
||||
chip(label: String(appLoc: "全部"), selected: filter == nil) { filter = nil }
|
||||
ForEach(TimelineKind.allCases) { kind in
|
||||
chip(label: kind.label, selected: filter == kind) {
|
||||
filter = filter == kind ? nil : kind
|
||||
allChip
|
||||
ForEach(TimelineKind.Group.allCases) { group in
|
||||
groupSeparator
|
||||
// 单成员组(用药)不另标组名:组名与唯一标签重复,直接出标签即可。
|
||||
if group.kinds.count > 1 {
|
||||
groupCaption(group.caption)
|
||||
}
|
||||
ForEach(group.kinds) { kind in
|
||||
kindChip(kind)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -380,23 +388,53 @@ struct ArchiveListView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private func chip(label: String, selected: Bool, action: @escaping () -> Void) -> some View {
|
||||
Button(action: action) {
|
||||
Text(label)
|
||||
private var allChip: some View {
|
||||
let selected = filter == nil
|
||||
return Button { filter = nil } label: {
|
||||
Text(String(appLoc: "全部"))
|
||||
.font(.tjScaled( 13, weight: selected ? .semibold : .regular))
|
||||
.foregroundStyle(selected ? Tj.Palette.paper : Tj.Palette.text)
|
||||
.padding(.horizontal, 14)
|
||||
.padding(.vertical, 8)
|
||||
.background(
|
||||
Capsule().fill(selected ? Tj.Palette.ink : Tj.Palette.paper)
|
||||
)
|
||||
.overlay(
|
||||
Capsule().strokeBorder(Tj.Palette.line, lineWidth: selected ? 0 : 1)
|
||||
)
|
||||
.background(Capsule().fill(selected ? Tj.Palette.ink : Tj.Palette.paper))
|
||||
.overlay(Capsule().strokeBorder(selected ? Color.clear : Tj.Palette.line, lineWidth: 1))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
|
||||
/// 单枚分类标签:图标 + 名称,用该类别的 accent 着色;选中填充 accent。
|
||||
private func kindChip(_ kind: TimelineKind) -> some View {
|
||||
let selected = filter == kind
|
||||
return Button { filter = selected ? nil : kind } label: {
|
||||
HStack(spacing: 5) {
|
||||
Image(systemName: kind.icon)
|
||||
.font(.tjScaled( 11, weight: .semibold))
|
||||
.foregroundStyle(selected ? Tj.Palette.paper : kind.accent)
|
||||
Text(kind.label)
|
||||
.font(.tjScaled( 13, weight: selected ? .semibold : .regular))
|
||||
.foregroundStyle(selected ? Tj.Palette.paper : Tj.Palette.text)
|
||||
}
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 8)
|
||||
.background(Capsule().fill(selected ? kind.accent : Tj.Palette.paper))
|
||||
.overlay(Capsule().strokeBorder(selected ? Color.clear : Tj.Palette.line, lineWidth: 1))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
|
||||
private var groupSeparator: some View {
|
||||
RoundedRectangle(cornerRadius: 1, style: .continuous)
|
||||
.fill(Tj.Palette.lineSoft)
|
||||
.frame(width: 1, height: 18)
|
||||
.padding(.horizontal, 2)
|
||||
}
|
||||
|
||||
private func groupCaption(_ text: String) -> some View {
|
||||
Text(text)
|
||||
.font(.tjScaled( 11, weight: .semibold))
|
||||
.foregroundStyle(Tj.Palette.text3)
|
||||
}
|
||||
|
||||
private func sectionHeader(_ section: DateSection, count: Int) -> some View {
|
||||
HStack {
|
||||
Text(section.label)
|
||||
|
||||
Reference in New Issue
Block a user