From 2dfdbe91a5edfb3eb50316594abcff3c2fbf445d Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 Jun 2025 05:31:40 -0700 Subject: feat: Development commit --- Localizable.xcstrings | 3 --- Sora/Views/Bookmarks/BookmarksAddToView.swift | 7 ------- Sora/Views/Bookmarks/BookmarksView.swift | 30 --------------------------- Sora/Views/BookmarksView.swift | 30 +++++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 40 deletions(-) delete mode 100644 Sora/Views/Bookmarks/BookmarksAddToView.swift delete mode 100644 Sora/Views/Bookmarks/BookmarksView.swift create mode 100644 Sora/Views/BookmarksView.swift diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 6e54ec5..ceab289 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -59,9 +59,6 @@ } } } - }, - "BookmarksAddToView" : { - }, "Cancel" : { diff --git a/Sora/Views/Bookmarks/BookmarksAddToView.swift b/Sora/Views/Bookmarks/BookmarksAddToView.swift deleted file mode 100644 index 3c8ad68..0000000 --- a/Sora/Views/Bookmarks/BookmarksAddToView.swift +++ /dev/null @@ -1,7 +0,0 @@ -import SwiftUI - -struct BookmarksAddToView: View { - var body: some View { - Text("BookmarksAddToView") - } -} diff --git a/Sora/Views/Bookmarks/BookmarksView.swift b/Sora/Views/Bookmarks/BookmarksView.swift deleted file mode 100644 index babc667..0000000 --- a/Sora/Views/Bookmarks/BookmarksView.swift +++ /dev/null @@ -1,30 +0,0 @@ -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)) -} 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)) +} -- cgit v1.2.3