主体:多语言支持(简体中文源 + 英/日/韩)
- 基础设施:Localizable.xcstrings(String Catalog,sourceLanguage=zh-Hans)
+ pbxproj developmentRegion/knownRegions 注册 en/ja/ko
- 全部硬编码 Locale("zh_CN") → Locale.current;中文 dateFormat → Date.FormatStyle(跟随系统)
- UI 中文字面量统一为 String(appLoc:)(显式绑定所选语言 bundle+locale,即时切换)
Text 字面量走环境 \.locale + Bundle 重定向
- 549 个 catalog key 全部 en/ja/ko 翻译完成(0 未翻译)
- App 内语言切换:我的 → 语言(LanguageManager + 即时生效,无需重启)
- 双用预设(症状/监测指标/慢病)本地化:static→computed 避免缓存
注:本提交为 WIP,一并打包了并行进行的功能模块
(HealthExport 健康导出、Security/Face ID 锁、DiaryAssist 日记 AI 辅助)
及 App 图标、CLAUDE.md、docs/scripts。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
177 lines
8.6 KiB
Swift
177 lines
8.6 KiB
Swift
import SwiftUI
|
|
|
|
/// 「我的 · 关于」——本软件基本介绍、使用注意与免责声明。
|
|
/// 纯静态阅读页,不调任何 Service / AIRuntime,复用现有 DesignSystem token。
|
|
/// 文案按 App Store 上架合规口径撰写:避免绝对化用语、精确区分本地/联网行为、强化医疗免责。
|
|
struct AboutView: View {
|
|
/// 真实读取 Bundle 版本号,避免硬编码与实际发版脱节。
|
|
private var versionText: String {
|
|
let info = Bundle.main.infoDictionary
|
|
let short = info?["CFBundleShortVersionString"] as? String ?? "0.1"
|
|
let build = info?["CFBundleVersion"] as? String
|
|
if let build, !build.isEmpty, build != short {
|
|
return "v\(short) (\(build))"
|
|
}
|
|
return "v\(short)"
|
|
}
|
|
|
|
var body: some View {
|
|
ScrollView {
|
|
VStack(spacing: 16) {
|
|
header
|
|
|
|
section(icon: "sparkles", title: String(appLoc: "这是什么")) {
|
|
paragraph(
|
|
String(appLoc: "康康是一款以本地优先为设计原则的个人健康影像档案工具。") +
|
|
String(appLoc: "你可以拍下体检报告、化验单和影像资料,图片与数据默认保存在本机;") +
|
|
String(appLoc: "设备上的 AI 模型会尝试把专业指标转述为通俗说明,帮你记录并回顾自己的健康变化。")
|
|
)
|
|
}
|
|
|
|
section(icon: "checklist", title: String(appLoc: "主要功能")) {
|
|
bullet(String(appLoc: "拍照归档:拍体检 / 化验报告,尝试识别为结构化指标并存档"))
|
|
bullet(String(appLoc: "通俗解读:设备本地 AI 把指标与趋势转述为易懂的说明"))
|
|
bullet(String(appLoc: "长期趋势:关注的指标可生成折线图和简要解读"))
|
|
bullet(String(appLoc: "本地问答:基于你自己的档案问答,引用可点击回链到原记录"))
|
|
bullet(String(appLoc: "隐私优先:健康数据不上传、无需注册账号"))
|
|
}
|
|
|
|
section(icon: "iphone", title: String(appLoc: "设备要求"), tint: Tj.Palette.leaf) {
|
|
bullet(String(appLoc: "系统:iOS 17 或更新版本。"))
|
|
bullet(String(appLoc: "本地 AI 功能(拍照识别、解读、问答)需要约 8GB 内存,") +
|
|
String(appLoc: "推荐 iPhone 15 Pro / Pro Max 及之后发布的机型(含 iPhone 16 系列)。"))
|
|
bullet(String(appLoc: "在内存较小的旧机型上,App 仍可用于手动记录、归档与查看,") +
|
|
String(appLoc: "但本地 AI 相关功能可能无法运行。"))
|
|
}
|
|
|
|
section(icon: "lock.shield", title: String(appLoc: "隐私保护")) {
|
|
bullet(String(appLoc: "AI 推理在设备本地完成;除下载 AI 模型外,App 不会主动上传你的健康数据。"))
|
|
bullet(String(appLoc: "原图与数据库采用系统级文件加密,随设备锁屏受到保护。"))
|
|
bullet(String(appLoc: "支持删除记录,数据将从本机移除;数据保存在本机,不依赖云端备份。"))
|
|
bullet(String(appLoc: "可选开启 Face ID 启动锁,进一步保护隐私。"))
|
|
}
|
|
|
|
section(icon: "exclamationmark.triangle", title: String(appLoc: "使用注意"), tint: Tj.Palette.amber) {
|
|
bullet(String(appLoc: "本地 AI 模型体积较大(约 4GB),首次使用需联网下载,建议在 Wi-Fi 环境进行;") +
|
|
String(appLoc: "模型未就绪时 App 仍可使用,AI 功能会提示前往下载。"))
|
|
bullet(String(appLoc: "AI 识别与解读可能出现错误或遗漏:拍照得到的数值、单位、参考范围请务必与原始报告核对,") +
|
|
String(appLoc: "并以原始报告 / 化验单为准。"))
|
|
bullet(String(appLoc: "AI 解读基于通用健康知识生成,并不掌握你完整的病史与个体情况,仅供日常记录参考。"))
|
|
bullet(String(appLoc: "数据保存在本设备:卸载 App 或删除数据后可能无法恢复,重要资料请自行留存原件。"))
|
|
}
|
|
|
|
section(icon: "hand.raised", title: String(appLoc: "免责声明"), tint: Tj.Palette.brick) {
|
|
bullet(String(appLoc: "康康是一款健康信息记录与参考工具,并非医疗器械,不提供医疗诊断、用药或剂量建议、急诊判断等医疗服务。"))
|
|
bullet(String(appLoc: "App 内所有 AI 生成的解读、趋势分析与问答内容仅供信息参考,") +
|
|
String(appLoc: "不构成医疗建议,也不能替代执业医师、药师或其他专业人员的面诊、检查与意见。"))
|
|
bullet(String(appLoc: "任何健康决策(是否就医、用药、调整治疗方案等)请咨询专业医疗人员,并以其意见为准。"))
|
|
bullet(String(appLoc: "如出现身体不适或紧急情况,请及时就医或拨打当地急救电话,请勿依赖本 App 进行判断。"))
|
|
bullet(String(appLoc: "在适用法律允许的范围内,因使用本 App 或依赖其中内容所产生的后果,由使用者自行承担。"))
|
|
}
|
|
|
|
Text("康康 · 本地优先的健康档案 · \(versionText)")
|
|
.font(.system(size: 12))
|
|
.foregroundStyle(Tj.Palette.text3)
|
|
.padding(.top, 4)
|
|
|
|
Text("本 App 仅供健康信息记录与参考,不能替代专业医疗意见。")
|
|
.font(.system(size: 11))
|
|
.foregroundStyle(Tj.Palette.text3)
|
|
.multilineTextAlignment(.center)
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
|
|
Spacer(minLength: 32)
|
|
}
|
|
.padding(.horizontal, 16)
|
|
.padding(.vertical, 20)
|
|
}
|
|
.background(Tj.Palette.sand)
|
|
.navigationTitle("关于")
|
|
.navigationBarTitleDisplayMode(.inline)
|
|
}
|
|
|
|
// MARK: - Header
|
|
|
|
@ViewBuilder private var header: some View {
|
|
VStack(spacing: 12) {
|
|
ZStack {
|
|
RoundedRectangle(cornerRadius: Tj.Radius.md, style: .continuous)
|
|
.fill(Tj.Palette.sand2)
|
|
Image(systemName: "heart.text.square.fill")
|
|
.font(.system(size: 34))
|
|
.foregroundStyle(Tj.Palette.brick)
|
|
}
|
|
.frame(width: 72, height: 72)
|
|
|
|
Text("康康")
|
|
.font(.tjH2())
|
|
.foregroundStyle(Tj.Palette.text)
|
|
|
|
Text("本地优先的个人健康影像档案")
|
|
.font(.system(size: 13))
|
|
.foregroundStyle(Tj.Palette.text2)
|
|
|
|
Text(versionText)
|
|
.font(.tjMono())
|
|
.foregroundStyle(Tj.Palette.text3)
|
|
}
|
|
.frame(maxWidth: .infinity)
|
|
.padding(.vertical, 24)
|
|
.padding(.horizontal, 16)
|
|
.tjCard()
|
|
}
|
|
|
|
// MARK: - Section builders
|
|
|
|
@ViewBuilder
|
|
private func section<Content: View>(
|
|
icon: String,
|
|
title: String,
|
|
tint: Color = Tj.Palette.text2,
|
|
@ViewBuilder content: () -> Content
|
|
) -> some View {
|
|
VStack(alignment: .leading, spacing: 10) {
|
|
HStack(spacing: 8) {
|
|
Image(systemName: icon)
|
|
.font(.system(size: 15, weight: .semibold))
|
|
.foregroundStyle(tint)
|
|
Text(title)
|
|
.font(.system(size: 16, weight: .semibold))
|
|
.foregroundStyle(Tj.Palette.text)
|
|
}
|
|
content()
|
|
}
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.padding(16)
|
|
.tjCard()
|
|
}
|
|
|
|
@ViewBuilder private func paragraph(_ text: String) -> some View {
|
|
Text(text)
|
|
.font(.system(size: 14))
|
|
.foregroundStyle(Tj.Palette.text2)
|
|
.lineSpacing(5)
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
}
|
|
|
|
@ViewBuilder private func bullet(_ text: String) -> some View {
|
|
HStack(alignment: .top, spacing: 8) {
|
|
Circle()
|
|
.fill(Tj.Palette.text3)
|
|
.frame(width: 5, height: 5)
|
|
.padding(.top, 7)
|
|
Text(text)
|
|
.font(.system(size: 14))
|
|
.foregroundStyle(Tj.Palette.text2)
|
|
.lineSpacing(5)
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
NavigationStack {
|
|
AboutView()
|
|
}
|
|
}
|