Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waypointform drop maps pin #911

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -6728,6 +6728,9 @@
},
"Drag & Drop is the recommended way to update firmware for NRF devices. If your iPhone or iPad is USB-C it will work with your regular USB-C charging cable, for lightning devices you need the Apple Lightning to USB camera adaptor." : {

},
"Drop Pin in Maps" : {

},
"echo" : {
"localizations" : {
Expand Down Expand Up @@ -15389,6 +15392,9 @@
},
"Never" : {

},
"New Key%@" : {

},
"Newer firmware is available" : {

Expand Down Expand Up @@ -16756,6 +16762,9 @@
},
"Public Key Mismatch" : {

},
"Public Key%@" : {

},
"PWD" : {

Expand Down
25 changes: 14 additions & 11 deletions Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -269,32 +269,36 @@ struct WaypointForm: View {
.fixedSize(horizontal: false, vertical: true)
} icon: {
Image(systemName: "doc.plaintext")
.symbolRenderingMode(.hierarchical)
.frame(width: 35)
}
.padding(.bottom, 5)
.padding(.bottom)
}
/// Coordinate
Label {
Text("Coordinates: \(String(format: "%.6f", waypoint.coordinate.latitude)), \(String(format: "%.6f", waypoint.coordinate.longitude))")
.textSelection(.enabled)
.foregroundColor(.primary)
} icon: {
Image(systemName: "mappin.and.ellipse")
.symbolRenderingMode(.hierarchical)
.frame(width: 35)
Image(systemName: "mappin.circle")
}
.padding(.bottom, 5)
.padding(.bottom)
// Drop Maps Pin
Button(action: {
if let url = URL(string: "http://maps.apple.com/?ll=\(waypoint.coordinate.latitude),\(waypoint.coordinate.longitude)&q=\(waypoint.name ?? "Dropped Pin")") {
UIApplication.shared.open(url)
}
}) {
Label("Drop Pin in Maps", systemImage: "mappin.and.ellipse")
}
.padding(.bottom)
/// Created
Label {
Text("Created: \(waypoint.created?.formatted() ?? "?")")
.foregroundColor(.primary)
} icon: {
Image(systemName: "clock.badge.checkmark")
.symbolRenderingMode(.hierarchical)
.frame(width: 35)
}
.padding(.bottom, 5)
.padding(.bottom)
/// Updated
if waypoint.lastUpdated != nil {
Label {
Expand All @@ -303,9 +307,8 @@ struct WaypointForm: View {
} icon: {
Image(systemName: "clock.arrow.circlepath")
.symbolRenderingMode(.hierarchical)
.frame(width: 35)
}
.padding(.bottom, 5)
.padding(.bottom)
}
/// Expires
if waypoint.expire != nil {
Expand Down
6 changes: 6 additions & 0 deletions Meshtastic/Views/Nodes/Helpers/NodeDetail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ struct NodeDetail: View {
Text("The public key does not match the recorded key. You may delete the node and let it exchange keys again, but this may indicate a more serious security problem. Contact the user through another trusted channel, to determine if the key change was due to a factory reset or other intentional action.")
.font(.caption)
.foregroundStyle(.red)
Text("Public Key\(user.publicKey?.base64EncodedString() ?? "Empty Key")")
.monospaced()
.allowsTightening(/*@START_MENU_TOKEN@*/true/*@END_MENU_TOKEN@*/)
Text("New Key\(user.newPublicKey?.base64EncodedString() ?? "Empty Key")")
.monospaced()
.allowsTightening(/*@START_MENU_TOKEN@*/true/*@END_MENU_TOKEN@*/)
}
} icon: {
Image(systemName: "key.slash.fill")
Expand Down
Loading