mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-09-03 16:33:48 +00:00
Embed Media card in Button
This commit is contained in:
parent
ed5b3d7e0f
commit
d41eca867b
1 changed files with 72 additions and 68 deletions
|
@ -39,6 +39,11 @@ public struct StatusRowCardView: View {
|
|||
}
|
||||
|
||||
public var body: some View {
|
||||
Button {
|
||||
if let url = URL(string: card.url) {
|
||||
openURL(url)
|
||||
}
|
||||
} label: {
|
||||
if let title = card.title, let url = URL(string: card.url) {
|
||||
VStack(alignment: .leading) {
|
||||
if let imageURL = card.image, !isInCaptureMode {
|
||||
|
@ -92,9 +97,6 @@ public struct StatusRowCardView: View {
|
|||
RoundedRectangle(cornerRadius: 16)
|
||||
.stroke(.gray.opacity(0.35), lineWidth: 1)
|
||||
)
|
||||
.onTapGesture {
|
||||
openURL(url)
|
||||
}
|
||||
.contextMenu {
|
||||
ShareLink(item: url) {
|
||||
Label("status.card.share", systemImage: "square.and.arrow.up")
|
||||
|
@ -114,4 +116,6 @@ public struct StatusRowCardView: View {
|
|||
.accessibilityRemoveTraits(.isStaticText)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue