feat(macos): add connections settings

# Conflicts:
#	apps/macos/Sources/Clawdis/SettingsRootView.swift
This commit is contained in:
Peter Steinberger
2025-12-20 23:41:37 +01:00
parent ce4b68d5fb
commit 43ba1671f1
6 changed files with 780 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import ClawdisProtocol
import Foundation
extension AnyCodable {
var stringValue: String? { self.value as? String }
var boolValue: Bool? { self.value as? Bool }
var intValue: Int? { self.value as? Int }
var doubleValue: Double? { self.value as? Double }
var dictionaryValue: [String: AnyCodable]? { self.value as? [String: AnyCodable] }
var arrayValue: [AnyCodable]? { self.value as? [AnyCodable] }
var foundationValue: Any {
switch self.value {
case let dict as [String: AnyCodable]:
dict.mapValues { $0.foundationValue }
case let array as [AnyCodable]:
array.map(\.foundationValue)
default:
self.value
}
}
}