Add macOS Firmware / Installer tooltips

This commit is contained in:
Nindi Gill 2023-06-12 21:12:18 +10:00
parent d9b197747b
commit 2c6f2e35fa
No known key found for this signature in database
GPG key ID: FF9A7FD590D4F4B1

View file

@ -29,6 +29,14 @@ struct ListRow: View {
private let length: CGFloat = 48 private let length: CGFloat = 48
private let spacing: CGFloat = 5 private let spacing: CGFloat = 5
private let padding: CGFloat = 3 private let padding: CGFloat = 3
private var helpText: String {
"""
Version: \(version)
Build Number: \(build)
Release Date: \(date)
Download Size: \(size)
"""
}
private var compatibilityTitle: String { private var compatibilityTitle: String {
"macOS \(type.description) not compatible!" "macOS \(type.description) not compatible!"
} }
@ -63,6 +71,7 @@ struct ListRow: View {
var body: some View { var body: some View {
HStack { HStack {
Group {
ZStack { ZStack {
ScaledImage(name: image, length: length) ScaledImage(name: image, length: length)
if beta { if beta {
@ -75,12 +84,12 @@ struct ListRow: View {
Text("(\(build))") Text("(\(build))")
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
.textSelection(.enabled)
Spacer() Spacer()
Text(date) Text(date)
.foregroundColor(.secondary) .foregroundColor(.secondary)
.textSelection(.enabled)
Text(size) Text(size)
}
.help(helpText)
.textSelection(.enabled) .textSelection(.enabled)
Button("DOWNLOAD") { Button("DOWNLOAD") {
compatible ? validate() : showCompatibilityWarning() compatible ? validate() : showCompatibilityWarning()