From cdaecdd3a8f1ef64facddd49c5bb8add86833a90 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 26 Nov 2023 11:17:36 -0800 Subject: [PATCH] Delete unused page --- Meshtastic.xcodeproj/project.pbxproj | 4 - Meshtastic/Views/Settings/Routes.swift | 6 +- Meshtastic/Views/Settings/Settings2.swift | 171 ---------------------- 3 files changed, 3 insertions(+), 178 deletions(-) delete mode 100644 Meshtastic/Views/Settings/Settings2.swift diff --git a/Meshtastic.xcodeproj/project.pbxproj b/Meshtastic.xcodeproj/project.pbxproj index cbf12dd5..b01e0ee0 100644 --- a/Meshtastic.xcodeproj/project.pbxproj +++ b/Meshtastic.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ DD1933762B0835D500771CD5 /* PositionAltitudeChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD1933752B0835D500771CD5 /* PositionAltitudeChart.swift */; }; DD1933782B084F4200771CD5 /* Measurement.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD1933772B084F4200771CD5 /* Measurement.swift */; }; DD1BF2F92776FE2E008C8D2F /* UserMessageList.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD1BF2F82776FE2E008C8D2F /* UserMessageList.swift */; }; - DD21007F2B0E571300F2F116 /* Settings2.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD21007E2B0E571300F2F116 /* Settings2.swift */; }; DD2160AF28C5552500C17253 /* MQTTConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2160AE28C5552500C17253 /* MQTTConfig.swift */; }; DD23A50F26FD1B4400D9B90C /* PeripheralModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD23A50E26FD1B4400D9B90C /* PeripheralModel.swift */; }; DD2553572855B02500E55709 /* LoRaConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2553562855B02500E55709 /* LoRaConfig.swift */; }; @@ -232,7 +231,6 @@ DD1933752B0835D500771CD5 /* PositionAltitudeChart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionAltitudeChart.swift; sourceTree = ""; }; DD1933772B084F4200771CD5 /* Measurement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Measurement.swift; sourceTree = ""; }; DD1BF2F82776FE2E008C8D2F /* UserMessageList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserMessageList.swift; sourceTree = ""; }; - DD21007E2B0E571300F2F116 /* Settings2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Settings2.swift; sourceTree = ""; }; DD2160AE28C5552500C17253 /* MQTTConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MQTTConfig.swift; sourceTree = ""; }; DD23A50E26FD1B4400D9B90C /* PeripheralModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeripheralModel.swift; sourceTree = ""; }; DD2553562855B02500E55709 /* LoRaConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoRaConfig.swift; sourceTree = ""; }; @@ -536,7 +534,6 @@ DD8169FA271F1F3A00F4AB02 /* MeshLog.swift */, DD86D40B287F401000BAEB7A /* SaveChannelQRCode.swift */, DD3501882852FC3B000FC853 /* Settings.swift */, - DD21007E2B0E571300F2F116 /* Settings2.swift */, DD3CC6B428E33FD100FA9159 /* ShareChannels.swift */, DDCE4E2B2869F92900BE9F8F /* UserConfig.swift */, DD61937A2863876A00E59241 /* Config */, @@ -1110,7 +1107,6 @@ DD457188293C7E63000C49FB /* BLESignalStrengthIndicator.swift in Sources */, DDFEB3BB29900C1200EE7472 /* CurrentConditionsCompact.swift in Sources */, DD836AE726F6B38600ABCC23 /* Connect.swift in Sources */, - DD21007F2B0E571300F2F116 /* Settings2.swift in Sources */, DD5E523F298F5A9E00D21B61 /* AirQualityIndexCompact.swift in Sources */, DD964FBF296E76EF007C176F /* WaypointFormMapKit.swift in Sources */, DD3501892852FC3B000FC853 /* Settings.swift in Sources */, diff --git a/Meshtastic/Views/Settings/Routes.swift b/Meshtastic/Views/Settings/Routes.swift index 11b2e723..1c3d52c7 100644 --- a/Meshtastic/Views/Settings/Routes.swift +++ b/Meshtastic/Views/Settings/Routes.swift @@ -23,8 +23,8 @@ struct Routes: View { var routes: FetchedResults var body: some View { - NavigationSplitView(columnVisibility: $columnVisibility) { - //VStack { + //NavigationSplitView(columnVisibility: $columnVisibility) { + NavigationStack { Button("Import Route") { importing = true } @@ -152,7 +152,7 @@ struct Routes: View { .listStyle(.plain) } .navigationTitle("Route List") - } detail: { +// } detail: { VStack { if selectedRoute != nil { diff --git a/Meshtastic/Views/Settings/Settings2.swift b/Meshtastic/Views/Settings/Settings2.swift deleted file mode 100644 index 22fcb6c5..00000000 --- a/Meshtastic/Views/Settings/Settings2.swift +++ /dev/null @@ -1,171 +0,0 @@ -// -// Settings.swift -// MeshtasticApple -// -// Copyright (c) Garth Vander Houwen 6/9/22. -// - -import SwiftUI - -enum SettingsSidebar: CaseIterable { - case about - case appSettings - case routes - case radioConfig - case moduleConfig - case meshLog - case adminMessageLog - var name: String { - switch self { - case .about: - return "about.meshtastic".localized - case .appSettings: - return "app.settings".localized - case .routes: - return "routes".localized - case .radioConfig: - return "radio.configuration".localized - case .moduleConfig: - return "module.configuration".localized - case .meshLog: - return "mesh.log".localized - case .adminMessageLog: - return "admin.log".localized - } - } - var icon: String { - switch self { - case .about: - return "questionmark.app" - case .appSettings: - return "gearshape".localized - case .routes: - return "routes".localized - case .radioConfig: - return "flipphone".localized - case .moduleConfig: - return "module.configuration".localized - case .meshLog: - return "mesh.log".localized - case .adminMessageLog: - return "admin.log".localized - } - } -} -extension SettingsSidebar: Identifiable { - var id: Self { self } -} - -@available(iOS 17.0, macOS 14.0, *) -struct Settings2: View { - @State private var compactColumn = NavigationSplitViewColumn.detail - @State private var columnVisibility = NavigationSplitViewVisibility.automatic - @Environment(\.managedObjectContext) var context - @EnvironmentObject var bleManager: BLEManager - @FetchRequest(sortDescriptors: [NSSortDescriptor(key: "user.longName", ascending: true)], animation: .default) - private var nodes: FetchedResults - @State private var selectedNode: Int = 0 - @State private var preferredNodeNum: Int = 0 - @State private var selection: SettingsSidebar = .about - - enum SettingsContent { - case appSettings - case routes - case shareChannels - case userConfig - case loraConfig - case channelConfig - case bluetoothConfig - case deviceConfig - case displayConfig - case networkConfig - case positionConfig - case cannedMessagesConfig - case detectionSensorConfig - case externalNotificationConfig - case mqttConfig - case rangeTestConfig - case ringtoneConfig - case serialConfig - case telemetryConfig - case meshLog - case adminMessageLog - case about - } - var body: some View { - NavigationSplitView(columnVisibility: $columnVisibility, preferredCompactColumn: $compactColumn) { - - List(SettingsSidebar.allCases) { item in - switch(item) { - case .about: - NavigationLink { AboutMeshtastic() } label: { - Image(systemName: item.icon) - .symbolRenderingMode(.hierarchical) - Text(item.name.localized) - } - .tag(item) - case .appSettings: - NavigationLink { AppSettings() } label: { - Image(systemName: item.icon) - .symbolRenderingMode(.hierarchical) - Text(item.name.localized) - } - .tag(item) - case .routes: - NavigationLink { Routes() } label: { - Image(systemName: item.icon) - .symbolRenderingMode(.hierarchical) - Text(item.name.localized) - } - .tag(item) - case .radioConfig: - NavigationLink { Routes() } label: { - Image(systemName: item.icon) - .symbolRenderingMode(.hierarchical) - Text(item.name.localized) - } - .tag(item) - case .moduleConfig: - NavigationLink { Routes() } label: { - Image(systemName: item.icon) - .symbolRenderingMode(.hierarchical) - Text(item.name.localized) - } - .tag(item) - case .meshLog: - NavigationLink { MeshLog() } label: { - Image(systemName: item.icon) - .symbolRenderingMode(.hierarchical) - Text(item.name.localized) - } - .tag(item) - case .adminMessageLog: - NavigationLink { AdminMessageList() } label: { - Image(systemName: item.icon) - .symbolRenderingMode(.hierarchical) - Text(item.name.localized) - } - .tag(item) - } - } - .listStyle(GroupedListStyle()) - .navigationTitle("settings") - .navigationBarItems(leading: MeshtasticLogo()) - } content: { - List { - if selection == .routes { - Text("Routes Bitechs") - } - } - } - detail: { - Text("Detail") - ContentUnavailableView("select.menu.item", systemImage: "gear") - } - .onChange(of: selection) { value in - columnVisibility = .doubleColumn - compactColumn = .sidebar - - } - } -}