diff --git a/SodaLive/Sources/Content/ContentListItemView.swift b/SodaLive/Sources/Content/ContentListItemView.swift index eb31765..3673e9c 100644 --- a/SodaLive/Sources/Content/ContentListItemView.swift +++ b/SodaLive/Sources/Content/ContentListItemView.swift @@ -26,6 +26,15 @@ struct ContentListItemView: View { VStack(alignment: .leading, spacing: 0) { HStack(spacing: 8) { + if item.isScheduledToOpen { + Text("오픈예정") + .font(.custom(Font.medium.rawValue, size: 8)) + .foregroundColor(Color(hex: "3bb9f1")) + .padding(2.6) + .background(Color(hex: "003851")) + .cornerRadius(2.6) + } + Text(item.themeStr) .font(.custom(Font.medium.rawValue, size: 8)) .foregroundColor(Color(hex: "3bac6a")) @@ -112,7 +121,8 @@ struct ContentListItemView_Previews: PreviewProvider { duration: "00:04:43", likeCount: 2, commentCount: 0, - isAdult: false + isAdult: false, + isScheduledToOpen: true ) ) } diff --git a/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift b/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift index d1e8347..bdc4af0 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailInfoView.swift @@ -21,6 +21,16 @@ struct ContentDetailInfoView: View { VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 8) { HStack(spacing: 5.3) { + if let _ = audioContent.releaseDate { + Text("오픈예정") + .font(.custom(Font.medium.rawValue, size: 12)) + .foregroundColor(Color(hex: "3bb9f1")) + .padding(.horizontal, 5.3) + .padding(.vertical, 3.3) + .background(Color(hex: "003851")) + .cornerRadius(2.6) + } + Text(audioContent.themeStr) .font(.custom(Font.medium.rawValue, size: 12)) .foregroundColor(Color(hex: "3bac6a")) diff --git a/SodaLive/Sources/Content/Detail/ContentDetailPlayView.swift b/SodaLive/Sources/Content/Detail/ContentDetailPlayView.swift index e98a257..05eb916 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailPlayView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailPlayView.swift @@ -35,26 +35,28 @@ struct ContentDetailPlayView: View { ) .cornerRadius(10.7, corners: [.topLeft, .topRight]) - Image(isPlaying() ? "btn_audio_content_pause" : isAlertPreview ? "btn_audio_content_preview_play" : "btn_audio_content_play") - .onTapGesture { - if isPlaying() { - contentPlayManager.pauseAudio() - } else { - contentPlayManager.startTimer = startTimer - contentPlayManager.stopTimer = stopTimer - - contentPlayManager.playAudio( - contentId: audioContent.contentId, - title: audioContent.title, - nickname: audioContent.creator.nickname, - coverImage: audioContent.coverImageUrl, - contentUrl: audioContent.contentUrl, - isFree: audioContent.price <= 0, - isPreview: !audioContent.existOrdered && audioContent.price > 0 - ) - isShowPreviewAlert = true + if audioContent.releaseDate == nil { + Image(isPlaying() ? "btn_audio_content_pause" : isAlertPreview ? "btn_audio_content_preview_play" : "btn_audio_content_play") + .onTapGesture { + if isPlaying() { + contentPlayManager.pauseAudio() + } else { + contentPlayManager.startTimer = startTimer + contentPlayManager.stopTimer = stopTimer + + contentPlayManager.playAudio( + contentId: audioContent.contentId, + title: audioContent.title, + nickname: audioContent.creator.nickname, + coverImage: audioContent.coverImageUrl, + contentUrl: audioContent.contentUrl, + isFree: audioContent.price <= 0, + isPreview: !audioContent.existOrdered && audioContent.price > 0 + ) + isShowPreviewAlert = true + } } - } + } VStack(alignment: .leading, spacing: 13.3) { Spacer() diff --git a/SodaLive/Sources/Content/Detail/ContentDetailView.swift b/SodaLive/Sources/Content/Detail/ContentDetailView.swift index ed274d8..0330de2 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailView.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailView.swift @@ -93,7 +93,17 @@ struct ContentDetailView: View { ) .padding(.horizontal, 13.3) - if audioContent.price > 0 && + if let releaseDate = audioContent.releaseDate { + Text(releaseDate) + .font(.custom(Font.bold.rawValue, size: 13.3)) + .foregroundColor(.white) + .frame(maxWidth: .infinity) + .frame(height: 48.7) + .background(Color(hex: "525252")) + .cornerRadius(5.3) + .padding(.top, 18.3) + .padding(.horizontal, 13.3) + } else if audioContent.price > 0 && !audioContent.existOrdered && audioContent.orderType == nil && audioContent.creator.creatorId != UserDefaults.int(forKey: .userId) { diff --git a/SodaLive/Sources/Content/Detail/GetAudioContentDetailResponse.swift b/SodaLive/Sources/Content/Detail/GetAudioContentDetailResponse.swift index 2681927..a0381b8 100644 --- a/SodaLive/Sources/Content/Detail/GetAudioContentDetailResponse.swift +++ b/SodaLive/Sources/Content/Detail/GetAudioContentDetailResponse.swift @@ -17,6 +17,7 @@ struct GetAudioContentDetailResponse: Decodable { let tag: String let price: Int let duration: String + let releaseDate: String? let isAdult: Bool let isMosaic: Bool let isOnlyRental: Bool diff --git a/SodaLive/Sources/Explorer/Profile/GetCreatorProfileResponse.swift b/SodaLive/Sources/Explorer/Profile/GetCreatorProfileResponse.swift index 920c212..530493e 100644 --- a/SodaLive/Sources/Explorer/Profile/GetCreatorProfileResponse.swift +++ b/SodaLive/Sources/Explorer/Profile/GetCreatorProfileResponse.swift @@ -78,6 +78,7 @@ struct GetAudioContentListItem: Decodable { let likeCount: Int let commentCount: Int let isAdult: Bool + let isScheduledToOpen: Bool } struct GetCreatorActivitySummary: Decodable { diff --git a/SodaLive/Sources/Explorer/Profile/UserProfileContentView.swift b/SodaLive/Sources/Explorer/Profile/UserProfileContentView.swift index dd05941..76f211d 100644 --- a/SodaLive/Sources/Explorer/Profile/UserProfileContentView.swift +++ b/SodaLive/Sources/Explorer/Profile/UserProfileContentView.swift @@ -74,7 +74,8 @@ struct UserProfileContentView_Previews: PreviewProvider { duration: "00:04:43", likeCount: 2, commentCount: 0, - isAdult: false + isAdult: false, + isScheduledToOpen: false ) ] )