mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-19 01:35:24 -04:00
Fix linter warning
This commit is contained in:
parent
f42acf2e00
commit
bcdaccb342
1 changed files with 12 additions and 4 deletions
|
@ -76,8 +76,7 @@ struct ListRowInstaller: View {
|
||||||
)
|
)
|
||||||
HStack(spacing: 1) {
|
HStack(spacing: 1) {
|
||||||
Button {
|
Button {
|
||||||
sheetType = .download
|
pressButton(.download)
|
||||||
if installer.compatible { Task { validate() } } else { showCompatibilityWarning() }
|
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "arrow.down.circle")
|
Image(systemName: "arrow.down.circle")
|
||||||
.font(.body.bold())
|
.font(.body.bold())
|
||||||
|
@ -85,8 +84,7 @@ struct ListRowInstaller: View {
|
||||||
.help("Download and export macOS Installer")
|
.help("Download and export macOS Installer")
|
||||||
.buttonStyle(.mistAction)
|
.buttonStyle(.mistAction)
|
||||||
Button {
|
Button {
|
||||||
sheetType = .volumeSelection
|
pressButton(.volumeSelection)
|
||||||
if installer.compatible { Task { validate() } } else { showCompatibilityWarning() }
|
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "externaldrive")
|
Image(systemName: "externaldrive")
|
||||||
.font(.body.bold())
|
.font(.body.bold())
|
||||||
|
@ -172,6 +170,16 @@ struct ListRowInstaller: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func pressButton(_ type: InstallerSheetType) {
|
||||||
|
sheetType = type
|
||||||
|
|
||||||
|
if installer.compatible {
|
||||||
|
Task { validate() }
|
||||||
|
} else {
|
||||||
|
showCompatibilityWarning()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func open() {
|
private func open() {
|
||||||
showOpenPanel = false
|
showOpenPanel = false
|
||||||
openPanel.title = "Download Installer"
|
openPanel.title = "Download Installer"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue