Add back 48 hour filter to the mesh map, add admin channel tip

This commit is contained in:
Garth Vander Houwen 2024-03-28 08:39:34 -07:00
parent a0ea03bffd
commit 6a7baf1ebe
11 changed files with 39 additions and 5 deletions

View file

@ -14,14 +14,13 @@ extension PositionEntity {
static func allPositionsFetchRequest() -> NSFetchRequest<PositionEntity> {
let request: NSFetchRequest<PositionEntity> = PositionEntity.fetchRequest()
request.fetchLimit = 300
request.fetchLimit = 200
//request.fetchBatchSize = 1
request.returnsObjectsAsFaults = false
request.includesSubentities = true
request.returnsDistinctResults = true
request.sortDescriptors = [NSSortDescriptor(key: "time", ascending: false)]
/// && time >= %@
let positionPredicate = NSPredicate(format: "nodePosition != nil && (nodePosition.user.shortName != nil || nodePosition.user.shortName != '') && latest == true", Calendar.current.date(byAdding: .day, value: -2, to: Date())! as NSDate)
let positionPredicate = NSPredicate(format: "nodePosition != nil && (nodePosition.user.shortName != nil || nodePosition.user.shortName != '') && latest == true && time >= %@", Calendar.current.date(byAdding: .day, value: -2, to: Date())! as NSDate)
let pointOfInterest = LocationHelper.currentLocation

View file

@ -42,3 +42,20 @@ struct CreateChannelsTip: Tip {
Image(systemName: "fibrechannel")
}
}
@available(iOS 17.0, macOS 14.0, *)
struct AdminChannelTip: Tip {
var id: String {
return "tip.channel.admin"
}
var title: Text {
Text("tip.channel.admin.title")
}
var message: Text? {
Text("tip.channel.admin.message")
}
var image: Image? {
Image(systemName: "fibrechannel")
}
}

View file

@ -41,8 +41,6 @@ struct NodeMapSwiftUI: View {
), animation: .none)
private var waypoints: FetchedResults<WaypointEntity>
var body: some View {
var mostRecent = node.positions?.lastObject as? PositionEntity

View file

@ -6,6 +6,9 @@
//
import SwiftUI
#if canImport(TipKit)
import TipKit
#endif
struct Settings: View {
@Environment(\.managedObjectContext) var context
@ -131,6 +134,9 @@ struct Settings: View {
}
}
}
if #available(iOS 17.0, macOS 14.0, *) {
TipView(AdminChannelTip(), arrowEdge: .top)
}
} else {
if bleManager.connectedPeripheral != nil {
Text("Connected Node \(node?.user?.longName ?? "unknown".localized)")

View file

@ -320,6 +320,8 @@
"timestamp"="Timestamp";
"tip.bluetooth.connect.title"="Connected LoRa Radio";
"tip.bluetooth.connect.message"="Shows information for the Lora radio currently connected via bluetooth. You can swipe left to disconnect the radio and long press to view stats or start the live activity.";
"tip.channel.admin.title"="Admin Channel";
"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices.";
"tip.channels.create.title"="Manage Channels";
"tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)";
"tip.channels.share.title"="Sharing Meshtastic Channels";

View file

@ -334,6 +334,8 @@
"timestamp"="Timestamp";
"tip.bluetooth.connect.title"="Connected Radio";
"tip.bluetooth.connect.message"="Shows information for the Lora radio connected via bluetooth. You can swipe left to disconnect the radio and long press to view stats or start the live activity.";
"tip.channel.admin.title"="Admin Channel";
"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices.";
"tip.channels.create.title"="Manage Channels";
"tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/tips/)";
"tip.channels.share.title"="Sharing Meshtastic Channels";

View file

@ -302,6 +302,8 @@
"tip.bluetooth.connect.message"="Affiche les informations de la radio Lora connectée via le bluetooth. Vous pouvez faire un glissé vers la gauche pour déconnecter la radio et un appui long pour voir les statistiques ou démarrer l'activité en direct.";
"tip.channels.create.title"="Gérer les canaux";
"tip.channels.create.message"="La pluspart des données de votre maillage sont envoyées sur le canal principal. Vous pouvez définir des canaux secondaires pour créer des groupes de messagerie additionnelle sécurisés avec leur propre clé. [Conseils de configuration du canal](https://meshtastic.org/docs/configuration/tips/)";
"tip.channel.admin.title"="Admin Channel";
"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices.";
"tip.channels.share.title"="Partage des canaux Meshtastic";
"tip.channels.share.message"="Un code QR Meshtastic contient la configuration LoRa et les valeurs de canal nécessaires pour communiquer. La plupart des activités du maillage ont lieu sur le canal principal requis. Si vous ne partagez pas votre canal principal, votre premier canal partagé devient le canal principal de lautre réseau. Les autres canaux sont pour les groupes privés, chacun avec sa propre clé.";
"tip.messages.title"="Messages";

View file

@ -324,6 +324,8 @@
"timestamp"="שעה/תאריך";
"tip.bluetooth.connect.title"="מכשיר מחובר";
"tip.bluetooth.connect.message"="מראה מידע אודות מכשיר המשטסטיק המחובר כעת לבלוטוס. ניתן לגרור שמאלה להתנתקות או לחיצה ארוכה לראות סטטיסטיקה או להתחיל פעילות.";
"tip.channel.admin.title"="Admin Channel";
"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices.";
"tip.channels.create.title"="Manage Channels";
"tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)";
"tip.channels.share.title"="משתף ערוצי משטסטיק";

View file

@ -321,6 +321,8 @@
"timestamp"="Znacznik czasu";
"tip.bluetooth.connect.title"="Connected LoRa Radio";
"tip.bluetooth.connect.message"="Shows information for the Lora radio currently connected via bluetooth. You can swipe left to disconnect the radio and long press to view stats or start the live activity.";
"tip.channel.admin.title"="Admin Channel";
"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices.";
"tip.channels.create.title"="Manage Channels";
"tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)";
"tip.channels.share.title"="Sharing Meshtastic Channels";

View file

@ -320,6 +320,8 @@
"timestamp"="时间戳";
"tip.bluetooth.connect.title"="连接到 LoRa 电台";
"tip.bluetooth.connect.message"="显示当前通过蓝牙连接的 Lora 电台的信息。您可以向左滑动断开电台,长按查看统计信息或开始实时活动。";
"tip.channel.admin.title"="Admin Channel";
"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices.";
"tip.channels.create.title"="Manage Channels";
"tip.channels.create.message"="Most data on your mesh is sent over the primary channel. You can set up secondary channels to create additional messaging groups secured by their own key. [Channel config tips](https://meshtastic.org/docs/configuration/radio/channels/)";
"tip.channels.share.title"="共享 Meshtastic 频道";

View file

@ -319,6 +319,8 @@
"timestamp"="時間戳記";
"tip.bluetooth.connect.title"="連接到 LoRa 電台";
"tip.bluetooth.connect.message"="顯示目前通過藍芽連接的 Lora 電台的信息。您可以向左滑動斷開電台,長按查看統計訊息或開始即時活動。";
"tip.channel.admin.title"="Admin Channel";
"tip.channel.admin.message"="Admin channel detected: Select a node from the drop down to manage connected or remote devices.";
"tip.channels.create.title"="管理頻道";
"tip.channels.create.message"="現在 Mesh 上的資料會通過主通道發送。您可以設定輔助通道來建立由自己的金鑰保護的其他訊息組 [頻道設定提示](https://meshtastic.org/docs/configuration/radio/channels/)";
"tip.channels.share.title"="共享 Meshtastic 頻道";