diff options
Diffstat (limited to 'Sora/Views/Settings/Section')
| -rw-r--r-- | Sora/Views/Settings/Section/SettingsSearchView.swift | 7 | ||||
| -rw-r--r-- | Sora/Views/Settings/Section/SettingsThumbnailsView.swift | 17 |
2 files changed, 20 insertions, 4 deletions
diff --git a/Sora/Views/Settings/Section/SettingsSearchView.swift b/Sora/Views/Settings/Section/SettingsSearchView.swift index 644b02c..ee4d09c 100644 --- a/Sora/Views/Settings/Section/SettingsSearchView.swift +++ b/Sora/Views/Settings/Section/SettingsSearchView.swift @@ -2,7 +2,12 @@ import SwiftUI struct SettingsSearchView: View { @EnvironmentObject var settings: Settings - @EnvironmentObject var manager: BooruManager + + #if os(macOS) + var manager = BooruManager(.yandere) + #else + @EnvironmentObject var manager: BooruManager + #endif 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 index 0491d04..37871d3 100644 --- a/Sora/Views/Settings/Section/SettingsThumbnailsView.swift +++ b/Sora/Views/Settings/Section/SettingsThumbnailsView.swift @@ -2,6 +2,7 @@ import SwiftUI struct SettingsThumbnailsView: View { @EnvironmentObject var settings: Settings + @State private var isShowingContentFiltering = false var body: some View { Picker("Thumbnail Type", selection: $settings.thumbnailType) { @@ -22,8 +23,18 @@ struct SettingsThumbnailsView: View { ) #endif - NavigationLink(destination: SettingsContentRatingsView()) { - Text("Content Filtering") - } + #if os(macOS) + Button("Content Filtering") { + isShowingContentFiltering.toggle() + } + .sheet(isPresented: $isShowingContentFiltering) { + SettingsContentRatingsView() + .frame(minHeight: 250) + } + #else + NavigationLink(destination: SettingsContentRatingsView()) { + Text("Content Filtering") + } + #endif } } |