]> git.r.bdr.sh - rbdr/captura/blob - Captura/Presentation/Settings/OutputSettings.swift
Add URL parsing for record action
[rbdr/captura] / Captura / Presentation / Settings / OutputSettings.swift
1 import SwiftUI
2
3 struct OutputSettings: View {
4
5 @AppStorage("outputFormats") var outputFormats: OutputFormatSetting = .all
6 @AppStorage("frameRate") var frameRate = 10.0
7
8 var body: some View {
9 Form {
10 VStack (alignment: .center) {
11 LabeledContent("GIF Framerate") {
12 Slider(value: $frameRate, in: 4...10, step: 1) {
13 Text("\(Int(frameRate))").font(.body).frame(width: 24)
14 } minimumValueLabel: {
15 Text("4")
16 } maximumValueLabel: {
17 Text("10")
18 }
19 }.font(.headline)
20 Picker(selection: $outputFormats, label: Text("Output Formats").font(.headline)) {
21 Text("GIF & MP4")
22 .tag(OutputFormatSetting.all)
23 .padding(.horizontal, 4.0)
24 .padding(.vertical, 2.0)
25 Text("Only GIF")
26 .tag(OutputFormatSetting.gifOnly)
27 .padding(.horizontal, 4.0)
28 .padding(.vertical, 2.0)
29
30 Text("Only MP4")
31 .tag(OutputFormatSetting.mp4Only)
32 .padding(.horizontal, 4.0)
33 .padding(.vertical, 2.0)
34 }.pickerStyle(.radioGroup)
35 }
36 Spacer()
37 }
38 }
39 }
40
41 #Preview {
42 OutputSettings()
43 }