From e77a068a8e997d9896e73c25c97b4b9ae42a4314 Mon Sep 17 00:00:00 2001 From: Yu Sung <hwchon1234@gmail.com> Date: Tue, 2 Apr 2024 14:49:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=A4=ED=94=88=20=EC=98=88=EC=A0=95=20?= =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EC=83=81=EC=84=B8=20-=20?= =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=B0=BD,=20=EC=A2=8B=EC=95=84=EC=9A=94,?= =?UTF-8?q?=20=EA=B3=B5=EC=9C=A0,=20=ED=9B=84=EC=9B=90=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=88=A8=EA=B9=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Detail/ContentDetailInfoView.swift | 94 ++++++++++--------- .../Content/Detail/ContentDetailView.swift | 2 +- 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift b/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift index ca3e6e0..66d8956 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift @@ -67,7 +67,7 @@ struct ContentDetailInfoView: View { .foregroundColor( orderType == .KEEP ? Color(hex: "b1ef2c") : - Color(hex: "9970ff") + Color.button ) .padding(.horizontal, 5.3) .padding(.vertical, 3.3) @@ -82,7 +82,7 @@ struct ContentDetailInfoView: View { Text(audioContent.title) .font(.custom(Font.bold.rawValue, size: 16.7)) - .foregroundColor(Color(hex: "d2d2d2")) + .foregroundColor(Color.grayd2) .lineSpacing(5) .multilineTextAlignment(.leading) .fixedSize(horizontal: false, vertical: true) @@ -90,57 +90,59 @@ struct ContentDetailInfoView: View { } .padding(.top, 13.3) - ScrollView(.horizontal, showsIndicators: false) { - HStack(spacing: 8) { - HStack(spacing: 4) { - Image( - audioContent.isLike ? - "ic_audio_content_heart_pressed" : - "ic_audio_content_heart_normal" - ) - - Text("\(audioContent.likeCount)") - .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(Color(hex: "d2d2d2")) - } - .padding(.horizontal, 13.3) - .padding(.vertical, 5.3) - .background(Color(hex: "ffffff").opacity(0.1)) - .cornerRadius(26.7) - .onTapGesture { onClickLike() } - - HStack(spacing: 4) { - Image("ic_audio_content_share") - - Text("공유") - .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(Color(hex: "d2d2d2")) - } - .padding(.horizontal, 13.3) - .padding(.vertical, 5.3) - .background(Color(hex: "ffffff").opacity(0.1)) - .cornerRadius(26.7) - .onTapGesture { onClickShare() } - - if audioContent.isCommentAvailable { + if !audioContent.contentUrl.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty && audioContent.releaseDate == nil { + ScrollView(.horizontal, showsIndicators: false) { + HStack(spacing: 8) { HStack(spacing: 4) { - Image("ic_donation_white") - .resizable() - .frame(width: 13.3, height: 13.3) + Image( + audioContent.isLike ? + "ic_audio_content_heart_pressed" : + "ic_audio_content_heart_normal" + ) - Text("후원") + Text("\(audioContent.likeCount)") .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(Color(hex: "d2d2d2")) + .foregroundColor(Color.grayd2) } .padding(.horizontal, 13.3) .padding(.vertical, 5.3) .background(Color(hex: "ffffff").opacity(0.1)) .cornerRadius(26.7) - .onTapGesture { onClickDonation() } + .onTapGesture { onClickLike() } + + HStack(spacing: 4) { + Image("ic_audio_content_share") + + Text("공유") + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.grayd2) + } + .padding(.horizontal, 13.3) + .padding(.vertical, 5.3) + .background(Color(hex: "ffffff").opacity(0.1)) + .cornerRadius(26.7) + .onTapGesture { onClickShare() } + + if audioContent.isCommentAvailable { + HStack(spacing: 4) { + Image("ic_donation_white") + .resizable() + .frame(width: 13.3, height: 13.3) + + Text("후원") + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.grayd2) + } + .padding(.horizontal, 13.3) + .padding(.vertical, 5.3) + .background(Color(hex: "ffffff").opacity(0.1)) + .cornerRadius(26.7) + .onTapGesture { onClickDonation() } + } } } + .padding(.top, 13.3) } - .padding(.top, 13.3) if let totalContentCount = audioContent.totalContentCount, let remainingContentCount = audioContent.remainingContentCount { ContentDetailInfoLimitedEditionView( @@ -155,13 +157,13 @@ struct ContentDetailInfoView: View { if audioContent.tag.count > 0 { Text(audioContent.tag) .font(.custom(Font.medium.rawValue, size: 12)) - .foregroundColor(Color(hex: "9970ff")) + .foregroundColor(Color.button) .frame(maxWidth: .infinity, alignment: .leading) } Text(audioContent.detail) .font(.custom(Font.medium.rawValue, size: 12)) - .foregroundColor(Color(hex: "777777")) + .foregroundColor(Color.gray77) .lineLimit(isExpandDescription ? nil : 3) .lineSpacing(5) .frame(maxWidth: .infinity, alignment: .leading) @@ -173,7 +175,7 @@ struct ContentDetailInfoView: View { HStack(spacing: 0) { Text("미리듣기 중입니다.\n콘텐츠 구매 후 전체를 감상해 보세요.") .font(.custom(Font.medium.rawValue, size: 12)) - .foregroundColor(Color(hex: "bbbbbb")) + .foregroundColor(Color.graybb) .lineSpacing(5) Spacer() @@ -187,7 +189,7 @@ struct ContentDetailInfoView: View { .overlay( RoundedRectangle(cornerRadius: 5.3) .stroke(lineWidth: 1) - .foregroundColor(Color(hex: "9970ff")) + .foregroundColor(Color.button) ) } } diff --git a/SodaLive/Sources/Content/Detail/ContentDetailView.swift b/SodaLive/Sources/Content/Detail/ContentDetailView.swift index 4a19e0f..0224433 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailView.swift @@ -132,7 +132,7 @@ struct ContentDetailView: View { } } - if audioContent.isCommentAvailable { + if audioContent.isCommentAvailable && !audioContent.contentUrl.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty && audioContent.releaseDate == nil { ContentDetailCommentView( commentCount: audioContent.commentCount, commentList: audioContent.commentList,