Skip to content

Commit d3d94a2

Browse files
committed
Add elevation
1 parent 356d160 commit d3d94a2

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

SupportCompanion/Preferences.swift

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,22 @@ class Preferences: ObservableObject {
117117
@AppStorage("SupportEmail") var supportEmail: String = ""
118118

119119
@AppStorage("SupportPhone") var supportPhone: String = ""
120+
121+
// MARK: - Elevate privileges
122+
123+
@AppStorage("EnableElevation") var enableElevation: Bool = false
124+
125+
@AppStorage("ShowElevateTrayCard") var showElevateTrayCard: Bool = true
126+
127+
@AppStorage("MaxElevationTime") var maxElevationTime: Double = 300
128+
129+
@AppStorage("RequireResonForElevation") var requireReasonForElevation: Bool = true
130+
131+
@AppStorage("ReasonMinLength") var reasonMinLength: Int = 10
132+
133+
@AppStorage("ElevationWebhookUrl") var elevationWebhookURL: String = ""
134+
135+
@AppStorage("ElevationSeverity") var elevationSeverity: Int = 6 // Default to "Informational"
120136

121137
init() {
122138
ensureDefaultsInitialized()
@@ -298,7 +314,7 @@ class Preferences: ObservableObject {
298314
} else if let value = value as? Double {
299315
writeCommand = "defaults write \(bundleIdentifier) \(key) -float \(value)"
300316
} else {
301-
print("Unsupported value type for key: \(key)")
317+
Logger.shared.logError("Unsupported value type for key: \(key)")
302318
continue
303319
}
304320

0 commit comments

Comments
 (0)