aboutsummaryrefslogtreecommitdiff
path: root/Hotline/State/AppState.swift
blob: 11bae743f3d6b131662adf6463e99bd70339f63c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
}