Download this file
| 1 | // Isolated visual review app, never part of the production target. |
| 2 | import SwiftUI |
| 3 | import RastrilloApple |
| 4 | import CalendarKit |
| 5 | struct ReviewInput: Decodable { let origin: URL; let credential: NativeSession } |
| 6 | @main struct ReviewPhone: App { |
| 7 | @StateObject private var model = CalendarModel() |
| 8 | private let client: NativeHTTP |
| 9 | init() { |
| 10 | let path = URL.documentsDirectory.appendingPathComponent("review.json") |
| 11 | let input = try! JSONDecoder().decode(ReviewInput.self, from: Data(contentsOf: path)) |
| 12 | precondition(input.origin.host == "127.0.0.1") |
| 13 | client = NativeHTTP(origin: input.origin, credential: input.credential) |
| 14 | } |
| 15 | var body: some Scene { |
| 16 | WindowGroup { |
| 17 | CalendarWorkspace(client: client, model: model, signOut: {}) |
| 18 | .tint(Color(red: 0.76, green: 0.2, blue: 0.3)) |
| 19 | .task { model.date = ISO8601DateFormatter().date(from: "2026-10-24T12:00:00Z")!; await model.load(client) } |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |