songyc macbook 3f91e8889c feat(keging): 도움말 화면 + 영어·일본어 현지화 + 설정 언어 전환
- 첫 화면 우하단 ? 버튼 → 도움말(5그룹 13주제 — 기본 사용법·통계·앱 밖에서·애플워치·설정 기타)
- String Catalog ko(원문)/en/ja 3타깃(iOS 98·워치 15·위젯 9키) 전수 번역, InfoPlist 표시 이름 포함
- 설정 → 언어(시스템/한국어/English/日本語) — AppleLanguages 오버라이드, 재실행 시 적용(하루 다님 방식)
- 검증: Debug·Release·워치 빌드 그린, missing·stale 0, en/ja/ko 화면 QA 7장(도움말·설정·세팅·통계·워치)
- DEBUG 인자 추가: -openHelp/-openSettings/-openTimerSettings/-resetConfig

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UPmp29DQHY6Ahfss5SRopT
2026-08-29 10:33:55 +09:00

112 lines
3.7 KiB
Swift

//
// ContentView.swift
// KegingWatch Watch App
//
// .
// /· · .
//
import SwiftUI
struct WatchContentView: View {
@EnvironmentObject private var engine: KegelEngine
var body: some View {
ZStack {
AppTheme.background.ignoresSafeArea()
switch engine.state {
case .idle:
startScreen
case let .running(phase, rep, phaseStart, phaseEnd):
runningScreen(phase: phase, rep: rep, phaseStart: phaseStart, phaseEnd: phaseEnd)
case let .finished(reps):
finishedScreen(reps: reps)
}
}
.onAppear {
#if DEBUG
if CommandLine.arguments.contains("-autoStart") { WatchCoordinator.shared.startWorkout() }
#endif
}
}
private var startScreen: some View {
VStack(spacing: 8) {
Button {
WatchCoordinator.shared.startWorkout()
} label: {
ZStack {
Circle()
.fill(
LinearGradient(
colors: [AppTheme.green, AppTheme.green.opacity(0.8)],
startPoint: .top, endPoint: .bottom
)
)
VStack(spacing: 2) {
Image(systemName: "play.fill").font(.title3)
Text("시작").font(.headline)
}
.foregroundStyle(Color(hex: "#0F2018"))
}
.frame(width: 108, height: 108)
}
.buttonStyle(.plain)
.accessibilityLabel(Text("케겔 운동 시작"))
Text(SettingsStore.shared.config.summaryText)
.font(.system(size: 11))
.foregroundStyle(.secondary)
.lineLimit(1)
.minimumScaleFactor(0.7)
}
}
private func runningScreen(phase: KegelPhase, rep: Int, phaseStart: Date, phaseEnd: Date) -> some View {
VStack(spacing: 3) {
Text(phase.label)
.font(.title3.bold())
.foregroundStyle(phase == .contract ? AppTheme.green : AppTheme.yellow)
Text(timerInterval: phaseStart...phaseEnd, countsDown: true)
.font(.system(size: 30, weight: .semibold))
.monospacedDigit()
.multilineTextAlignment(.center)
Text("\(rep) / \(engine.config.reps)")
.font(.footnote)
.monospacedDigit()
.foregroundStyle(.secondary)
.accessibilityLabel(Text("현재 \(rep)번째, 전체 \(engine.config.reps)"))
Button {
WatchCoordinator.shared.stopWorkout()
} label: {
Text("중단")
.font(.footnote)
}
.buttonStyle(.bordered)
.tint(.red)
.padding(.top, 2)
}
}
private func finishedScreen(reps: Int) -> some View {
VStack(spacing: 6) {
Image(systemName: "checkmark.circle.fill")
.font(.system(size: 34))
.foregroundStyle(AppTheme.green)
Text("완료!")
.font(.headline)
Text("\(reps)회 완주")
.font(.footnote)
.foregroundStyle(.secondary)
Button {
engine.acknowledgeFinish()
} label: {
Text("확인")
.font(.footnote)
}
.buttonStyle(.bordered)
.padding(.top, 2)
}
}
}