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)
|
.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)
|
HotspotAddress(serverAddress: address, qrCodeImage: qrCodeImage)
|
||||||
}
|
HotspotExplanation()
|
||||||
if let errorMessage = hotspot.errorMessage {
|
case .stopped:
|
||||||
|
HotspotExplanation()
|
||||||
|
case .error(let errorMessage):
|
||||||
Section {
|
Section {
|
||||||
Text(errorMessage)
|
Text(errorMessage)
|
||||||
.fontWeight(.bold)
|
|
||||||
.lineLimit(nil)
|
.lineLimit(nil)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
.foregroundStyle(.red)
|
.foregroundStyle(.red)
|
||||||
}
|
}
|
||||||
|
HotspotExplanation()
|
||||||
}
|
}
|
||||||
HotspotExplanation()
|
|
||||||
}
|
}
|
||||||
.listStyle(.sidebar)
|
.listStyle(.sidebar)
|
||||||
}
|
}
|
||||||
|
@ -132,10 +132,10 @@ struct HotspotSettings: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 16) {
|
VStack(spacing: 16) {
|
||||||
SettingSection(name: LocalString.hotspot_settings_port_number) {
|
SettingSection(name: LocalString.hotspot_settings_port_number) {
|
||||||
Text(Hotspot.validPortRangeMessage())
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
TextField("", value: $portNumber, formatter: PortNumberFormatter.instance)
|
TextField("", value: $portNumber, formatter: PortNumberFormatter.instance)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
|
Text(Hotspot.validPortRangeMessage())
|
||||||
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
.onChange(of: portNumber) { newValue in
|
.onChange(of: portNumber) { newValue in
|
||||||
let fixedValue = Hotspot.fixedUp(port: newValue)
|
let fixedValue = Hotspot.fixedUp(port: newValue)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user