mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-19 01:35:24 -04:00
Button refactor
This commit is contained in:
parent
2c6f2e35fa
commit
fc266e2861
1 changed files with 32 additions and 3 deletions
|
@ -91,10 +91,39 @@ struct ListRow: View {
|
|||
}
|
||||
.help(helpText)
|
||||
.textSelection(.enabled)
|
||||
Button("DOWNLOAD") {
|
||||
compatible ? validate() : showCompatibilityWarning()
|
||||
Group {
|
||||
switch type {
|
||||
case .firmware:
|
||||
Button {
|
||||
compatible ? validate() : showCompatibilityWarning()
|
||||
} label: {
|
||||
Image(systemName: "arrow.down.circle")
|
||||
.font(.body.bold())
|
||||
}
|
||||
.help("Download macOS Firmware")
|
||||
.buttonStyle(.capsule(.standard))
|
||||
case .installer:
|
||||
HStack(spacing: 1) {
|
||||
Button {
|
||||
compatible ? validate() : showCompatibilityWarning()
|
||||
} label: {
|
||||
Image(systemName: "arrow.down.circle")
|
||||
.font(.body.bold())
|
||||
}
|
||||
.help("Download and export macOS Installer")
|
||||
.buttonStyle(.capsule(.leading))
|
||||
Button {
|
||||
print("Create bootable installer...")
|
||||
} label: {
|
||||
Image(systemName: "externaldrive")
|
||||
.font(.body.bold())
|
||||
.padding(.vertical, 1)
|
||||
}
|
||||
.help("Create bootable macOS Installer")
|
||||
.buttonStyle(.capsule(.trailing))
|
||||
}
|
||||
}
|
||||
}
|
||||
.buttonStyle(.download)
|
||||
.padding(.trailing, padding)
|
||||
}
|
||||
.alert(isPresented: $showAlert) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue