diff --git a/Meshtastic/Views/Settings/Channels.swift b/Meshtastic/Views/Settings/Channels.swift index 40657517..4d5b47df 100644 --- a/Meshtastic/Views/Settings/Channels.swift +++ b/Meshtastic/Views/Settings/Channels.swift @@ -95,6 +95,7 @@ struct Channels: View { } } .sheet(isPresented: $isPresentingEditView) { + #if targetEnvironment(macCatalyst) Text("channel") .font(.largeTitle) @@ -324,17 +325,16 @@ struct Channels: View { .padding(.bottom) #endif } - .presentationDetents([.medium, .large]) + .presentationDetents([.fraction(0.45), .fraction(0.55), .fraction(0.65)]) + .presentationDragIndicator(.visible) } if node?.myInfo?.channels?.array.count ?? 0 < 8 && node != nil { Button { - let lastChannel = node?.myInfo?.channels?.lastObject as? ChannelEntity - let channelIndexes = node?.myInfo?.channels?.compactMap({(ch) -> Int in return (ch as AnyObject).index }) - var firstChannelIndex = firstMissingChannelIndex(channelIndexes ?? []) + let firstChannelIndex = firstMissingChannelIndex(channelIndexes ?? []) channelKeySize = 16 let key = generateChannelKey(size: channelKeySize) channelName = "" diff --git a/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift b/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift index b89792ed..f319f894 100644 --- a/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/MQTTConfig.swift @@ -32,7 +32,7 @@ struct MQTTConfig: View { Form { if node != nil && node?.loRaConfig != nil { let rc = RegionCodes(rawValue: Int(node?.loRaConfig?.regionCode ?? 0)) - if rc?.dutyCycle ?? 0 <= 10 { + if rc?.dutyCycle ?? 0 > 0 && rc?.dutyCycle ?? 0 < 100 { Text("Your region has a \(rc?.dutyCycle ?? 0)% duty cycle. MQTT is not advised when you are duty cycle restricted, the extra traffic will quickly overwhelm your LoRa mesh.") .font(.callout) .foregroundColor(.red) diff --git a/Meshtastic/Views/Settings/Settings.swift b/Meshtastic/Views/Settings/Settings.swift index a5bb46f9..46ba5549 100644 --- a/Meshtastic/Views/Settings/Settings.swift +++ b/Meshtastic/Views/Settings/Settings.swift @@ -129,7 +129,7 @@ struct Settings: View { Section("radio.configuration") { if node != nil && node?.loRaConfig != nil { let rc = RegionCodes(rawValue: Int(node?.loRaConfig?.regionCode ?? 0)) - if rc?.dutyCycle ?? 0 < 1 { + if rc?.dutyCycle ?? 0 > 0 && rc?.dutyCycle ?? 0 < 100 { Label { Text("Hourly Duty Cycle") @@ -144,7 +144,6 @@ struct Settings: View { Text("Limit all periodic broadcasts intervals especially telemetry and position. If you need to increase hops, do it on nodes at the edges, not the ones in the middle. MQTT is not advised when you are duty cycle restricted because the gateway node is then doing all the work.") .font(.caption2) .foregroundColor(.gray) - } } NavigationLink { diff --git a/de.lproj/Localizable.strings b/de.lproj/Localizable.strings index 02c6954c..5012149c 100644 --- a/de.lproj/Localizable.strings +++ b/de.lproj/Localizable.strings @@ -65,6 +65,7 @@ "detection.sensor"="Detection Sensor"; "device"="Gerät"; "device.config"="Gerätekonfiguration"; +"device.configuration"="Device Configuration"; "device.metrics.delete"="Delete all device metrics?"; "device.metrics.log"="Device Metrics Log"; "device.role.client"="Client (Standard) - Mit App verbundener Client."; diff --git a/en.lproj/Localizable.strings b/en.lproj/Localizable.strings index 79a0fdd4..5dca3b5c 100644 --- a/en.lproj/Localizable.strings +++ b/en.lproj/Localizable.strings @@ -67,6 +67,7 @@ "detection.sensor.log"="Detection Sensor Log"; "device"="Device"; "device.config"="Device Config"; +"device.configuration"="Device Configuration"; "device.metrics.delete"="Delete all device metrics?"; "device.metrics.log"="Device Metrics Log"; "device.role.client"="App connected or stand alone messaging device."; diff --git a/he.lproj/Localizable.strings b/he.lproj/Localizable.strings index 041b5794..2513a540 100644 --- a/he.lproj/Localizable.strings +++ b/he.lproj/Localizable.strings @@ -67,6 +67,7 @@ "detection.sensor.log"="יומן חיישן זיהוי"; "device"="מכשיר"; "device.config"="הגדרות מכשיר"; +"device.configuration"="Device Configuration"; "device.metrics.delete"="נקה יומן מכשיר?"; "device.metrics.log"="יומן מכשיר"; "device.role.client"="אפליקציה מחוברת או מכשיר תקשורת עצמאי."; diff --git a/pl.lproj/Localizable.strings b/pl.lproj/Localizable.strings index 02aae0a4..68e586c9 100644 --- a/pl.lproj/Localizable.strings +++ b/pl.lproj/Localizable.strings @@ -67,6 +67,7 @@ "detection.sensor"="Detection Sensor"; "device"="Urządzenie"; "device.config"="Konfiguracja urządzenia"; +"device.configuration"="Device Configuration"; "device.metrics.delete"="Usunąć wszystkie metryki urządzenia?"; "device.metrics.log"="Dziennik metryk urządzenia"; "device.role.client"="Klient (domyślnie) - Klient połączony z aplikacją."; diff --git a/zh-Hans.lproj/Localizable.strings b/zh-Hans.lproj/Localizable.strings index 69ddc953..962c4785 100644 --- a/zh-Hans.lproj/Localizable.strings +++ b/zh-Hans.lproj/Localizable.strings @@ -65,6 +65,7 @@ "detection.sensor"="Detection Sensor"; "device"="电台"; "device.config"="电台配置"; +"device.configuration"="Device Configuration"; "device.metrics.delete"="删除所有电台指标?"; "device.metrics.log"="电台指标日志"; "device.role.client"="标准模式 - App 可以连接到电台进行收发操作,并且会自动转发 Mesh 网络中其他节点的消息。";