Build 3 - Remove debug settings from dev

This commit is contained in:
2025-09-16 09:57:04 -06:00
parent f5dabd0ed0
commit 64e9d4dfe5
4 changed files with 2 additions and 152 deletions

View File

@@ -390,7 +390,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 4BC9Y2LL4B;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
@@ -430,7 +430,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 4BC9Y2LL4B;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;

View File

@@ -7,8 +7,6 @@ struct AnalyticsView: View {
NavigationView {
ScrollView {
LazyVStack(spacing: 20) {
HeaderSection()
OverallStatsSection()
ProgressChartSection()
@@ -26,22 +24,6 @@ struct AnalyticsView: View {
}
}
struct HeaderSection: View {
var body: some View {
HStack {
Image("MountainsIcon")
.resizable()
.frame(width: 32, height: 32)
Text("Analytics")
.font(.title)
.fontWeight(.bold)
Spacer()
}
}
}
struct OverallStatsSection: View {
@EnvironmentObject var dataManager: ClimbingDataManager

View File

@@ -16,10 +16,6 @@ struct SettingsView: View {
activeSheet: $activeSheet
)
LiveActivitySection()
ImageStorageSection()
AppInfoSection()
}
.navigationTitle("Settings")
@@ -127,96 +123,6 @@ struct DataManagementSection: View {
}
}
struct ImageStorageSection: View {
@EnvironmentObject var dataManager: ClimbingDataManager
@State private var showingStorageInfo = false
@State private var storageInfo = ""
@State private var showingRecoveryAlert = false
@State private var showingEmergencyAlert = false
var body: some View {
Section("Image Storage") {
// Storage Status
Button(action: {
storageInfo = dataManager.getImageRecoveryStatus()
showingStorageInfo = true
}) {
HStack {
Image(systemName: "info.circle")
.foregroundColor(.blue)
Text("Check Storage Health")
Spacer()
}
}
.foregroundColor(.primary)
// Manual Maintenance
Button(action: {
dataManager.manualImageMaintenance()
}) {
HStack {
Image(systemName: "wrench.and.screwdriver")
.foregroundColor(.orange)
Text("Run Maintenance")
Spacer()
}
}
.foregroundColor(.primary)
// Force Recovery
Button(action: {
showingRecoveryAlert = true
}) {
HStack {
Image(systemName: "arrow.clockwise")
.foregroundColor(.orange)
Text("Force Image Recovery")
Spacer()
}
}
.foregroundColor(.primary)
// Emergency Restore
Button(action: {
showingEmergencyAlert = true
}) {
HStack {
Image(systemName: "exclamationmark.triangle")
.foregroundColor(.red)
Text("Emergency Restore")
Spacer()
}
}
.foregroundColor(.red)
}
.alert("Storage Information", isPresented: $showingStorageInfo) {
Button("OK") {}
} message: {
Text(storageInfo)
}
.alert("Force Image Recovery", isPresented: $showingRecoveryAlert) {
Button("Cancel", role: .cancel) {}
Button("Force Recovery", role: .destructive) {
dataManager.forceImageRecovery()
}
} message: {
Text(
"This will attempt to recover missing images from backups and legacy locations. Use this if images are missing after app updates or debug sessions."
)
}
.alert("Emergency Restore", isPresented: $showingEmergencyAlert) {
Button("Cancel", role: .cancel) {}
Button("Emergency Restore", role: .destructive) {
dataManager.emergencyImageRestore()
}
} message: {
Text(
"This will restore all images from the backup directory, potentially overwriting current images. Only use this if normal recovery fails."
)
}
}
}
struct AppInfoSection: View {
private var appVersion: String {
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown"
@@ -509,44 +415,6 @@ struct ImportDataView: View {
}
}
struct LiveActivitySection: View {
@EnvironmentObject var dataManager: ClimbingDataManager
@State private var showingDebugView = false
var body: some View {
Section("Live Activities") {
NavigationLink(destination: LiveActivityDebugView()) {
HStack {
Image(systemName: "bell.badge")
.foregroundColor(.purple)
Text("Debug Live Activities")
Spacer()
}
}
.foregroundColor(.primary)
Button(action: {
dataManager.testLiveActivity()
}) {
HStack {
Image(systemName: "play.circle")
.foregroundColor(.blue)
Text("Quick Test")
Spacer()
}
}
.foregroundColor(.primary)
.disabled(dataManager.gyms.isEmpty)
if dataManager.gyms.isEmpty {
Text("Add a gym first to test Live Activities")
.font(.caption)
.foregroundColor(.secondary)
}
}
}
}
#Preview {
SettingsView()
.environmentObject(ClimbingDataManager.preview)