summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-14 09:41:58 -0700
committerFuwn <[email protected]>2025-06-14 09:41:58 -0700
commita2ef2a7376bb2205e2fc899297a5e8643b8be7c1 (patch)
tree64d0e4ec940f02b8e773a294b20a21b7de33834e
parentfeat: Development commit (diff)
downloadsora-testing-a2ef2a7376bb2205e2fc899297a5e8643b8be7c1.tar.xz
sora-testing-a2ef2a7376bb2205e2fc899297a5e8643b8be7c1.zip
feat: Development commit
-rw-r--r--Sora/Views/Generic/GenericListView.swift70
1 files changed, 44 insertions, 26 deletions
diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift
index 0193471..b9b327c 100644
--- a/Sora/Views/Generic/GenericListView.swift
+++ b/Sora/Views/Generic/GenericListView.swift
@@ -80,40 +80,32 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi
description: Text(emptyDescription)
)
} else {
- if !settings.folders.isEmpty && !allowBookmarking {
- Picker("Sort", selection: $sort) {
- ForEach(SettingsBookmarkSort.allCases, id: \.rawValue) { sortMode in
- Text(sortMode.rawValue).tag(sortMode)
+ #if os(macOS)
+ if !settings.folders.isEmpty && !allowBookmarking {
+ Picker("Sort", selection: $sort) {
+ ForEach(SettingsBookmarkSort.allCases, id: \.rawValue) { sortMode in
+ Text(sortMode.rawValue).tag(sortMode)
+ }
}
- }
- #if os(macOS)
.padding()
.pickerStyle(.menu)
- #else
- .padding(.horizontal)
- .pickerStyle(.palette)
- .padding(.bottom)
- #endif
- Picker("Collection", selection: $selectedFolder) {
- Text("All").tag(nil as UUID?)
+ Picker("Collection", selection: $selectedFolder) {
+ Text("All").tag(nil as UUID?)
- if items.contains(where: { $0.folder == nil }) {
- Text("Uncategorised").tag(uncategorisedUUID as UUID?)
- }
+ if items.contains(where: { $0.folder == nil }) {
+ Text("Uncategorised").tag(uncategorisedUUID as UUID?)
+ }
- ForEach(settings.folders, id: \.id) { folder in
- Text(folder.name).tag(folder.id)
+ ForEach(settings.folders, id: \.id) { folder in
+ Text(folder.name).tag(folder.id)
+ }
}
- }
- .padding(.bottom)
- .padding(.horizontal)
- #if os(macOS)
+ .padding(.bottom)
+ .padding(.horizontal)
.pickerStyle(.menu)
- #else
- .pickerStyle(NavigationLinkPickerStyle())
- #endif
- }
+ }
+ #endif
List {
if filteredItems.isEmpty && (!searchText.isEmpty || !(selectedFolder == nil)) {
@@ -149,6 +141,32 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi
Label("Remove All", systemImage: "trash")
}
}
+
+ #if os(iOS)
+ ToolbarItemGroup(placement: .bottomBar) {
+ if !settings.folders.isEmpty && !allowBookmarking {
+ Picker("Sort", selection: $sort) {
+ ForEach(SettingsBookmarkSort.allCases, id: \.rawValue) { sortMode in
+ Text(sortMode.rawValue).tag(sortMode)
+ }
+ }
+ .pickerStyle(.menu)
+
+ Picker("Collection", selection: $selectedFolder) {
+ Text("All").tag(nil as UUID?)
+
+ if items.contains(where: { $0.folder == nil }) {
+ Text("Uncategorised").tag(uncategorisedUUID as UUID?)
+ }
+
+ ForEach(settings.folders, id: \.id) { folder in
+ Text(folder.name).tag(folder.id)
+ }
+ }
+ .pickerStyle(.menu)
+ }
+ }
+ #endif
}
.confirmationDialog(
removeAllMessage,