mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-08-03 20:47:22 -04:00
Update macOS
This commit is contained in:
parent
f824a6bc1a
commit
bfb49f18b0
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user