diff options
| author | Fuwn <[email protected]> | 2026-03-24 07:57:46 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-24 07:57:46 +0000 |
| commit | 021e6f20a376797df32db4e4121eb4766903a995 (patch) | |
| tree | f73c6047e6f462a17c1be1a1f3369c7ea79af024 /Sora/Views/Generic | |
| parent | Refine settings language and structure (diff) | |
| download | sora-testing-021e6f20a376797df32db4e4121eb4766903a995.tar.xz sora-testing-021e6f20a376797df32db4e4121eb4766903a995.zip | |
Refocus navigation around core content
Diffstat (limited to 'Sora/Views/Generic')
| -rw-r--r-- | Sora/Views/Generic/GenericListView.swift | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift index 3e5154f..d1c1436 100644 --- a/Sora/Views/Generic/GenericListView.swift +++ b/Sora/Views/Generic/GenericListView.swift @@ -18,8 +18,10 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { @State private var sort: SettingsBookmarkSort = .dateAdded @State private var isCollectionPickerPresented = false @State private var isProviderPickerPresented = false + @State private var isSettingsPresented = false @State private var selectedProvider: BooruProvider? let allowBookmarking: Bool + let showsSettingsButton: Bool let title: String let emptyMessage: String let emptyIcon: String @@ -292,6 +294,14 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { #endif #if os(iOS) + if showsSettingsButton { + ToolbarItem(placement: .topBarTrailing) { + Button(action: { isSettingsPresented = true }) { + Label("Settings", systemImage: "gear") + } + } + } + ToolbarItemGroup(placement: .secondaryAction) { if !allowBookmarking { Menu { @@ -389,6 +399,11 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { } #endif } + #if !os(macOS) + .sheet(isPresented: $isSettingsPresented) { + SettingsView() + } + #endif .onAppear { refreshFolderHierarchy() refreshDisplayedItems() |