3 struct AdvancedSettings: View {
5 @AppStorage("backendUrl") var backendUrl: String = ""
6 @AppStorage("backendFormat") var outputFormats: OutputFormatSetting = .gifOnly
7 @AppStorage("keepFiles") var keepFiles = true
9 var parsedBackendUrl: URL? {
10 URL(string: backendUrl)
15 VStack (alignment: .center) {
16 LabeledContent("Backend URL") {
17 TextField("", text: $backendUrl).font(.body)
19 Picker(selection: $outputFormats, label: Text("Backend Format").font(.headline)) {
21 .tag(OutputFormatSetting.gifOnly)
22 .padding(.horizontal, 4.0)
23 .padding(.vertical, 2.0)
25 .tag(OutputFormatSetting.mp4Only)
26 .padding(.horizontal, 4.0)
27 .padding(.vertical, 2.0)
29 .pickerStyle(.radioGroup)
30 .disabled(parsedBackendUrl == nil)
31 Toggle("Keep Local Files", isOn: $keepFiles)
33 .disabled(parsedBackendUrl == nil)
34 .padding(.vertical, 8.0)
36 Text("These settings can break things! Please make sure you understand how to use them before enabling.")
41 Image(systemName: "info.circle")
42 }.buttonStyle(.borderless)