From 0e65ef68b2112c73f9d2aaed56fe73cf6b1e0107 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Mon, 28 Jul 2025 09:33:04 -0700 Subject: [PATCH] Additional map form consistancy cleanup --- Localizable.xcstrings | 37 ------------------- Meshtastic.xcodeproj/project.pbxproj | 2 +- Meshtastic/Helpers/MapDataManager.swift | 7 ---- .../Helpers/Map}/MapDataFiles.swift | 15 +++----- 4 files changed, 6 insertions(+), 55 deletions(-) rename Meshtastic/Views/{Settings => Nodes/Helpers/Map}/MapDataFiles.swift (96%) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 900baa6e..8e9cbd89 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -1391,40 +1391,6 @@ } } }, - "%lld overlays" : { - "localizations" : { - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld sovrapposizioni" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lldオーバーレイ" - } - }, - "sr" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld slojeva" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld覆盖层" - } - }, - "zh-Hant-TW" : { - "stringUnit" : { - "state" : "translated", - "value" : "%lld覆蓋層" - } - } - } - }, "%lld Readings Total" : { "localizations" : { "it" : { @@ -1589,9 +1555,6 @@ } } }, - "•" : { - "shouldTranslate" : false - }, "• %@" : { "shouldTranslate" : false }, diff --git a/Meshtastic.xcodeproj/project.pbxproj b/Meshtastic.xcodeproj/project.pbxproj index 943cbcb2..c8de260d 100644 --- a/Meshtastic.xcodeproj/project.pbxproj +++ b/Meshtastic.xcodeproj/project.pbxproj @@ -807,7 +807,6 @@ DDD6EEAE29BC024700383354 /* Firmware.swift */, DD33DB612B3D27C7003E1EA0 /* FirmwareApi.swift */, DD1B8F3F2B35E2F10022AABC /* GPSStatus.swift */, - 3D3417D32E2DC293006A988B /* MapDataFiles.swift */, DDAB580C2B0DAA9E00147258 /* Routes.swift */, DDE9659B2B1C3B6A00531070 /* RouteRecorder.swift */, DD86D40B287F401000BAEB7A /* SaveChannelQRCode.swift */, @@ -961,6 +960,7 @@ isa = PBXGroup; children = ( DDDC22362BA9232C002C44F1 /* MapContent */, + 3D3417D32E2DC293006A988B /* MapDataFiles.swift */, DD94B73F2ACCE3BE00DCD1D1 /* MapSettingsForm.swift */, DDB6CCFA2AAF805100945AF6 /* NodeMapSwiftUI.swift */, DD13AA482AB73BF400BA0C98 /* PositionPopover.swift */, diff --git a/Meshtastic/Helpers/MapDataManager.swift b/Meshtastic/Helpers/MapDataManager.swift index 42fec2e0..8b03fb6a 100644 --- a/Meshtastic/Helpers/MapDataManager.swift +++ b/Meshtastic/Helpers/MapDataManager.swift @@ -415,13 +415,6 @@ struct MapDataMetadata: Codable, Identifiable { formatter.countStyle = .file return formatter.string(fromByteCount: fileSize) } - - var uploadDateString: String { - let formatter = DateFormatter() - formatter.dateStyle = .medium - formatter.timeStyle = .short - return formatter.string(from: uploadDate) - } } /// Errors that can occur during map data operations diff --git a/Meshtastic/Views/Settings/MapDataFiles.swift b/Meshtastic/Views/Nodes/Helpers/Map/MapDataFiles.swift similarity index 96% rename from Meshtastic/Views/Settings/MapDataFiles.swift rename to Meshtastic/Views/Nodes/Helpers/Map/MapDataFiles.swift index 7c312bf0..be8f56fe 100644 --- a/Meshtastic/Views/Settings/MapDataFiles.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/MapDataFiles.swift @@ -179,6 +179,9 @@ struct MapDataFileRow: View { .lineLimit(1) Spacer() + Text(file.fileSizeString) + .font(.caption) + .foregroundColor(.secondary) Button(action: onDelete) { Image(systemName: "trash") .foregroundColor(.red) @@ -196,19 +199,11 @@ struct MapDataFileRow: View { .background(Color.secondary.opacity(0.2)) .cornerRadius(4) - Text(file.fileSizeString) - .font(.caption) - .foregroundColor(.secondary) - - Text("•") - .font(.caption) - .foregroundColor(.secondary) - - Text("\(file.overlayCount) overlays") + Text("\(file.overlayCount) \(file.overlayCount > 1 ? "features".localized : "feature".localized)") .font(.caption) .foregroundColor(.secondary) Spacer() - Text(file.uploadDateString) + Text(file.uploadDate.formatted()) .font(.caption) .foregroundColor(.secondary) }