From 6617fa84131f77230ebe667daf079906bfed84ae Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 22 Feb 2024 15:28:49 +0800 Subject: [PATCH] Add unarchive and trash to grid context menu --- .../Sources/App/Views/Home/LibraryItemMenu.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/LibraryItemMenu.swift b/apple/OmnivoreKit/Sources/App/Views/Home/LibraryItemMenu.swift index 2b68877bf..7e8bda89a 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/LibraryItemMenu.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/LibraryItemMenu.swift @@ -13,6 +13,14 @@ import Views action: { viewModel.itemUnderTitleEdit = item }, label: { Label("Edit Info", systemImage: "info.circle") } ) + Button( + action: { viewModel.setLinkArchived(dataService: dataService, objectID: item.objectID, archived: !item.isArchived) }, + label: { Label(item.isArchived ? "Unarchive" : "Archive", systemImage: "inbox") } + ) + Button( + action: { viewModel.removeLibraryItem(dataService: dataService, objectID: item.objectID) }, + label: { Label("Remove", systemImage: "trash") } + ) Button( action: { viewModel.itemUnderLabelEdit = item }, label: { Label(item.labels?.count == 0 ? "Add Labels" : "Edit Labels", systemImage: "tag") }