2026-04-12 00:46:30 -07:00
|
|
|
import Foundation
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
2026-04-12 22:07:35 -07:00
|
|
|
@MainActor
|
2026-04-12 00:46:30 -07:00
|
|
|
final class DaemonConfiguration: ObservableObject {
|
|
|
|
|
@AppStorage("daemonHost") var host: String = "100.x.x.x"
|
|
|
|
|
@AppStorage("daemonPort") var port: Int = 8080
|
|
|
|
|
@AppStorage("developmentTeam") var developmentTeam: String = ""
|
|
|
|
|
@AppStorage("allowProvisioningUpdates") var allowProvisioningUpdates: Bool = true
|
|
|
|
|
@AppStorage("buildInRelease") var buildInRelease: Bool = false
|
|
|
|
|
@AppStorage("lspEnabled") var lspEnabled: Bool = true
|
|
|
|
|
@Published var lspConnected: Bool = false
|
|
|
|
|
|
|
|
|
|
var baseURL: String { "http://\(host):\(port)" }
|
|
|
|
|
var wsBaseURL: String { "ws://\(host):\(port)" }
|
|
|
|
|
var lspWSURL: String { "ws://\(host):\(port)/lsp/stream" }
|
|
|
|
|
var buildConfiguration: String { buildInRelease ? "Release" : "Debug" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum EditorThemeOption: String, CaseIterable, Identifiable, Codable {
|
|
|
|
|
case xcodeDefault = "xcode_dark"
|
|
|
|
|
case xcodeLight = "xcode_light"
|
|
|
|
|
var id: String { rawValue }
|
|
|
|
|
var displayName: String { self == .xcodeDefault ? "Xcode Dark" : "Xcode Light" }
|
|
|
|
|
}
|