Skip to content
/ Asspp Public

Commit 57709e6

Browse files
committed
Fix buttons not tappable in Form HStack on iOS and bump to 4.1.1
1 parent 248393e commit 57709e6

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

Asspp/Interface/Setting/SettingView.swift

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,21 @@ struct SettingView: View {
5151
#if canImport(UIKit)
5252
.textInputAutocapitalization(.never)
5353
#endif
54-
HStack {
54+
#if os(macOS)
55+
HStack {
56+
Button("Save") {
57+
let trimmed = deviceIdDraft.trimmingCharacters(in: .whitespacesAndNewlines)
58+
guard !trimmed.isEmpty else { return }
59+
vm.deviceIdentifier = trimmed
60+
ApplePackage.Configuration.deviceIdentifier = trimmed
61+
editingDeviceId = false
62+
}
63+
Button("Cancel", role: .destructive) {
64+
editingDeviceId = false
65+
}
66+
Spacer()
67+
}
68+
#else
5569
Button("Save") {
5670
let trimmed = deviceIdDraft.trimmingCharacters(in: .whitespacesAndNewlines)
5771
guard !trimmed.isEmpty else { return }
@@ -62,31 +76,30 @@ struct SettingView: View {
6276
Button("Cancel", role: .destructive) {
6377
editingDeviceId = false
6478
}
65-
Spacer()
66-
}
79+
#endif
6780
} else {
6881
Text(vm.deviceIdentifier)
6982
.font(.system(.body, design: .monospaced))
7083
.textSelection(.enabled)
7184
.redacted(reason: .placeholder, isEnabled: vm.demoMode)
72-
HStack {
73-
#if canImport(UIKit)
74-
Button("Open Settings") {
75-
openURL(URL(string: UIApplication.openSettingsURLString)!)
76-
}
77-
Button("Install Certificate") {
78-
openURL(Installer.caURL)
79-
}
80-
#else
85+
#if os(macOS)
86+
HStack {
8187
Button("Open Settings") {
8288
openURL(URL(string: "x-apple.systempreferences:")!)
8389
}
8490
Button("Show Certificate in Finder") {
8591
NSWorkspace.shared.activateFileViewerSelecting([Installer.ca])
8692
}
87-
#endif
88-
Spacer()
89-
}
93+
Spacer()
94+
}
95+
#else
96+
Button("Open Settings") {
97+
openURL(URL(string: UIApplication.openSettingsURLString)!)
98+
}
99+
Button("Install Certificate") {
100+
openURL(Installer.caURL)
101+
}
102+
#endif
90103
}
91104
} header: {
92105
Text("Device")

Configuration/Version.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// Single source of truth for version numbers
33
// CI can modify this file to update version for all configurations
44

5-
MARKETING_VERSION = 4.1.0
5+
MARKETING_VERSION = 4.1.1
66
CURRENT_PROJECT_VERSION = 0

0 commit comments

Comments
 (0)