Skip to content

Commit 16f8595

Browse files
committed
fix: Add Link menu item visible in all card menus, not just expanded toolbar
1 parent 93c4a65 commit 16f8595

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Sources/KanbanCode/CardDetailHelpers.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ struct CardActionsMenu: View {
130130
Label("Issue: #\(String(issue.number))", systemImage: "circle.circle")
131131
}
132132
}
133-
if let onAddLink {
134-
Button(action: onAddLink) {
135-
Label("Add Link", systemImage: "plus")
136-
}
137-
}
138133
Divider()
139134
}
140135

@@ -204,7 +199,7 @@ struct CardActionsMenu: View {
204199

205200
@ViewBuilder
206201
private var linksSection: some View {
207-
if !card.link.prLinks.isEmpty || card.link.issueLink != nil {
202+
if !card.link.prLinks.isEmpty || card.link.issueLink != nil || onAddLink != nil {
208203
Divider()
209204
ForEach(card.link.prLinks, id: \.number) { pr in
210205
Button {
@@ -222,6 +217,11 @@ struct CardActionsMenu: View {
222217
Label("Open Issue #\(String(issue.number))", systemImage: "arrow.up.right.square")
223218
}
224219
}
220+
if let onAddLink {
221+
Button(action: onAddLink) {
222+
Label("Add Link", systemImage: "plus")
223+
}
224+
}
225225
}
226226
}
227227

0 commit comments

Comments
 (0)