diff --git a/Projects/Feature/GoalDetail/Sources/Detail/GoalDetailReducer+Impl.swift b/Projects/Feature/GoalDetail/Sources/Detail/GoalDetailReducer+Impl.swift index e5698a78..4ee29d4d 100644 --- a/Projects/Feature/GoalDetail/Sources/Detail/GoalDetailReducer+Impl.swift +++ b/Projects/Feature/GoalDetail/Sources/Detail/GoalDetailReducer+Impl.swift @@ -244,7 +244,7 @@ extension GoalDetailReducer { state.isPresentedProofPhoto = false return .none - case let .proofPhoto(.delegate(.completedUploadPhoto(myPhotoLog, editedImageData: editedImageData))): + case let .proofPhoto(.delegate(.completedUploadPhoto(myPhotoLog, editedImageData))): state.isPresentedProofPhoto = false state.pendingEditedImageData = editedImageData var myPhotoLog = myPhotoLog diff --git a/Projects/Feature/ProofPhoto/Sources/ProofPhotoReducer+Impl.swift b/Projects/Feature/ProofPhoto/Sources/ProofPhotoReducer+Impl.swift index ebc50b71..e4ac9798 100644 --- a/Projects/Feature/ProofPhoto/Sources/ProofPhotoReducer+Impl.swift +++ b/Projects/Feature/ProofPhoto/Sources/ProofPhotoReducer+Impl.swift @@ -156,7 +156,7 @@ extension ProofPhotoReducer { .delegate( .completedUploadPhoto( myPhotoLog: myPhotoLog, - editedImageData: nil + editedImageData: imageData ) ) ) diff --git a/Projects/Feature/ProofPhoto/Sources/ProofPhotoView.swift b/Projects/Feature/ProofPhoto/Sources/ProofPhotoView.swift index 523d6dad..bd9f9d39 100644 --- a/Projects/Feature/ProofPhoto/Sources/ProofPhotoView.swift +++ b/Projects/Feature/ProofPhoto/Sources/ProofPhotoView.swift @@ -86,6 +86,7 @@ private extension ProofPhotoView { var mainContent: some View { VStack(spacing: 0) { topBar + .padding(.trailing, 10) titleText .padding(.top, 25) photoPreview @@ -110,7 +111,9 @@ private extension ProofPhotoView { store.send(.closeButtonTapped) } label: { Image.Icon.Symbol.closeM + .resizable() .renderingMode(.template) + .frame(width: 24, height: 24) .foregroundStyle(Color.Gray.gray100) .frame(width: 44, height: 44) } @@ -179,14 +182,11 @@ private extension ProofPhotoView { @ViewBuilder var bottomControls: some View { - Group { - if store.hasImage { - uploadControls - } else { - captureControls - } + if store.hasImage { + uploadControls + } else { + captureControls } - .frame(height: 74) } var captureControls: some View { @@ -223,6 +223,7 @@ private extension ProofPhotoView { .frame(width: 50) } .frame(maxWidth: .infinity) + .frame(height: 74) } var galleryButton: some View { @@ -258,6 +259,7 @@ private extension ProofPhotoView { .frame(width: 84, height: 84) ) } + .frame(width: 84, height: 84) .disabled(store.isCapturing) } @@ -278,7 +280,7 @@ private extension ProofPhotoView { func previewContainer( @ViewBuilder content: @escaping () -> some View ) -> some View { - let shape = RoundedRectangle(cornerRadius: 76) + let shape = RoundedRectangle(cornerRadius: 76, style: .continuous) return Color.clear .frame(maxWidth: .infinity) @@ -314,7 +316,7 @@ private extension ProofPhotoView { } commentCircle } - .padding(.bottom, 26) + .padding(.bottom, 28) .frame(width: rectFrame.width, height: rectFrame.height, alignment: .bottom) .offset(x: posX, y: posY) .animation(.easeOut(duration: 0.25), value: keyboardInset) diff --git a/Projects/Shared/DesignSystem/Sources/Components/Button/ShadowButton/TXShadowButton.swift b/Projects/Shared/DesignSystem/Sources/Components/Button/ShadowButton/TXShadowButton.swift index 0ac9c9b3..a1398561 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/Button/ShadowButton/TXShadowButton.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/Button/ShadowButton/TXShadowButton.swift @@ -47,7 +47,7 @@ public struct TXShadowButton: View { var borderColor: Color = .clear let borderWidth: CGFloat = 1.6 let shadowHeight: CGFloat = 70 - let shadowTopPadding: CGFloat = 4 + let shadowTopPadding: CGFloat = 6 let frameHeight: CGFloat = 74 var buttonWidth: CGFloat? { diff --git a/Projects/Shared/DesignSystem/Sources/Components/TextField/TXCommentCircle.swift b/Projects/Shared/DesignSystem/Sources/Components/TextField/TXCommentCircle.swift index df1fa26b..c0f633e3 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/TextField/TXCommentCircle.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/TextField/TXCommentCircle.swift @@ -65,7 +65,7 @@ public struct TXCommentCircle: View { onFocused?(isFocused) externalFocus?.wrappedValue = isFocused } - .onChange(of: externalFocus?.wrappedValue) { newValue in + .onChange(of: externalFocus?.wrappedValue) { _, newValue in guard let newValue, newValue != isFocused else { return } isFocused = newValue } @@ -75,23 +75,15 @@ public struct TXCommentCircle: View { // MARK: - SubViews private extension TXCommentCircle { var borderCircles: some View { - HStack(spacing: Constants.circleSpacing) { - ForEach(0.. AnyShape { + let outer = mergedCircleShape(inset: 0) + let inner = mergedCircleShape(inset: lineWidth) + return AnyShape(outer.subtracting(inner)) + } + + func mergedCircleShape(inset: CGFloat) -> AnyShape { + let diameter = Constants.circleSize - (inset * 2) + let step = Constants.circleSize + Constants.circleSpacing + let baseCircle = AnyShape( + PositionedCircleShape( + posX: inset, + posY: inset, + diameter: diameter + ) + ) + + var merged = baseCircle + for index in 1.. Path { + Path(ellipseIn: CGRect(x: posX, y: posY, width: diameter, height: diameter)) + } +} + #Preview { @Previewable @State var text: String = "" TXCommentCircle( diff --git a/Projects/Shared/DesignSystem/Sources/Resources/Typography/View+Typography.swift b/Projects/Shared/DesignSystem/Sources/Resources/Typography/View+Typography.swift index 72380df7..61e05f37 100644 --- a/Projects/Shared/DesignSystem/Sources/Resources/Typography/View+Typography.swift +++ b/Projects/Shared/DesignSystem/Sources/Resources/Typography/View+Typography.swift @@ -16,6 +16,6 @@ public extension View { .padding(.vertical, token.lineSpacing / 2) .font(token.font.swiftUIFont(size: token.size)) .lineSpacing(token.lineSpacing) - .kerning(token.kerning) + .tracking(token.kerning) } }