mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #1160 from meshtastic/2.5.22
2.5.21 Date hot fixes and community support badge
This commit is contained in:
commit
37f31e714d
3 changed files with 10 additions and 4 deletions
|
|
@ -4251,6 +4251,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Community Support" : {
|
||||
|
||||
},
|
||||
"Config" : {
|
||||
"localizations" : {
|
||||
|
|
@ -10673,6 +10676,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Full Support" : {
|
||||
|
||||
},
|
||||
"gas" : {
|
||||
"extractionState" : "manual",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import Foundation
|
|||
extension Date {
|
||||
|
||||
var lastHeard: String {
|
||||
if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .day, value: 1, to: Date())! {
|
||||
if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .year, value: 1, to: Date())! {
|
||||
formatted()
|
||||
} else {
|
||||
"unknown.age".localized
|
||||
|
|
@ -20,7 +20,7 @@ extension Date {
|
|||
func formattedDate(format: String) -> String {
|
||||
let dateformat = DateFormatter()
|
||||
dateformat.dateFormat = format
|
||||
if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .day, value: 1, to: Date())! {
|
||||
if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .year, value: 1, to: Date())! {
|
||||
return dateformat.string(from: self)
|
||||
} else {
|
||||
return "unknown.age".localized
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ struct NodeInfoItem: View {
|
|||
if user.hwModel != "UNSET" {
|
||||
VStack(alignment: .center) {
|
||||
Spacer()
|
||||
Image(systemName: currentDevice?.activelySupported ?? false ? "checkmark.seal.fill" : "x.circle")
|
||||
Image(systemName: currentDevice?.activelySupported ?? false ? "checkmark.seal.fill" : "seal.fill")
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(width: 75, height: 75)
|
||||
.foregroundStyle(currentDevice?.activelySupported ?? false ? .green : .red)
|
||||
Text( currentDevice?.activelySupported ?? false ? "Supported" : "Unsupported")
|
||||
Text( currentDevice?.activelySupported ?? false ? "Full Support" : "Community Support")
|
||||
.foregroundStyle(.gray)
|
||||
.font(.callout)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue