Button refactor

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

View file

@ -91,10 +91,39 @@ struct ListRow: View {
}
.help(helpText)
.textSelection(.enabled)
Button("DOWNLOAD") {
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) {