Skip to content

Commit 8009446

Browse files
committed
"Download" button for binary mode that opens GitHub releases page.
1 parent 5c87bb2 commit 8009446

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

DashboardView.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,21 @@ struct DashboardView: View {
222222
}
223223
.buttonStyle(.plain)
224224
.pointerOnHover()
225+
} else if case .binary = appState.serverMode {
226+
Button {
227+
if let url = URL(string: "https://github.com/DDVTECH/mistserver/releases/latest") {
228+
NSWorkspace.shared.open(url)
229+
}
230+
} label: {
231+
Text("Download")
232+
.font(.system(size: 10, weight: .medium))
233+
.padding(.horizontal, 8)
234+
.padding(.vertical, 2)
235+
.background(Color.tnAccent.opacity(0.2))
236+
.clipShape(Capsule())
237+
}
238+
.buttonStyle(.plain)
239+
.pointerOnHover()
225240
}
226241
}
227242
.foregroundStyle(Color.tnAccent)

0 commit comments

Comments
 (0)