e717de69ca
- standalone watchOS(WKApplication + WKWatchOnly), 다크 OLED, xcodegen 단일 타깃 - 4기능 = 이드(AI채팅)·공부(암기카드)·할일·브리핑 - 라이브: 공부 /study-cards(due·rate·flag) · 할일 /events(today·complete) · 브리핑 /briefing/latest · 이드 /eid/chat(SSE 누적, unavailable 처리) - 1회 로그인(access 메모리 + refresh 쿠키 7일 영속) + 401 자동 refresh+재시도 - 햅틱 피드백 + 정직한 로딩/빈/오류 상태 + DS 초록 아이콘(원형 마스킹) - 맥·아이폰은 웹 래퍼로(2026-06-15 결정), 순수 네이티브는 워치 전용 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
819 B
Swift
29 lines
819 B
Swift
import SwiftUI
|
|
|
|
/// DS 애플워치 앱 (standalone). 4기능 = 이드(AI채팅)·공부(암기카드)·할 일·브리핑.
|
|
/// 공부 = 라이브 결선(/study-cards/due·rate) / 나머지 = 스캐폴드. 다크 OLED.
|
|
@main
|
|
struct DSWatchApp: App {
|
|
@State private var model = WatchModel()
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
RootGate()
|
|
.environment(model)
|
|
.task { await model.bootstrap() }
|
|
}
|
|
}
|
|
}
|
|
|
|
/// 인증 게이트: checking(쿠키 복귀) → loggedOut(로그인) → ready(메뉴).
|
|
struct RootGate: View {
|
|
@Environment(WatchModel.self) private var model
|
|
var body: some View {
|
|
switch model.phase {
|
|
case .checking: ProgressView()
|
|
case .loggedOut: LoginView()
|
|
case .ready: RootMenu()
|
|
}
|
|
}
|
|
}
|