diff options
Diffstat (limited to 'Sora/Views/BookmarksView.swift')
| -rw-r--r-- | Sora/Views/BookmarksView.swift | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Sora/Views/BookmarksView.swift b/Sora/Views/BookmarksView.swift new file mode 100644 index 0000000..babc667 --- /dev/null +++ b/Sora/Views/BookmarksView.swift @@ -0,0 +1,30 @@ +import SwiftUI + +struct BookmarksView: View { + @EnvironmentObject var settings: SettingsManager + @Binding var selectedTab: Int + + var body: some View { + GenericListView( + selectedTab: $selectedTab, + isPresented: .constant(false), + allowBookmarking: 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)) +} |