From cafece91bae45194d64f4932bb04be018b82d21b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 22 Feb 2025 07:07:57 -0800 Subject: feat: Development commit --- Sora/Views/Bookmarks/BookmarkListItemView.swift | 39 ------------------------ Sora/Views/Bookmarks/BookmarksListItemView.swift | 39 ++++++++++++++++++++++++ Sora/Views/Bookmarks/BookmarksView.swift | 2 +- 3 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 Sora/Views/Bookmarks/BookmarkListItemView.swift create mode 100644 Sora/Views/Bookmarks/BookmarksListItemView.swift (limited to 'Sora/Views/Bookmarks') diff --git a/Sora/Views/Bookmarks/BookmarkListItemView.swift b/Sora/Views/Bookmarks/BookmarkListItemView.swift deleted file mode 100644 index 611c9fe..0000000 --- a/Sora/Views/Bookmarks/BookmarkListItemView.swift +++ /dev/null @@ -1,39 +0,0 @@ -import SwiftUI - -struct BookmarkListItemView: View { - @EnvironmentObject var settings: Settings - var bookmark: Bookmark - - var body: some View { - VStack(alignment: .leading) { - HStack { - Text(bookmark.tags.joined(separator: ", ")) - - #if os(macOS) - Spacer() - - Button { - settings.removeBookmark(withID: bookmark.id) - } label: { - Image(systemName: "trash") - } - #endif - } - - HStack { - Text(bookmark.createdAt, style: .date) - .font(.caption) - .foregroundStyle(Color.secondary) - - Spacer() - - Text(bookmark.provider.rawValue) - .font(.caption) - .foregroundStyle(Color.secondary) - } - } - #if os(macOS) - .padding() - #endif - } -} diff --git a/Sora/Views/Bookmarks/BookmarksListItemView.swift b/Sora/Views/Bookmarks/BookmarksListItemView.swift new file mode 100644 index 0000000..cfe267b --- /dev/null +++ b/Sora/Views/Bookmarks/BookmarksListItemView.swift @@ -0,0 +1,39 @@ +import SwiftUI + +struct BookmarksListItemView: View { + @EnvironmentObject var settings: Settings + var bookmark: Bookmark + + var body: some View { + VStack(alignment: .leading) { + HStack { + Text(bookmark.tags.joined(separator: ", ")) + + #if os(macOS) + Spacer() + + Button { + settings.removeBookmark(withID: bookmark.id) + } label: { + Image(systemName: "trash") + } + #endif + } + + HStack { + Text(bookmark.createdAt, style: .date) + .font(.caption) + .foregroundStyle(Color.secondary) + + Spacer() + + Text(bookmark.provider.rawValue) + .font(.caption) + .foregroundStyle(Color.secondary) + } + } + #if os(macOS) + .padding() + #endif + } +} diff --git a/Sora/Views/Bookmarks/BookmarksView.swift b/Sora/Views/Bookmarks/BookmarksView.swift index b52e7b7..b32b46b 100644 --- a/Sora/Views/Bookmarks/BookmarksView.swift +++ b/Sora/Views/Bookmarks/BookmarksView.swift @@ -47,7 +47,7 @@ struct BookmarksView: View { manager.performSearch() } }) { - BookmarkListItemView(bookmark: bookmark) + BookmarksListItemView(bookmark: bookmark) } #if os(macOS) .buttonStyle(.plain) -- cgit v1.2.3