oficina / memoria Public

Clone
git clone https://amadan.net/oficina/memoria

Plain git — no account needed to clone.

Download

Download this file

1// Isolated visual review app, never part of the production target.
2import SwiftUI
3import RastrilloApple
4import MemoriaKit
5struct ReviewInput: Decodable { let origin: URL; let credential: NativeSession }
6@main struct ReviewPhone: App {
7 @StateObject private var model = MemoriaModel()
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 MemoriaWorkspace(client: client, model: model, signOut: {})
18 .tint(Color(red: 0.48, green: 0.32, blue: 0.68))
19 .task { model.query = "nebula"; await model.search(client) }
20 }
21 }
22}
23