Add context menu for link / card view

This commit is contained in:
Thomas Ricouard 2023-01-19 07:45:37 +01:00
parent 3e3e353fdd
commit f743adb1df

View File

@ -59,6 +59,20 @@ public struct StatusCardView: View {
.onTapGesture {
openURL(card.url)
}
.contextMenu {
ShareLink(item: card.url) {
Label("Share this link", systemImage: "square.and.arrow.up")
}
Button { openURL(card.url) } label: {
Label("View in Browser", systemImage: "safari")
}
Divider()
Button {
UIPasteboard.general.string = card.url.absoluteString
} label: {
Label("Copy link", systemImage: "doc.on.doc")
}
}
}
}
}