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,25 +71,26 @@ struct ListRow: View {
var body: some View { var body: some View {
HStack { HStack {
ZStack { Group {
ScaledImage(name: image, length: length) ZStack {
if beta { ScaledImage(name: image, length: length)
TextRibbon(title: "BETA", length: length * 0.9) if beta {
TextRibbon(title: "BETA", length: length * 0.9)
}
} }
} HStack(spacing: spacing) {
HStack(spacing: spacing) { Text(version)
Text(version) .font(.title2)
.font(.title2) Text("(\(build))")
Text("(\(build))") .foregroundColor(.secondary)
}
Spacer()
Text(date)
.foregroundColor(.secondary) .foregroundColor(.secondary)
Text(size)
} }
.help(helpText)
.textSelection(.enabled) .textSelection(.enabled)
Spacer()
Text(date)
.foregroundColor(.secondary)
.textSelection(.enabled)
Text(size)
.textSelection(.enabled)
Button("DOWNLOAD") { Button("DOWNLOAD") {
compatible ? validate() : showCompatibilityWarning() compatible ? validate() : showCompatibilityWarning()
} }