parent
4d73136740
commit
578b9b9089
|
@ -36,6 +36,17 @@ struct ContentDetailInfoLimitedEditionView: View {
|
|||
.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))
|
||||
|
@ -59,7 +70,7 @@ struct ContentDetailInfoLimitedEditionView: View {
|
|||
#Preview {
|
||||
ContentDetailInfoLimitedEditionView(
|
||||
totalContentCount: 10,
|
||||
remainingContentCount: 3,
|
||||
orderSequence: 5
|
||||
remainingContentCount: 0,
|
||||
orderSequence: nil
|
||||
)
|
||||
}
|
||||
|
|
|
@ -35,7 +35,17 @@ struct ContentDetailPlayView: View {
|
|||
)
|
||||
.cornerRadius(10.7, corners: [.topLeft, .topRight])
|
||||
|
||||
if audioContent.releaseDate == nil && !isAlertPreview || (isAlertPreview && audioContent.isActivePreview) {
|
||||
if let _ = audioContent.totalContentCount, let remainingContentCount = audioContent.remainingContentCount, remainingContentCount <= 0, audioContent.creator.creatorId != UserDefaults.int(forKey: .userId), !isShowPreviewAlert {
|
||||
Text("Sold Out")
|
||||
.font(.custom(Font.bold.rawValue, size: 36.7))
|
||||
.foregroundColor(.white)
|
||||
.frame(
|
||||
width: screenSize().width - 26.7,
|
||||
height: screenSize().width - 26.7,
|
||||
alignment: .center
|
||||
)
|
||||
.background(Color.black.opacity(0.6))
|
||||
} else if audioContent.releaseDate == nil && !isAlertPreview || (audioContent.isActivePreview && !audioContent.contentUrl.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) {
|
||||
Image(isPlaying() ? "btn_audio_content_pause" : isAlertPreview ? "btn_audio_content_preview_play" : "btn_audio_content_play")
|
||||
.onTapGesture {
|
||||
if isPlaying() {
|
||||
|
@ -56,7 +66,7 @@ struct ContentDetailPlayView: View {
|
|||
isShowPreviewAlert = true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if audioContent.releaseDate == nil {
|
||||
Text("해당 콘텐츠는 크리에이터의 요청으로\n미리듣기를 제공하지 않습니다.")
|
||||
.font(.custom(Font.medium.rawValue, size: 16.7))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
|
Loading…
Reference in New Issue