Update macOS

This commit is contained in:
Balazs Perlaki-Horvath 2025-08-02 22:08:57 +02:00
parent f824a6bc1a
commit bfb49f18b0
2 changed files with 10 additions and 7 deletions

View File

@ -42,19 +42,22 @@ struct HotspotDetails: View {
}
.collapsible(false)
if case .started(let address, let qrCodeImage) = hotspot.state {
switch hotspot.state {
case .started(let address, let qrCodeImage):
HotspotAddress(serverAddress: address, qrCodeImage: qrCodeImage)
}
if let errorMessage = hotspot.errorMessage {
HotspotExplanation()
case .stopped:
HotspotExplanation()
case .error(let errorMessage):
Section {
Text(errorMessage)
.fontWeight(.bold)
.lineLimit(nil)
.multilineTextAlignment(.leading)
.foregroundStyle(.red)
}
HotspotExplanation()
}
HotspotExplanation()
}
.listStyle(.sidebar)
}

View File

@ -132,10 +132,10 @@ struct HotspotSettings: View {
var body: some View {
VStack(spacing: 16) {
SettingSection(name: LocalString.hotspot_settings_port_number) {
Text(Hotspot.validPortRangeMessage())
.foregroundColor(.secondary)
TextField("", value: $portNumber, formatter: PortNumberFormatter.instance)
.textFieldStyle(.roundedBorder)
Text(Hotspot.validPortRangeMessage())
.foregroundColor(.secondary)
}
.onChange(of: portNumber) { newValue in
let fixedValue = Hotspot.fixedUp(port: newValue)