mirror of
https://github.com/TuringSoftware/CrystalFetch.git
synced 2025-12-25 06:50:52 +08:00
main: hide UUP-Dump under advanced options
This commit is contained in:
parent
7e51b9b419
commit
38f64ea283
2 changed files with 12 additions and 5 deletions
|
|
@ -19,6 +19,7 @@ import SwiftUI
|
||||||
@main
|
@main
|
||||||
struct Main: App {
|
struct Main: App {
|
||||||
@StateObject private var worker = Worker()
|
@StateObject private var worker = Worker()
|
||||||
|
@AppStorage("ShowAdvancedOptions") private var showAdvancedOptions: Bool = false
|
||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup(id: "ESDConvert") {
|
WindowGroup(id: "ESDConvert") {
|
||||||
|
|
@ -31,6 +32,9 @@ struct Main: App {
|
||||||
.frame(minWidth: 800, minHeight: 400)
|
.frame(minWidth: 800, minHeight: 400)
|
||||||
}.commands {
|
}.commands {
|
||||||
SidebarCommands()
|
SidebarCommands()
|
||||||
|
CommandGroup(after: .sidebar) {
|
||||||
|
Toggle("Show Advanced Options", isOn: $showAdvancedOptions)
|
||||||
|
}
|
||||||
}.handlesExternalEvents(matching: Set(["UUPDump"]))
|
}.handlesExternalEvents(matching: Set(["UUPDump"]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import SwiftUI
|
||||||
|
|
||||||
struct SimpleContentView: View {
|
struct SimpleContentView: View {
|
||||||
@EnvironmentObject private var worker: Worker
|
@EnvironmentObject private var worker: Worker
|
||||||
|
@AppStorage("ShowAdvancedOptions") private var showAdvancedOptions: Bool = false
|
||||||
@State private var isConfirmCancelShown: Bool = false
|
@State private var isConfirmCancelShown: Bool = false
|
||||||
@State private var isDownloadCompleted: Bool = false
|
@State private var isDownloadCompleted: Bool = false
|
||||||
|
|
||||||
|
|
@ -88,10 +89,12 @@ struct SimpleContentView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HStack {
|
HStack {
|
||||||
|
if showAdvancedOptions {
|
||||||
ShowWindowButtonView(id: "UUPDump") {
|
ShowWindowButtonView(id: "UUPDump") {
|
||||||
Text("All builds…")
|
Text("All builds…")
|
||||||
}.disabled(worker.isBusy)
|
}.disabled(worker.isBusy)
|
||||||
.help("Build custom installation for any build through UUP Dump.")
|
.help("Build custom installation for any build through UUP Dump.")
|
||||||
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
if worker.isBusy {
|
if worker.isBusy {
|
||||||
Button(role: .cancel) {
|
Button(role: .cancel) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue