mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
33 lines
685 B
Swift
33 lines
685 B
Swift
import SwiftUI
|
|
|
|
struct ClientHistoryButton: View {
|
|
var bleManager: BLEManager
|
|
|
|
var connectedNode: NodeInfoEntity
|
|
|
|
var node: NodeInfoEntity
|
|
|
|
@State
|
|
private var isPresentingAlert = false
|
|
|
|
var body: some View {
|
|
Button {
|
|
isPresentingAlert = bleManager.requestStoreAndForwardClientHistory(
|
|
fromUser: connectedNode.user!,
|
|
toUser: node.user!
|
|
)
|
|
} label: {
|
|
Label(
|
|
"Client History",
|
|
systemImage: "envelope.arrow.triangle.branch"
|
|
)
|
|
}.alert(
|
|
"Client History Request Sent",
|
|
isPresented: $isPresentingAlert
|
|
) {
|
|
Button("OK") { }.keyboardShortcut(.defaultAction)
|
|
} message: {
|
|
Text("Any missed messages will be delivered again.")
|
|
}
|
|
}
|
|
}
|