mirror of
https://github.com/TuringSoftware/CrystalFetch.git
synced 2024-09-20 06:55:58 +08:00
main: hide UUP-Dump under advanced options
This commit is contained in:
parent
7e51b9b419
commit
38f64ea283
|
@ -19,7 +19,8 @@ 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") {
|
||||
SimpleContentView().environmentObject(worker)
|
||||
|
@ -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"]))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
ShowWindowButtonView(id: "UUPDump") {
|
||||
Text("All builds…")
|
||||
}.disabled(worker.isBusy)
|
||||
.help("Build custom installation for any build through UUP Dump.")
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue