diff options
| author | Fuwn <[email protected]> | 2025-02-22 07:07:57 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-22 07:07:57 -0800 |
| commit | cafece91bae45194d64f4932bb04be018b82d21b (patch) | |
| tree | 02d727a13fe530550e3b29b28b7ee9980262eef2 /Sora/Views/Settings/Section | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-cafece91bae45194d64f4932bb04be018b82d21b.tar.xz sora-testing-cafece91bae45194d64f4932bb04be018b82d21b.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Settings/Section')
5 files changed, 77 insertions, 0 deletions
diff --git a/Sora/Views/Settings/Section/SettingsAttributionsView.swift b/Sora/Views/Settings/Section/SettingsAttributionsView.swift new file mode 100644 index 0000000..3c94c4e --- /dev/null +++ b/Sora/Views/Settings/Section/SettingsAttributionsView.swift @@ -0,0 +1,9 @@ +import SwiftUI + +struct SettingsAttributionsView: View { + var body: some View { + Text("Rabbit SVG created by Kim Sun Young") + .fontWeight(.light) + .foregroundColor(.secondary) + } +} diff --git a/Sora/Views/Settings/Section/SettingsDetailsView.swift b/Sora/Views/Settings/Section/SettingsDetailsView.swift new file mode 100644 index 0000000..c51ab76 --- /dev/null +++ b/Sora/Views/Settings/Section/SettingsDetailsView.swift @@ -0,0 +1,15 @@ +import SwiftUI + +struct SettingsDetailsView: View { + @EnvironmentObject var settings: Settings + + var body: some View { + Picker("Detail View Type", selection: $settings.detailViewType) { + ForEach(BooruPostFileType.allCases, id: \.self) { type in + Text(type.rawValue.capitalized).tag(type) + } + } + + Toggle("Enable \"Share Image\" Shortcut", isOn: $settings.enableShareShortcut) + } +} diff --git a/Sora/Views/Settings/Section/SettingsProviderView.swift b/Sora/Views/Settings/Section/SettingsProviderView.swift new file mode 100644 index 0000000..1de25c3 --- /dev/null +++ b/Sora/Views/Settings/Section/SettingsProviderView.swift @@ -0,0 +1,13 @@ +import SwiftUI + +struct SettingsProviderView: View { + @EnvironmentObject var settings: Settings + + var body: some View { + Picker("Provider", selection: $settings.preferredBooru) { + ForEach(BooruProvider.allCases, id: \.self) { type in + Text(type.rawValue).tag(type) + } + } + } +} diff --git a/Sora/Views/Settings/Section/SettingsSearchView.swift b/Sora/Views/Settings/Section/SettingsSearchView.swift new file mode 100644 index 0000000..63be2f1 --- /dev/null +++ b/Sora/Views/Settings/Section/SettingsSearchView.swift @@ -0,0 +1,9 @@ +import SwiftUI + +struct SettingsSearchView: View { + @EnvironmentObject var settings: Settings + + var body: some View { + Toggle("Suggest Search Tags", isOn: $settings.searchSuggestions) + } +} diff --git a/Sora/Views/Settings/Section/SettingsThumbnailsView.swift b/Sora/Views/Settings/Section/SettingsThumbnailsView.swift new file mode 100644 index 0000000..f787e59 --- /dev/null +++ b/Sora/Views/Settings/Section/SettingsThumbnailsView.swift @@ -0,0 +1,31 @@ +import SwiftUI + +struct SettingsThumbnailsView: View { + @EnvironmentObject var settings: Settings + + 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 + + Toggle("Show NSFW Posts", isOn: $settings.showNSFWPosts) + + if settings.showNSFWPosts { + Toggle("Blur NSFW Thumbnails", isOn: $settings.blurNSFWThumbnails) + } + } +} |