Add a context menu for copying notes

This commit is contained in:
Jackson Harper
2023-04-07 21:27:10 +08:00
parent f60ba672e7
commit 19138bf685

View File

@ -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)