oficina / docs Public

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

Plain git — no account needed to clone.

Download

Download this file

1#if os(macOS) && canImport(RastrilloMacUpdates)
2import RastrilloMacUpdates
3#endif
4import DocsKit
5import RastrilloApple
6import SwiftUI
7@main struct DocsApp: App {
8 #if os(macOS) && canImport(RastrilloMacUpdates)
9 @State private var updater = NativeUpdater()
10 #endif
11 #if os(macOS)
12 @State private var windows = DocsWindows()
13 @NSApplicationDelegateAdaptor(DocsApplicationDelegate.self) private var appDelegate
14 #endif
15 var body: some Scene {
16 #if os(macOS)
17 Window(docsMacString("Home"), id: "home") { DocsAccountWindow(windows: windows) }
18 .defaultSize(width: 1000, height: 760)
19 .commands {
20 DocsWindowCommands(windows: windows)
21 DocsEditorCommands()
22 #if canImport(RastrilloMacUpdates)
23 NativeUpdateCommands(updater: updater)
24 #endif
25 }
26 WindowGroup(docsMacString("Docs"), id: "document", for: UUID.self) { $id in
27 DocsDocumentWindow(windows: windows, id: id)
28 }
29 .defaultSize(width: 1120, height: 820)
30 .restorationBehavior(.disabled)
31 #else
32 WindowGroup { DocsAccountWindow() }
33 #endif
34 }
35}
36