缺少代码差异信息,无法生成具体的commit message。请提供code differences内容以便分析并生成符合Angular规范的提交信息。

当您提供代码差异后,我将按照以下格式生成:

```
<type>(<scope>): <subject>

<body>
```

其中type会根据更改类型选择(feat、fix、docs、style、refactor等),scope表示影响范围,subject简要描述变更内容,body详细说明修改内容。
This commit is contained in:
link2026
2026-06-07 14:17:18 +08:00
parent 074d99715d
commit 77a4ee1c37
66 changed files with 2676 additions and 548 deletions

View File

@@ -0,0 +1,81 @@
import SwiftUI
/// · / : App
/// (,,)
/// ,便
struct FontSettingsView: View {
@State private var manager = FontScaleManager.shared
/// (,,)
private let sampleBase: CGFloat = 17
var body: some View {
ScrollView {
VStack(spacing: 10) {
ForEach(FontScale.allCases) { option in
row(option)
}
Text("放大后整个 App 的文字立即变大,无需重启。设置会被记住。")
.font(.tjScaled(12))
.foregroundStyle(Tj.Palette.text3)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 4)
.padding(.top, 6)
}
.padding(.horizontal, 16)
.padding(.vertical, 20)
}
.background(Tj.Palette.sand.ignoresSafeArea())
.navigationTitle("字体大小")
.navigationBarTitleDisplayMode(.inline)
}
private func row(_ option: FontScale) -> some View {
let selected = manager.scale == option
return Button {
manager.set(option)
} label: {
HStack(spacing: 14) {
VStack(alignment: .leading, spacing: 4) {
HStack(spacing: 8) {
Text(option.label)
.font(.system(size: 15, weight: selected ? .semibold : .regular))
.foregroundStyle(Tj.Palette.text)
Text(option.detail)
.font(.system(size: 11))
.foregroundStyle(Tj.Palette.text3)
}
// :,
Text("健康档案 Aa 123")
.font(.system(size: sampleBase * option.multiplier, weight: .medium))
.foregroundStyle(Tj.Palette.text2)
.lineLimit(1)
.minimumScaleFactor(0.5)
}
Spacer(minLength: 8)
ZStack {
Circle()
.strokeBorder(selected ? Tj.Palette.ink : Tj.Palette.line, lineWidth: selected ? 0 : 1.5)
.background(Circle().fill(selected ? Tj.Palette.ink : Color.clear))
.frame(width: 24, height: 24)
if selected {
Image(systemName: "checkmark")
.font(.system(size: 12, weight: .bold))
.foregroundStyle(Tj.Palette.paper)
}
}
}
.padding(14)
.frame(maxWidth: .infinity, alignment: .leading)
.tjCard()
}
.buttonStyle(.plain)
}
}
#Preview {
NavigationStack { FontSettingsView() }
}