mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-19 17:55:22 -04:00
Add macOS Firmware / Installer tooltips
This commit is contained in:
parent
d9b197747b
commit
2c6f2e35fa
1 changed files with 24 additions and 15 deletions
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue