New builds for iOS 1.0.3 and Android 1.5.1

This commit is contained in:
2025-09-27 18:47:09 -06:00
parent 346f1a438e
commit cf2e2f7c57
22 changed files with 1272 additions and 1035 deletions

View File

@@ -635,12 +635,6 @@ struct ProblemExpandedView: View {
.foregroundColor(.secondary)
}
if let setter = problem.setter, !setter.isEmpty {
Label(setter, systemImage: "person")
.font(.subheadline)
.foregroundColor(.secondary)
}
if let description = problem.description, !description.isEmpty {
Text(description)
.font(.body)

View File

@@ -13,7 +13,6 @@ struct AddEditProblemView: View {
@State private var selectedClimbType: ClimbType = .boulder
@State private var selectedDifficultySystem: DifficultySystem = .vScale
@State private var difficultyGrade = ""
@State private var setter = ""
@State private var location = ""
@State private var tags = ""
@State private var notes = ""
@@ -63,7 +62,7 @@ struct AddEditProblemView: View {
PhotosSection()
ClimbTypeSection()
DifficultySection()
LocationAndSetterSection()
LocationSection()
TagsSection()
AdditionalInfoSection()
}
@@ -158,7 +157,6 @@ struct AddEditProblemView: View {
)
}
TextField("Route Setter (Optional)", text: $setter)
}
}
@@ -281,7 +279,7 @@ struct AddEditProblemView: View {
}
@ViewBuilder
private func LocationAndSetterSection() -> some View {
private func LocationSection() -> some View {
Section("Location & Details") {
TextField(
"Location (Optional)", text: $location, prompt: Text("e.g., 'Cave area', 'Wall 3'"))
@@ -334,25 +332,28 @@ struct AddEditProblemView: View {
HStack(spacing: 12) {
ForEach(imageData.indices, id: \.self) { index in
if let uiImage = UIImage(data: imageData[index]) {
Image(uiImage: uiImage)
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 80, height: 80)
.clipped()
.cornerRadius(8)
.overlay(alignment: .topTrailing) {
Button(action: {
imageData.remove(at: index)
if index < imagePaths.count {
imagePaths.remove(at: index)
}
}) {
Image(systemName: "xmark.circle.fill")
.foregroundColor(.red)
.background(Circle().fill(.white))
ZStack(alignment: .topTrailing) {
Image(uiImage: uiImage)
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 80, height: 80)
.clipped()
.cornerRadius(8)
Button(action: {
imageData.remove(at: index)
if index < imagePaths.count {
imagePaths.remove(at: index)
}
.offset(x: 8, y: -8)
}) {
Image(systemName: "xmark.circle.fill")
.foregroundColor(.red)
.background(Circle().fill(.white))
.font(.system(size: 18))
}
.offset(x: 4, y: -4)
}
.frame(width: 88, height: 88) // Extra space for button
} else {
RoundedRectangle(cornerRadius: 8)
.fill(.gray.opacity(0.3))
@@ -365,6 +366,7 @@ struct AddEditProblemView: View {
}
}
.padding(.horizontal, 1)
.padding(.vertical, 8)
}
}
}
@@ -410,7 +412,7 @@ struct AddEditProblemView: View {
selectedClimbType = problem.climbType
selectedDifficultySystem = problem.difficulty.system
difficultyGrade = problem.difficulty.grade
setter = problem.setter ?? ""
location = problem.location ?? ""
tags = problem.tags.joined(separator: ", ")
notes = problem.notes ?? ""
@@ -420,7 +422,7 @@ struct AddEditProblemView: View {
// Load image data for preview
imageData = []
for imagePath in problem.imagePaths {
if let data = try? Data(contentsOf: URL(fileURLWithPath: imagePath)) {
if let data = ImageManager.shared.loadImageData(fromPath: imagePath) {
imageData.append(data)
}
}
@@ -479,7 +481,7 @@ struct AddEditProblemView: View {
let trimmedName = name.trimmingCharacters(in: .whitespacesAndNewlines)
let trimmedDescription = description.trimmingCharacters(in: .whitespacesAndNewlines)
let trimmedSetter = setter.trimmingCharacters(in: .whitespacesAndNewlines)
let trimmedLocation = location.trimmingCharacters(in: .whitespacesAndNewlines)
let trimmedNotes = notes.trimmingCharacters(in: .whitespacesAndNewlines)
let trimmedTags = tags.split(separator: ",").map {
@@ -494,7 +496,7 @@ struct AddEditProblemView: View {
description: trimmedDescription.isEmpty ? nil : trimmedDescription,
climbType: selectedClimbType,
difficulty: difficulty,
setter: trimmedSetter.isEmpty ? nil : trimmedSetter,
tags: trimmedTags,
location: trimmedLocation.isEmpty ? nil : trimmedLocation,
imagePaths: imagePaths,
@@ -510,7 +512,7 @@ struct AddEditProblemView: View {
description: trimmedDescription.isEmpty ? nil : trimmedDescription,
climbType: selectedClimbType,
difficulty: difficulty,
setter: trimmedSetter.isEmpty ? nil : trimmedSetter,
tags: trimmedTags,
location: trimmedLocation.isEmpty ? nil : trimmedLocation,
imagePaths: imagePaths,