Sync source edition with VCC Plus 3.7.0 build 63
This commit is contained in:
1 parent
c652a5276d
commit
b2ecec4d87
86 files changed
+10519
-472
No files matched your search
@@ -10,13 +10,14 @@ struct SoftwareLibraryLaunchPreviewView: View {
|
||||
private var setupName: String {
|
||||
switch plan.profile {
|
||||
case .diskBasic: return "Disk BASIC"
|
||||
case .hardDriveBasic: return "Hard-drive BASIC"
|
||||
case .romCartridge: return plan.cartridgeDevice == .orchestra90 ? "Orchestra-90" : "ROM Cartridge"
|
||||
case .cocoSDC: return "CoCo SDC"
|
||||
}
|
||||
}
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 18) {
|
||||
Label(plan.automaticallyStarts ? "Start Software" : "Set Up Software", systemImage: "play.rectangle")
|
||||
Label(plan.automaticallyStarts ? "Start Software" : plan.offersPlay ? "Play Software" : "Set Up Software", systemImage: "play.rectangle")
|
||||
.font(.title2.weight(.semibold))
|
||||
Text(plan.title).font(.title3.weight(.medium))
|
||||
ScrollView {
|
||||
@@ -42,14 +43,24 @@ struct SoftwareLibraryLaunchPreviewView: View {
|
||||
ForEach(plan.floppyURLs.keys.sorted(), id: \.self) { drive in
|
||||
LabeledContent("FD\(drive)", value: plan.floppyURLs[drive]!.lastPathComponent)
|
||||
}
|
||||
ForEach(plan.hardDiskURLs.keys.sorted(), id: \.self) { drive in
|
||||
LabeledContent("HD\(drive)", value: plan.hardDiskURLs[drive]!.lastPathComponent)
|
||||
}
|
||||
if let folder = plan.sdcFolderURL { Label("SD card folder: " + folder.lastPathComponent, systemImage: "sdcard") }
|
||||
if !plan.compatibilityNotes.isEmpty {
|
||||
Text(plan.compatibilityNotes.joined(separator: "\n\n")).font(.callout).foregroundStyle(.secondary)
|
||||
}
|
||||
if !plan.automaticallyStarts {
|
||||
Label("Manual loading", systemImage: "keyboard").font(.headline)
|
||||
if plan.offersPlay {
|
||||
Text(plan.commands.isEmpty
|
||||
? "The CoCo will run with the selected media mounted. Load the program yourself; no loading commands will be typed automatically."
|
||||
: "The CoCo will run with the selected media mounted and enter the commands below. Start the program yourself if those commands do not run it.")
|
||||
.font(.callout)
|
||||
}
|
||||
Text(plan.manualInstructions).font(.callout).textSelection(.enabled)
|
||||
} else if !plan.commands.isEmpty {
|
||||
}
|
||||
if !plan.commands.isEmpty {
|
||||
DisclosureGroup("Loading commands") {
|
||||
Text(plan.commands.joined(separator: "\n")).font(.system(.callout, design: .monospaced)).textSelection(.enabled)
|
||||
}
|
||||
@@ -64,7 +75,7 @@ struct SoftwareLibraryLaunchPreviewView: View {
|
||||
HStack {
|
||||
Button("Cancel", role: .cancel, action: cancel).keyboardShortcut(.cancelAction).accessibilityIdentifier("library-cancel-play")
|
||||
Spacer()
|
||||
Button(plan.automaticallyStarts ? "Start" : "Set Up", action: confirm)
|
||||
Button(plan.automaticallyStarts ? "Start" : plan.offersPlay ? "Play" : "Set Up", action: confirm)
|
||||
.buttonStyle(.borderedProminent).keyboardShortcut(.defaultAction).accessibilityIdentifier("library-confirm-play")
|
||||
}
|
||||
}.padding(24).frame(width: 490)
|
||||
@@ -98,3 +109,33 @@ struct SoftwareLibraryMediaChoiceView: View {
|
||||
}.padding(24).frame(width: 520)
|
||||
}
|
||||
}
|
||||
|
||||
#if !VCC_COMPANION_CLIENT
|
||||
struct SoftwareLibraryPersonalPresentation: ViewModifier {
|
||||
@ObservedObject var model: SoftwareLibraryModel
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.sheet(item: $model.personalEditor, onDismiss: { model.cancelPersonalEdit() }) { entry in
|
||||
PersonalSoftwareEditor(entry: entry, unsupported: model.personalUnsupported, isImport: model.isPersonalImport,
|
||||
saving: model.personalSaving, error: model.personalError, duplicateID: model.personalDuplicateID,
|
||||
save: { model.savePersonal($0, coverPNG: $1, allowDuplicate: $2) }, openExisting: model.openExistingPersonal,
|
||||
previewCover: model.personalCoverPreview,
|
||||
cancel: model.cancelPersonalEdit)
|
||||
}
|
||||
.safeAreaInset(edge: .bottom) {
|
||||
if model.personalInspecting {
|
||||
HStack { ProgressView().controlSize(.small); Text("Preparing a private import preview…"); Spacer(); Button("Cancel", role: .cancel) { model.cancelPersonalInspection() } }.padding(10)
|
||||
} else if model.personalEditor == nil, let error = model.personalError {
|
||||
Label(error, systemImage: "exclamationmark.triangle").font(.callout).foregroundStyle(.orange)
|
||||
.textSelection(.enabled).frame(maxWidth: .infinity, alignment: .leading).padding(10)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
import SwiftUI
|
||||
struct SoftwareLibraryPersonalPresentation: ViewModifier {
|
||||
let model: SoftwareLibraryModel
|
||||
func body(content: Content) -> some View { content }
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user