main: hide UUP-Dump under advanced options

This commit is contained in:
osy 2024-03-28 15:36:31 -07:00
parent 7e51b9b419
commit 38f64ea283
2 changed files with 12 additions and 5 deletions

View file

@ -19,6 +19,7 @@ import SwiftUI
@main
struct Main: App {
@StateObject private var worker = Worker()
@AppStorage("ShowAdvancedOptions") private var showAdvancedOptions: Bool = false
var body: some Scene {
WindowGroup(id: "ESDConvert") {
@ -31,6 +32,9 @@ struct Main: App {
.frame(minWidth: 800, minHeight: 400)
}.commands {
SidebarCommands()
CommandGroup(after: .sidebar) {
Toggle("Show Advanced Options", isOn: $showAdvancedOptions)
}
}.handlesExternalEvents(matching: Set(["UUPDump"]))
}
}

View file

@ -18,6 +18,7 @@ import SwiftUI
struct SimpleContentView: View {
@EnvironmentObject private var worker: Worker
@AppStorage("ShowAdvancedOptions") private var showAdvancedOptions: Bool = false
@State private var isConfirmCancelShown: Bool = false
@State private var isDownloadCompleted: Bool = false
@ -88,10 +89,12 @@ struct SimpleContentView: View {
}
}
HStack {
if showAdvancedOptions {
ShowWindowButtonView(id: "UUPDump") {
Text("All builds…")
}.disabled(worker.isBusy)
.help("Build custom installation for any build through UUP Dump.")
}
Spacer()
if worker.isBusy {
Button(role: .cancel) {