diff options
| author | Fuwn <[email protected]> | 2025-02-25 03:51:51 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-25 03:51:51 -0800 |
| commit | b1998dbe5ece92696250e0503ad8841b9bcba0d1 (patch) | |
| tree | a95eb5ee02f20aeefca6330bf9cce44c50818541 /Sora/Views/Settings | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-b1998dbe5ece92696250e0503ad8841b9bcba0d1.tar.xz sora-testing-b1998dbe5ece92696250e0503ad8841b9bcba0d1.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Settings')
| -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 } } |