diff --git a/ios/OpenClimb.xcodeproj/project.pbxproj b/ios/OpenClimb.xcodeproj/project.pbxproj index acccb42..530d3a3 100644 --- a/ios/OpenClimb.xcodeproj/project.pbxproj +++ b/ios/OpenClimb.xcodeproj/project.pbxproj @@ -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; diff --git a/ios/OpenClimb.xcodeproj/project.xcworkspace/xcuserdata/atridad.xcuserdatad/UserInterfaceState.xcuserstate b/ios/OpenClimb.xcodeproj/project.xcworkspace/xcuserdata/atridad.xcuserdatad/UserInterfaceState.xcuserstate index 7de8e00..430de34 100644 Binary files a/ios/OpenClimb.xcodeproj/project.xcworkspace/xcuserdata/atridad.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/OpenClimb.xcodeproj/project.xcworkspace/xcuserdata/atridad.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/OpenClimb/Views/AnalyticsView.swift b/ios/OpenClimb/Views/AnalyticsView.swift index 0264e2d..9f66790 100644 --- a/ios/OpenClimb/Views/AnalyticsView.swift +++ b/ios/OpenClimb/Views/AnalyticsView.swift @@ -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 diff --git a/ios/OpenClimb/Views/SettingsView.swift b/ios/OpenClimb/Views/SettingsView.swift index 5f882b8..be5a7ff 100644 --- a/ios/OpenClimb/Views/SettingsView.swift +++ b/ios/OpenClimb/Views/SettingsView.swift @@ -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)