mycode/myApp/Keging/IOS/TimerSettingsView.swift
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

67 lines
2.7 KiB
Swift

//
// TimerSettingsView.swift
// Keging
//
// · , ,
//
import SwiftUI
struct TimerSettingsView: View {
@EnvironmentObject private var settings: SettingsStore
@Environment(\.dismiss) private var dismiss
var body: some View {
NavigationStack {
Form {
Section {
Stepper(value: $settings.config.contractSeconds, in: 1...60) {
LabeledContent("수축", value: String(localized: "\(settings.config.contractSeconds)"))
}
Stepper(value: $settings.config.relaxSeconds, in: 1...60) {
LabeledContent("이완", value: String(localized: "\(settings.config.relaxSeconds)"))
}
Stepper(value: $settings.config.reps, in: 1...100) {
LabeledContent("횟수", value: String(localized: "\(settings.config.reps)"))
}
} header: {
Text("사이클")
} footer: {
Text("수축 → 이완을 \(settings.config.reps)회 반복해요. 한 세트 약 \(durationText).")
}
Section {
Picker("수축 진동", selection: $settings.config.contractPattern) {
ForEach(HapticPattern.allCases) { Text($0.label).tag($0) }
}
Picker("이완 진동", selection: $settings.config.relaxPattern) {
ForEach(HapticPattern.allCases) { Text($0.label).tag($0) }
}
Button("수축 진동 미리 느끼기") { Haptics.play(settings.config.contractPattern) }
Button("이완 진동 미리 느끼기") { Haptics.play(settings.config.relaxPattern) }
} header: {
Text("진동 패턴")
} footer: {
Text("수축과 이완의 진동이 달라 화면을 보지 않아도 구분할 수 있어요. 진동은 실기기에서만 느껴져요.")
}
}
.navigationTitle("운동 세팅")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .confirmationAction) {
Button("완료") { dismiss() }
}
}
}
}
private var durationText: String {
let total = Int(settings.config.totalDuration)
let minutes = total / 60
let seconds = total % 60
if minutes == 0 { return String(localized: "\(seconds)") }
if seconds == 0 { return String(localized: "\(minutes)") }
return String(localized: "\(minutes)\(seconds)")
}
}