mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Make favorite icon yellow
Add node list icon row
This commit is contained in:
parent
99fbc6c9a6
commit
415661d477
6 changed files with 29 additions and 7 deletions
|
|
@ -67,7 +67,7 @@ struct UserList: View {
|
|||
Spacer()
|
||||
if user.vip {
|
||||
Image(systemName: "star.fill")
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundColor(.yellow)
|
||||
}
|
||||
if user.messageList.count > 0 {
|
||||
if lastMessageDay == currentDay {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ struct UserMessageList: View {
|
|||
LazyVStack {
|
||||
ForEach( user.messageList ) { (message: MessageEntity) in
|
||||
if user.num != bleManager.connectedPeripheral?.num ?? -1 {
|
||||
let currentUser: Bool = (bleManager.connectedPeripheral?.num ?? 0 == message.fromUser?.num ?? -1 ? true : false)
|
||||
let currentUser: Bool = (Int64(UserDefaults.preferredPeripheralNum) == message.fromUser?.num ?? -1 ? true : false)
|
||||
|
||||
if message.replyID > 0 {
|
||||
let messageReply = user.messageList.first(where: { $0.messageId == message.replyID })
|
||||
|
|
|
|||
|
|
@ -225,6 +225,8 @@ struct NodeMapSwiftUI: View {
|
|||
}
|
||||
}
|
||||
.onChange(of: node) {
|
||||
isLookingAround = false
|
||||
isShowingAltitude = false
|
||||
mostRecent = node.positions?.lastObject as? PositionEntity
|
||||
if node.positions?.count ?? 0 > 1 {
|
||||
position = .automatic
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ struct PositionPopover: View {
|
|||
if position.nodePosition != nil {
|
||||
if position.nodePosition?.user?.vip ?? false {
|
||||
Image(systemName: "star.fill")
|
||||
.foregroundColor(.accentColor)
|
||||
.foregroundColor(.yellow)
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.font(.largeTitle)
|
||||
.padding(.bottom, 5)
|
||||
|
|
@ -137,7 +137,7 @@ struct PositionPopover: View {
|
|||
if position.nodePosition?.hasEnvironmentMetrics ?? false {
|
||||
Image(systemName: "cloud.sun.rain")
|
||||
.foregroundColor(.accentColor)
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.symbolRenderingMode(.multicolor)
|
||||
.font(.largeTitle)
|
||||
.padding(.bottom)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ struct NodeDetail: View {
|
|||
NavigationLink {
|
||||
EnvironmentMetricsLog(node: node)
|
||||
} label: {
|
||||
Image(systemName: "chart.xyaxis.line")
|
||||
Image(systemName: "cloud.sun.rain")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.font(.title)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ struct NodeListItem: View {
|
|||
VStack(alignment: .leading) {
|
||||
CircleText(text: node.user?.shortName ?? "?", color: Color(UIColor(hex: UInt32(node.num))), circleSize: 65)
|
||||
.padding(.trailing, 5)
|
||||
BatteryLevelCompact(node: node, font: .caption, iconFont: .callout, color: .accentColor)
|
||||
}
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
|
|
@ -33,7 +32,7 @@ struct NodeListItem: View {
|
|||
if node.user?.vip ?? false {
|
||||
Spacer()
|
||||
Image(systemName: "star.fill")
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundColor(.yellow)
|
||||
}
|
||||
}
|
||||
if connected {
|
||||
|
|
@ -83,6 +82,27 @@ struct NodeListItem: View {
|
|||
LoRaSignalStrengthMeter(snr: node.snr, rssi: node.rssi, preset: preset ?? ModemPresets.longFast, compact: true)
|
||||
}
|
||||
}
|
||||
HStack {
|
||||
BatteryLevelCompact(node: node, font: .caption, iconFont: .callout, color: .accentColor)
|
||||
|
||||
if node.hasPositions {
|
||||
Image(systemName: "mappin.and.ellipse")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.font(.callout)
|
||||
|
||||
}
|
||||
if node.hasEnvironmentMetrics {
|
||||
Image(systemName: "cloud.sun.rain")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.font(.callout)
|
||||
}
|
||||
if node.hasDetectionSensorMetrics {
|
||||
Image(systemName: "sensor")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.font(.callout)
|
||||
}
|
||||
}
|
||||
.padding(.top, 3)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue