Meshtastic-Apple/Meshtastic/Views/Nodes/Helpers/Map/WaypointForm.swift
2023-11-11 09:44:03 -08:00

53 lines
1.1 KiB
Swift

//
// WaypointForm.swift
// Meshtastic
//
// Copyright Garth Vander Houwen 1/10/23.
//
import SwiftUI
import CoreLocation
struct WaypointForm: View {
@EnvironmentObject var bleManager: BLEManager
@Environment(\.dismiss) private var dismiss
@State var waypoint: WaypointEntity
@FocusState private var iconIsFocused: Bool
@State private var name: String = ""
@State private var description: String = ""
@State private var icon: String = "📍"
@State private var latitude: Double = 0
@State private var longitude: Double = 0
@State private var expires: Bool = false
@State private var expire: Date = Date.now.addingTimeInterval(60 * 480) // 1 minute * 480 = 8 Hours
@State private var locked: Bool = false
@State private var lockedTo: Int64 = 0
var body: some View {
ZStack {
Form {
Section(header: Text("Waypoint Options")) {
}
}
#if targetEnvironment(macCatalyst)
Spacer()
Button {
dismiss()
} label: {
Label("close", systemImage: "xmark")
}
.buttonStyle(.bordered)
.buttonBorderShape(.capsule)
.controlSize(.large)
.padding(.bottom)
#endif
}
}
}