From 19138bf685dbd97280923965317016e41d0bbea0 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 7 Apr 2023 21:27:10 +0800 Subject: [PATCH] Add a context menu for copying notes --- .../Sources/App/Views/Highlights/NotebookView.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Highlights/NotebookView.swift b/apple/OmnivoreKit/Sources/App/Views/Highlights/NotebookView.swift index acffece50..c43afa354 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Highlights/NotebookView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Highlights/NotebookView.swift @@ -77,7 +77,16 @@ .frame(maxWidth: .infinity, alignment: .leading) .background(Color.appButtonBackground) .cornerRadius(8) - + .contextMenu { + Button( + action: { UIPasteboard.general.string = note.annotation }, + label: { Label("Copy", systemImage: "copy") } + ) + Button( + action: { showAnnotationModal = true }, + label: { Label("Edit", systemImage: "edit") } + ) + } } else { Text("Add Notes...") .lineSpacing(6)