#if os(macOS) && canImport(RastrilloMacUpdates) import RastrilloMacUpdates #endif import DocsKit import RastrilloApple import SwiftUI @main struct DocsApp: App { #if os(macOS) && canImport(RastrilloMacUpdates) @State private var updater = NativeUpdater() #endif #if os(macOS) @State private var windows = DocsWindows() @NSApplicationDelegateAdaptor(DocsApplicationDelegate.self) private var appDelegate #endif var body: some Scene { #if os(macOS) Window(docsMacString("Home"), id: "home") { DocsAccountWindow(windows: windows) } .defaultSize(width: 1000, height: 760) .commands { DocsWindowCommands(windows: windows) DocsEditorCommands() #if canImport(RastrilloMacUpdates) NativeUpdateCommands(updater: updater) #endif } WindowGroup(docsMacString("Docs"), id: "document", for: UUID.self) { $id in DocsDocumentWindow(windows: windows, id: id) } .defaultSize(width: 1120, height: 820) .restorationBehavior(.disabled) #else WindowGroup { DocsAccountWindow() } #endif } }