diff options
Diffstat (limited to 'Hotline/State/AppState.swift')
| -rw-r--r-- | Hotline/State/AppState.swift | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Hotline/State/AppState.swift b/Hotline/State/AppState.swift new file mode 100644 index 0000000..11bae74 --- /dev/null +++ b/Hotline/State/AppState.swift @@ -0,0 +1,24 @@ +import SwiftUI + +extension EnvironmentValues { + @Entry var appState: AppState = AppState.shared +} + +@Observable +final class AppState { + static let shared = AppState() + + private init() { + + } + + var activeHotline: Hotline? = nil + var activeServerState: ServerState? = nil + + // Frontmost server window information + var activeServerID: UUID? = nil + var activeServerBanner: NSImage? = nil + var activeServerName: String? = nil + + var cloudKitReady: Bool = false +} |