mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-04-22 13:35:55 +00:00
Show installation step description for all steps in InstallationStepDetailView
This commit is contained in:
parent
1469dfa56b
commit
d00a356c29
1 changed files with 20 additions and 8 deletions
|
|
@ -4,11 +4,11 @@ struct InstallationStepDetailView: View {
|
||||||
let installationStep: InstallationStep
|
let installationStep: InstallationStep
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
|
Text("Step \(installationStep.stepNumber) of \(installationStep.stepCount): \(installationStep.message)")
|
||||||
|
|
||||||
switch installationStep {
|
switch installationStep {
|
||||||
case let .downloading(progress):
|
case let .downloading(progress):
|
||||||
Text("Step \(installationStep.stepNumber) of \(installationStep.stepCount): \(installationStep.message)")
|
|
||||||
.font(.title2)
|
|
||||||
ObservingProgressIndicator(
|
ObservingProgressIndicator(
|
||||||
progress,
|
progress,
|
||||||
controlSize: .regular,
|
controlSize: .regular,
|
||||||
|
|
@ -21,16 +21,28 @@ struct InstallationStepDetailView: View {
|
||||||
.scaleEffect(0.5)
|
.scaleEffect(0.5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(minWidth: 80)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct InstallDetailView_Previews: PreviewProvider {
|
struct InstallDetailView_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
InstallationStepDetailView(
|
Group {
|
||||||
installationStep: .downloading(
|
InstallationStepDetailView(
|
||||||
progress: configure(Progress(totalUnitCount: 100)) { $0.completedUnitCount = 40; $0.throughput = 9211681; $0.fileCompletedCount = 84844492; $0.fileTotalCount = 11944848484 }
|
installationStep: .downloading(
|
||||||
|
progress: configure(Progress()) {
|
||||||
|
$0.kind = .file
|
||||||
|
$0.fileOperationKind = .downloading
|
||||||
|
$0.estimatedTimeRemaining = 123
|
||||||
|
$0.totalUnitCount = 11944848484
|
||||||
|
$0.completedUnitCount = 848444920
|
||||||
|
$0.throughput = 9211681
|
||||||
|
}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
InstallationStepDetailView(
|
||||||
|
installationStep: .unarchiving
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue