Skip to content

Commit 3b86fec

Browse files
authored
Merge pull request #521 from insidegui/hotfix-install-config-save
Fix VM configuration not saved during setup
2 parents 0f28ca2 + a383fa4 commit 3b86fec

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

VirtualUI/Source/Installer/VMInstallationWizard.swift

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public struct VMInstallationWizard: View {
5353

5454
private var hideBottomBar: Bool {
5555
switch viewModel.step {
56-
case .systemType, .restoreImageInput, .restoreImageSelection, .name, .configuration:
56+
case .systemType, .restoreImageInput, .restoreImageSelection, .name:
5757
false
58-
case .download, .install, .done:
58+
case .configuration, .download, .install, .done:
5959
true
6060
}
6161
}
@@ -194,10 +194,7 @@ public struct VMInstallationWizard: View {
194194
nextButton
195195
}
196196
}
197-
.controlSize(.large)
198-
.padding()
199-
.background(Material.bar)
200-
.overlay(alignment: .top) { Divider() }
197+
.virtualBuddyBottomBarStyle()
201198
}
202199

203200
@ViewBuilder
@@ -285,6 +282,17 @@ extension VMInstallationStep {
285282
}
286283
}
287284

285+
extension View {
286+
@ViewBuilder
287+
func virtualBuddyBottomBarStyle() -> some View {
288+
frame(maxWidth: .infinity)
289+
.controlSize(.large)
290+
.padding()
291+
.background(Material.bar)
292+
.overlay(alignment: .top) { Divider() }
293+
}
294+
}
295+
288296
#if DEBUG
289297
extension VMInstallationWizard {
290298
@ViewBuilder

VirtualUI/Source/VM Configuration/VMConfigurationSheet.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public struct VMConfigurationSheet: View {
5757
}
5858
.frame(maxWidth: .infinity, maxHeight: .infinity)
5959
.safeAreaInset(edge: .bottom, spacing: 0) {
60-
if !isInstall { buttons }
60+
buttons
6161
}
6262
.resizableSheet(minWidth: Self.minWidth, maxWidth: .infinity, minHeight: 500, maxHeight: .infinity)
6363
}
@@ -84,14 +84,9 @@ public struct VMConfigurationSheet: View {
8484
}
8585
.keyboardShortcut(.defaultAction)
8686
.disabled(showValidationErrors)
87-
.controlSize(viewModel.context == .preInstall ? .large : .regular)
8887
}
8988
}
90-
.frame(maxWidth: .infinity)
91-
.padding(.horizontal)
92-
.padding(.vertical, 12)
93-
.background(Material.regular, in: Rectangle())
94-
.overlay(alignment: .top) { Divider() }
89+
.virtualBuddyBottomBarStyle()
9590
.onChange(of: viewModel.config) { newValue in
9691
guard showValidationErrors else { return }
9792

0 commit comments

Comments
 (0)