Add additional map types to the map picker

This commit is contained in:
Garth Vander Houwen 2023-01-13 07:48:03 -08:00
parent e4434c8605
commit a751bd1071
2 changed files with 8 additions and 6 deletions

View file

@ -2,7 +2,7 @@
// WaypointFormView.swift
// Meshtastic
//
// Created by Garth Vander Houwen on 1/10/23.
// Copyright Garth Vander Houwen 1/10/23.
//
import SwiftUI
@ -40,7 +40,8 @@ struct WaypointFormView: View {
Spacer()
TextField(
"Name",
text: $name
text: $name,
axis: .vertical
)
.foregroundColor(Color.gray)
.onChange(of: name, perform: { value in

View file

@ -45,10 +45,14 @@ struct NodeDetail: View {
Picker("", selection: $mapType) {
Text("Standard").tag(MKMapType.standard)
Text("Muted").tag(MKMapType.mutedStandard)
Text("Hybrid").tag(MKMapType.hybrid)
Text("Hybrid Flyover").tag(MKMapType.hybridFlyover)
Text("Satellite").tag(MKMapType.satellite)
Text("Sat Flyover").tag(MKMapType.satelliteFlyover)
}
.pickerStyle(SegmentedPickerStyle())
.padding(.bottom, 30)
}
}
.ignoresSafeArea(.all, edges: [.top, .leading, .trailing])
@ -341,7 +345,6 @@ struct NodeDetail: View {
Button(action: {
showingRebootConfirm = true
}) {
Label("reboot", systemImage: "arrow.triangle.2.circlepath")
}
.buttonStyle(.bordered)
@ -349,11 +352,9 @@ struct NodeDetail: View {
.controlSize(.large)
.padding()
.confirmationDialog("are.you.sure",
isPresented: $showingRebootConfirm
isPresented: $showingRebootConfirm
) {
Button("reboot.node", role: .destructive) {
if !bleManager.sendReboot(fromUser: node.user!, toUser: node.user!) {
print("Reboot Failed")
}