oficina / sheets Public

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

Plain git — no account needed to clone.

Download

Download this file

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