forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebugView.swift
More file actions
58 lines (53 loc) · 2.25 KB
/
DebugView.swift
File metadata and controls
58 lines (53 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import Preferences
import SwiftUI
final class DebugSettings: ObservableObject {
@AppStorage(\.animationACrashSuggestion) var animationACrashSuggestion
@AppStorage(\.animationBCrashSuggestion) var animationBCrashSuggestion
@AppStorage(\.animationCCrashSuggestion) var animationCCrashSuggestion
@AppStorage(\.preCacheOnFileOpen) var preCacheOnFileOpen
@AppStorage(\.useCustomScrollViewWorkaround) var useCustomScrollViewWorkaround
@AppStorage(\.triggerActionWithAccessibilityAPI) var triggerActionWithAccessibilityAPI
@AppStorage(\.alwaysAcceptSuggestionWithAccessibilityAPI)
var alwaysAcceptSuggestionWithAccessibilityAPI
@AppStorage(\.enableXcodeInspectorDebugMenu) var enableXcodeInspectorDebugMenu
init() {}
}
struct DebugSettingsView: View {
@StateObject var settings = DebugSettings()
var body: some View {
ScrollView {
Form {
Toggle(isOn: $settings.animationACrashSuggestion) {
Text("Enable Animation A")
}
Toggle(isOn: $settings.animationBCrashSuggestion) {
Text("Enable Animation B")
}
Toggle(isOn: $settings.animationCCrashSuggestion) {
Text("Enable Widget Breathing Animation")
}
Toggle(isOn: $settings.preCacheOnFileOpen) {
Text("Cache editor information on file open")
}
Toggle(isOn: $settings.useCustomScrollViewWorkaround) {
Text("Use custom scroll view workaround for smooth scrolling")
}
Toggle(isOn: $settings.triggerActionWithAccessibilityAPI) {
Text("Trigger command with AccessibilityAPI")
}
Toggle(isOn: $settings.alwaysAcceptSuggestionWithAccessibilityAPI) {
Text("Always accept suggestion with AccessibilityAPI")
}
Toggle(isOn: $settings.enableXcodeInspectorDebugMenu) {
Text("Enable Xcode inspector debug menu")
}
}
.padding()
}
}
}
struct DebugSettingsView_Preview: PreviewProvider {
static var previews: some View {
DebugSettingsView()
}
}