From d09ffe1973f65092134062f03db247726128f239 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Mon, 14 Apr 2025 19:08:09 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=9C=EC=A0=95=ED=8C=90=20=EC=BD=98?= =?UTF-8?q?=ED=85=90=EC=B8=A0=20=EC=83=81=EC=84=B8=20-=20=ED=95=B4?= =?UTF-8?q?=EB=8B=B9=20=EC=BD=98=ED=85=90=EC=B8=A0=EB=A5=BC=20=EC=97=85?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=ED=95=9C=20=ED=81=AC=EB=A6=AC=EC=97=90?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=EA=B0=80=20=EC=BD=98=ED=85=90=EC=B8=A0=20?= =?UTF-8?q?=EA=B5=AC=EB=A7=A4=EC=9E=90=EB=A5=BC=20=EB=B3=BC=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EB=8A=94=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContentDetailInfoLimitedEditionView.swift | 136 ++++++++++++------ .../Detail/ContentDetailInfoView.swift | 3 +- .../GetAudioContentDetailResponse.swift | 6 + 3 files changed, 98 insertions(+), 47 deletions(-) diff --git a/SodaLive/Sources/Content/Detail/ContentDetailInfoLimitedEditionView.swift b/SodaLive/Sources/Content/Detail/ContentDetailInfoLimitedEditionView.swift index a01ce27..9c07b34 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailInfoLimitedEditionView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailInfoLimitedEditionView.swift @@ -6,64 +6,96 @@ // import SwiftUI +import Kingfisher struct ContentDetailInfoLimitedEditionView: View { let totalContentCount: Int let remainingContentCount: Int let orderSequence: Int? + let buyerList: [ContentBuyer] var body: some View { - HStack(spacing: 0) { - Text("한정판") - .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(Color.button) - - Spacer() - - if let orderSequence = orderSequence { - Text("\(orderSequence)") - .font(.custom(Font.bold.rawValue, size: 13.3)) - .foregroundColor(Color.button) - .padding(.leading, 5.3) - - Text("/") - .font(.custom(Font.bold.rawValue, size: 13.3)) - .foregroundColor(Color.grayd2) - .padding(.leading, 2.3) - - Text("\(totalContentCount)") + VStack(alignment: .leading, spacing: 13.3) { + HStack(spacing: 0) { + Text("한정판") .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(Color.grayd2) - .padding(.leading, 2.3) - } else if (remainingContentCount <= 0) { - Text("Sold Out") - .font(.custom(Font.medium.rawValue, size: 12)) - .foregroundColor(Color.grayd2) - .padding(.horizontal, 5.3) - .padding(.vertical, 3.3) - .overlay( - RoundedRectangle(cornerRadius: 2.6) - .stroke(lineWidth: 1) - .foregroundColor(Color.grayd2) - ) - } else { - Text("잔여수량") - .font(.custom(Font.medium.rawValue, size: 13.3)) - .foregroundColor(Color.grayd2) - - Text("\(remainingContentCount)") - .font(.custom(Font.bold.rawValue, size: 13.3)) .foregroundColor(Color.button) - .padding(.leading, 5.3) + + Spacer() + + if let orderSequence = orderSequence { + Text("\(orderSequence)") + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(Color.button) + .padding(.leading, 5.3) + + Text("/") + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(Color.grayd2) + .padding(.leading, 2.3) + + Text("\(totalContentCount)") + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.grayd2) + .padding(.leading, 2.3) + } else if (remainingContentCount <= 0) { + Text("Sold Out") + .font(.custom(Font.medium.rawValue, size: 12)) + .foregroundColor(Color.grayd2) + .padding(.horizontal, 5.3) + .padding(.vertical, 3.3) + .overlay( + RoundedRectangle(cornerRadius: 2.6) + .stroke(lineWidth: 1) + .foregroundColor(Color.grayd2) + ) + } else { + Text("잔여수량") + .font(.custom(Font.medium.rawValue, size: 13.3)) + .foregroundColor(Color.grayd2) + + Text("\(remainingContentCount)") + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(Color.button) + .padding(.leading, 5.3) + } + } + .padding(.vertical, 8) + .padding(.horizontal, 10.3) + .background(Color(hex: "14262d")) + .cornerRadius(5.3) + .padding(.top, 13.3) + if !buyerList.isEmpty { + Text("구매자") + .font(.custom(Font.bold.rawValue, size: 18.3)) + .foregroundColor(Color.grayee) + + ScrollView(.horizontal, showsIndicators: false) { + HStack(alignment: .top, spacing: 13.3) { + ForEach(0..