Merge pull request #1087 from Oliver0804/main

Updated Traditional Chinese resources to the latest version
This commit is contained in:
Garth Vander Houwen 2025-02-11 08:07:18 -08:00 committed by GitHub
commit 0cc5ab968b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 4714 additions and 88 deletions

File diff suppressed because it is too large Load diff

View file

@ -145,6 +145,5 @@ import OSLog
}
return sats
}
}

View file

@ -682,7 +682,6 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
let logString = String.localizedStringWithFormat("mesh.log.telemetry.received %@".localized, String(packet.from))
MeshLogger.log("📈 \(logString)")
if telemetryMessage.variant != Telemetry.OneOf_Variant.deviceMetrics(telemetryMessage.deviceMetrics) && telemetryMessage.variant != Telemetry.OneOf_Variant.environmentMetrics(telemetryMessage.environmentMetrics) && telemetryMessage.variant != Telemetry.OneOf_Variant.localStats(telemetryMessage.localStats) && telemetryMessage.variant != Telemetry.OneOf_Variant.powerMetrics(telemetryMessage.powerMetrics) {
/// Other unhandled telemetry packets
return
@ -739,7 +738,7 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
Logger.statistics.info("📈 [Mesh Statistics] Channel Utilization: \(telemetryMessage.localStats.channelUtilization, privacy: .public) Airtime: \(telemetryMessage.localStats.airUtilTx, privacy: .public) Packets Sent: \(telemetryMessage.localStats.numPacketsTx, privacy: .public) Packets Received: \(telemetryMessage.localStats.numPacketsRx, privacy: .public) Bad Packets Received: \(telemetryMessage.localStats.numPacketsRxBad, privacy: .public) Nodes Online: \(telemetryMessage.localStats.numOnlineNodes, privacy: .public) of \(telemetryMessage.localStats.numTotalNodes, privacy: .public) nodes for Node: \(packet.from.toHex(), privacy: .public)")
} else if telemetryMessage.variant == Telemetry.OneOf_Variant.powerMetrics(telemetryMessage.powerMetrics) {
Logger.data.info("📈 [Power Metrics] Received for Node: \(packet.from.toHex(), privacy: .public)")
if telemetryMessage.powerMetrics.hasCh1Voltage {
telemetry.powerCh1Voltage = telemetryMessage.powerMetrics.ch1Voltage
telemetry.metricsType = 2

View file

@ -37,7 +37,7 @@ class MqttClientProxyManager {
defaultServerPort = Int(fullHost.components(separatedBy: ":")[1]) ?? (useSsl ? 8883 : 1883)
}
}
if let host = host {
let port = defaultServerPort
var username = node.mqttConfig?.username

View file

@ -17,8 +17,7 @@ struct PowerMetrics: View {
LazyVGrid(columns: gridItemLayout) {
if(metric.powerCh1Voltage != nil) {
if metric.powerCh1Voltage != nil {
PowerMetricCompactWidget(
type: .voltage,
value: metric.powerCh1Voltage,
@ -26,7 +25,7 @@ struct PowerMetrics: View {
)
}
if(metric.powerCh1Current != nil) {
if metric.powerCh1Current != nil {
PowerMetricCompactWidget(
type: .current,
value: metric.powerCh1Current,
@ -34,7 +33,7 @@ struct PowerMetrics: View {
)
}
if(metric.powerCh2Voltage != nil) {
if metric.powerCh2Voltage != nil {
PowerMetricCompactWidget(
type: .voltage,
value: metric.powerCh2Voltage,
@ -42,7 +41,7 @@ struct PowerMetrics: View {
)
}
if(metric.powerCh2Current != nil) {
if metric.powerCh2Current != nil {
PowerMetricCompactWidget(
type: .current,
value: metric.powerCh2Current,
@ -50,7 +49,7 @@ struct PowerMetrics: View {
)
}
if(metric.powerCh3Voltage != nil) {
if metric.powerCh3Voltage != nil {
PowerMetricCompactWidget(
type: .voltage,
value: metric.powerCh3Voltage,
@ -58,7 +57,7 @@ struct PowerMetrics: View {
)
}
if(metric.powerCh3Current != nil) {
if metric.powerCh3Current != nil {
PowerMetricCompactWidget(
type: .current,
value: metric.powerCh3Current,

View file

@ -260,7 +260,7 @@ struct NodeDetail: View {
}
.disabled(!node.hasDeviceMetrics)
NavigationLink{
NavigationLink {
PowerMetricsLog(node: node)
} label: {
Label {

View file

@ -93,7 +93,7 @@ struct NodeList: View {
)
/// Don't show message, trace route, position exchange or delete context menu items for the connected node
if connectedNode.num != node.num {
if (!node.viaMqtt || node.viaMqtt && node.hopsAway == 0) {
if !node.viaMqtt || node.viaMqtt && node.hopsAway == 0 {
Button(action: {
if let url = URL(string: "meshtastic:///messages?userNum=\(node.num)") {
UIApplication.shared.open(url)