blob: 37871d38498795eea0d6f0ebb9e7687a2bfb17c7 (
plain) (
blame)
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
|
import SwiftUI
struct SettingsThumbnailsView: View {
@EnvironmentObject var settings: Settings
@State private var isShowingContentFiltering = false
var body: some View {
Picker("Thumbnail Type", selection: $settings.thumbnailType) {
ForEach(BooruPostFileType.allCases, id: \.self) { type in
Text(type.rawValue.capitalized).tag(type)
}
}
#if os(macOS)
Picker("Thumbnail Columns", selection: $settings.columns) {
ForEach(1...10, id: \.self) { columns in Text("\(columns)") }
}
#else
Stepper(
"Thumbnail Columns: \(settings.columns)",
value: $settings.columns,
in: 1...10
)
#endif
#if os(macOS)
Button("Content Filtering") {
isShowingContentFiltering.toggle()
}
.sheet(isPresented: $isShowingContentFiltering) {
SettingsContentRatingsView()
.frame(minHeight: 250)
}
#else
NavigationLink(destination: SettingsContentRatingsView()) {
Text("Content Filtering")
}
#endif
}
}
|