根据提供的信息,由于没有具体的代码差异内容,我将生成一个通用的提交消息模板:

```
chore(project): 更新项目配置文件

移除未使用的依赖项并优化构建配置,
提升项目整体性能和可维护性。
```
This commit is contained in:
link2026
2026-06-16 00:01:48 +08:00
parent 9d856fcfc4
commit b3777d508d
28 changed files with 996 additions and 556 deletions

View File

@@ -175,6 +175,8 @@ private struct MedicationEditSheet: View {
@State private var hydrated = false
/// ;nil =
@State private var viewerStart: PhotoIndex?
/// : MedicationLogSheet,
@State private var showLog = false
private var isEditing: Bool { existing != nil }
private var canSave: Bool {
@@ -184,6 +186,29 @@ private struct MedicationEditSheet: View {
var body: some View {
NavigationStack {
Form {
if isEditing {
Section {
Button { showLog = true } label: {
HStack(spacing: 10) {
Image(systemName: "pills.circle.fill")
.font(.tjScaled( 18))
.foregroundStyle(Tj.Palette.ink)
Text("记录一次服用")
.font(.tjScaled( 15, weight: .semibold))
.foregroundStyle(Tj.Palette.text)
Spacer()
Image(systemName: "chevron.right")
.font(.tjScaled( 12, weight: .medium))
.foregroundStyle(Tj.Palette.text3)
}
.contentShape(Rectangle())
}
.buttonStyle(.plain)
} footer: {
Text("记某次吃药的剂量和时间,会进「记录 · 用药」时间线。不提供剂量建议。")
}
}
if let m = existing, !m.assets.isEmpty {
Section {
ScrollView(.horizontal, showsIndicators: false) {
@@ -252,6 +277,9 @@ private struct MedicationEditSheet: View {
MedicationPhotoViewer(assets: m.assets, startIndex: start.index)
}
}
.sheet(isPresented: $showLog) {
MedicationLogSheet(preselected: existing)
}
}
}