summaryrefslogtreecommitdiff
path: root/Sora/Views/Bookmarks/BookmarksView.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-03-03 19:43:35 -0800
committerFuwn <[email protected]>2025-03-03 19:43:35 -0800
commite56c662137ca3e3945aed174c90062601df092f5 (patch)
tree8f459760d0bcbe16cbd18f2863bfd063a08ca974 /Sora/Views/Bookmarks/BookmarksView.swift
parentfeat: Development commit (diff)
downloadsora-testing-e56c662137ca3e3945aed174c90062601df092f5.tar.xz
sora-testing-e56c662137ca3e3945aed174c90062601df092f5.zip
feat: Development commit
Diffstat (limited to 'Sora/Views/Bookmarks/BookmarksView.swift')
-rw-r--r--Sora/Views/Bookmarks/BookmarksView.swift29
1 files changed, 29 insertions, 0 deletions
diff --git a/Sora/Views/Bookmarks/BookmarksView.swift b/Sora/Views/Bookmarks/BookmarksView.swift
new file mode 100644
index 0000000..fa7734e
--- /dev/null
+++ b/Sora/Views/Bookmarks/BookmarksView.swift
@@ -0,0 +1,29 @@
+import SwiftUI
+
+struct BookmarksView: View {
+ @EnvironmentObject var settings: SettingsManager
+ @Binding var selectedTab: Int
+
+ var body: some View {
+ GenericListView(
+ selectedTab: $selectedTab,
+ isPresented: .constant(false),
+ title: "Bookmarks",
+ emptyMessage: "No Bookmarks",
+ emptyIcon: "bookmark",
+ emptyDescription: "Tap the bookmark button on a search page to add a bookmark.",
+ removeAllMessage:
+ "Are you sure you want to remove all bookmarks? This action cannot be undone.",
+ removeAllButtonText: "Remove All Bookmarks",
+ items: settings.bookmarks,
+ removeAction: settings.removeBookmark,
+ removeActionUUID: settings.removeBookmark
+ ) { settings.bookmarks.removeAll() }
+ }
+}
+
+#Preview {
+ BookmarksView(selectedTab: .constant(1))
+ .environmentObject(SettingsManager())
+ .environmentObject(BooruManager(.yandere))
+}