feat: 콘텐츠 메인 - 새로운 콘텐츠, 큐레이션, 채널별 인기 콘텐츠, 시리즈 상세, 크리에이터 채널 콘텐츠 리스트
- 포인트 사용 가능 여부 표시
This commit is contained in:
		@@ -14,7 +14,7 @@ struct ContentMainItemView: View {
 | 
			
		||||
    
 | 
			
		||||
    var body: some View {
 | 
			
		||||
        VStack(alignment: .leading, spacing: 8) {
 | 
			
		||||
            ZStack(alignment: .topLeading) {
 | 
			
		||||
            ZStack(alignment: .topTrailing) {
 | 
			
		||||
                KFImage(URL(string: item.coverImageUrl))
 | 
			
		||||
                    .cancelOnDisappear(true)
 | 
			
		||||
                    .downsampling(
 | 
			
		||||
@@ -27,6 +27,12 @@ struct ContentMainItemView: View {
 | 
			
		||||
                    .scaledToFill()
 | 
			
		||||
                    .frame(width: 133.3, height: 133.3, alignment: .top)
 | 
			
		||||
                    .cornerRadius(2.7)
 | 
			
		||||
                
 | 
			
		||||
                if item.isPointAvailable {
 | 
			
		||||
                    Image("ic_point")
 | 
			
		||||
                        .padding(.top, 2.7)
 | 
			
		||||
                        .padding(.trailing, 2.7)
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            Text(item.title)
 | 
			
		||||
@@ -75,7 +81,8 @@ struct ContentMainItemView_Previews: PreviewProvider {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저2",
 | 
			
		||||
                price: 10,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: true
 | 
			
		||||
            )
 | 
			
		||||
        )
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ struct GetAudioContentRankingItem: Decodable {
 | 
			
		||||
    let duration: String
 | 
			
		||||
    let creatorId: Int
 | 
			
		||||
    let creatorNickname: String
 | 
			
		||||
    let isPointAvailable: Bool
 | 
			
		||||
    let creatorProfileImageUrl: String
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -51,6 +52,7 @@ struct GetAudioContentMainItem: Decodable {
 | 
			
		||||
    let creatorNickname: String
 | 
			
		||||
    let price: Int
 | 
			
		||||
    let duration: String
 | 
			
		||||
    let isPointAvailable: Bool
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct GetAudioContentCurationResponse: Decodable {
 | 
			
		||||
 
 | 
			
		||||
@@ -133,6 +133,7 @@ struct ContentMainTabRankContentView: View {
 | 
			
		||||
                duration: "00:30:20",
 | 
			
		||||
                creatorId: 1,
 | 
			
		||||
                creatorNickname: "유저1",
 | 
			
		||||
                isPointAvailable: false,
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentRankingItem(
 | 
			
		||||
@@ -144,6 +145,7 @@ struct ContentMainTabRankContentView: View {
 | 
			
		||||
                duration: "00:30:20",
 | 
			
		||||
                creatorId: 2,
 | 
			
		||||
                creatorNickname: "유저2",
 | 
			
		||||
                isPointAvailable: false,
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentRankingItem(
 | 
			
		||||
@@ -155,6 +157,7 @@ struct ContentMainTabRankContentView: View {
 | 
			
		||||
                duration: "00:30:20",
 | 
			
		||||
                creatorId: 3,
 | 
			
		||||
                creatorNickname: "유저3",
 | 
			
		||||
                isPointAvailable: true,
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
 | 
			
		||||
            )
 | 
			
		||||
        ]
 | 
			
		||||
 
 | 
			
		||||
@@ -91,18 +91,28 @@ struct ContentMainTagCurationContentView: View {
 | 
			
		||||
    var body: some View {
 | 
			
		||||
        VStack(alignment: .leading, spacing: 8) {
 | 
			
		||||
            ZStack(alignment: .bottom) {
 | 
			
		||||
                KFImage(URL(string: item.coverImageUrl))
 | 
			
		||||
                    .cancelOnDisappear(true)
 | 
			
		||||
                    .downsampling(
 | 
			
		||||
                        size: CGSize(
 | 
			
		||||
                            width: itemWidth,
 | 
			
		||||
                            height: itemWidth
 | 
			
		||||
                ZStack(alignment: .topTrailing) {
 | 
			
		||||
                    KFImage(URL(string: item.coverImageUrl))
 | 
			
		||||
                        .cancelOnDisappear(true)
 | 
			
		||||
                        .downsampling(
 | 
			
		||||
                            size: CGSize(
 | 
			
		||||
                                width: itemWidth,
 | 
			
		||||
                                height: itemWidth
 | 
			
		||||
                            )
 | 
			
		||||
                        )
 | 
			
		||||
                    )
 | 
			
		||||
                    .resizable()
 | 
			
		||||
                    .scaledToFill()
 | 
			
		||||
                    .frame(width: itemWidth, height: itemWidth, alignment: .top)
 | 
			
		||||
                    .cornerRadius(2.7)
 | 
			
		||||
                        .resizable()
 | 
			
		||||
                        .scaledToFill()
 | 
			
		||||
                        .frame(width: itemWidth, height: itemWidth, alignment: .top)
 | 
			
		||||
                        .cornerRadius(2.7)
 | 
			
		||||
                    
 | 
			
		||||
                    if item.isPointAvailable {
 | 
			
		||||
                        Image("ic_point")
 | 
			
		||||
                            .resizable()
 | 
			
		||||
                            .frame(width: 20, height: 20)
 | 
			
		||||
                            .padding(.top, 2.7)
 | 
			
		||||
                            .padding(.trailing, 2.7)
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
                VStack(spacing: 0) {
 | 
			
		||||
                    Spacer()
 | 
			
		||||
@@ -193,7 +203,8 @@ struct ContentMainTagCurationContentView: View {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저1",
 | 
			
		||||
                price: 100,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: true
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentMainItem(
 | 
			
		||||
                contentId: 2,
 | 
			
		||||
@@ -203,7 +214,8 @@ struct ContentMainTagCurationContentView: View {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저2",
 | 
			
		||||
                price: 0,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: false
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentMainItem(
 | 
			
		||||
                contentId: 3,
 | 
			
		||||
@@ -213,7 +225,8 @@ struct ContentMainTagCurationContentView: View {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저3",
 | 
			
		||||
                price: 1000,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: false
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentMainItem(
 | 
			
		||||
                contentId: 4,
 | 
			
		||||
@@ -223,7 +236,8 @@ struct ContentMainTagCurationContentView: View {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저3",
 | 
			
		||||
                price: 50000,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: false
 | 
			
		||||
            )
 | 
			
		||||
        ],
 | 
			
		||||
        selectTag: { _ in }
 | 
			
		||||
 
 | 
			
		||||
@@ -57,13 +57,21 @@ struct ContentByChannelView: View {
 | 
			
		||||
                    VStack(alignment: .leading, spacing: 8) {
 | 
			
		||||
                        ZStack(alignment:.bottom) {
 | 
			
		||||
                            GeometryReader { geometry in
 | 
			
		||||
                                KFImage(URL(string: content.coverImageUrl))
 | 
			
		||||
                                    .cancelOnDisappear(true)
 | 
			
		||||
                                    .resizable()
 | 
			
		||||
                                    .scaledToFill()
 | 
			
		||||
                                    .frame(width: geometry.size.width, height: geometry.size.width)
 | 
			
		||||
                                    .clipShape(RoundedRectangle(cornerRadius: 5.3))
 | 
			
		||||
                                    .clipped()
 | 
			
		||||
                                ZStack(alignment: .topTrailing) {
 | 
			
		||||
                                    KFImage(URL(string: content.coverImageUrl))
 | 
			
		||||
                                        .cancelOnDisappear(true)
 | 
			
		||||
                                        .resizable()
 | 
			
		||||
                                        .scaledToFill()
 | 
			
		||||
                                        .frame(width: geometry.size.width, height: geometry.size.width)
 | 
			
		||||
                                        .clipShape(RoundedRectangle(cornerRadius: 5.3))
 | 
			
		||||
                                        .clipped()
 | 
			
		||||
                                    
 | 
			
		||||
                                    if content.isPointAvailable {
 | 
			
		||||
                                        Image("ic_point")
 | 
			
		||||
                                            .padding(.top, 2.7)
 | 
			
		||||
                                            .padding(.trailing, 2.7)
 | 
			
		||||
                                    }
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                            .aspectRatio(1, contentMode: .fit)
 | 
			
		||||
                            
 | 
			
		||||
@@ -168,6 +176,7 @@ struct ContentByChannelView: View {
 | 
			
		||||
                duration: "00:30:20",
 | 
			
		||||
                creatorId: 1,
 | 
			
		||||
                creatorNickname: "유저1",
 | 
			
		||||
                isPointAvailable: true,
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentRankingItem(
 | 
			
		||||
@@ -179,6 +188,7 @@ struct ContentByChannelView: View {
 | 
			
		||||
                duration: "00:30:20",
 | 
			
		||||
                creatorId: 1,
 | 
			
		||||
                creatorNickname: "유저1",
 | 
			
		||||
                isPointAvailable: false,
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentRankingItem(
 | 
			
		||||
@@ -190,6 +200,7 @@ struct ContentByChannelView: View {
 | 
			
		||||
                duration: "00:30:20",
 | 
			
		||||
                creatorId: 1,
 | 
			
		||||
                creatorNickname: "유저1",
 | 
			
		||||
                isPointAvailable: false,
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentRankingItem(
 | 
			
		||||
@@ -201,6 +212,7 @@ struct ContentByChannelView: View {
 | 
			
		||||
                duration: "00:30:20",
 | 
			
		||||
                creatorId: 1,
 | 
			
		||||
                creatorNickname: "유저1",
 | 
			
		||||
                isPointAvailable: false,
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
 | 
			
		||||
            )
 | 
			
		||||
        ]
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,8 @@ struct ContentMainCurationItemViewV2: View {
 | 
			
		||||
                        creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                        creatorNickname: "유저1",
 | 
			
		||||
                        price: 10,
 | 
			
		||||
                        duration: "00:00:30"
 | 
			
		||||
                        duration: "00:00:30",
 | 
			
		||||
                        isPointAvailable: true
 | 
			
		||||
                    ),
 | 
			
		||||
                    GetAudioContentMainItem(
 | 
			
		||||
                        contentId: 2,
 | 
			
		||||
@@ -68,7 +69,8 @@ struct ContentMainCurationItemViewV2: View {
 | 
			
		||||
                        creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                        creatorNickname: "유저2",
 | 
			
		||||
                        price: 10,
 | 
			
		||||
                        duration: "00:00:30"
 | 
			
		||||
                        duration: "00:00:30",
 | 
			
		||||
                        isPointAvailable: false
 | 
			
		||||
                    ),
 | 
			
		||||
                    GetAudioContentMainItem(
 | 
			
		||||
                        contentId: 3,
 | 
			
		||||
@@ -78,7 +80,8 @@ struct ContentMainCurationItemViewV2: View {
 | 
			
		||||
                        creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                        creatorNickname: "유저3",
 | 
			
		||||
                        price: 10,
 | 
			
		||||
                        duration: "00:00:30"
 | 
			
		||||
                        duration: "00:00:30",
 | 
			
		||||
                        isPointAvailable: false
 | 
			
		||||
                    )
 | 
			
		||||
                ]
 | 
			
		||||
            )
 | 
			
		||||
 
 | 
			
		||||
@@ -72,7 +72,8 @@ struct ContentMainNewContentViewV2: View {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저1",
 | 
			
		||||
                price: 10,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: false
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentMainItem(
 | 
			
		||||
                contentId: 2,
 | 
			
		||||
@@ -82,7 +83,8 @@ struct ContentMainNewContentViewV2: View {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저2",
 | 
			
		||||
                price: 10,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: false
 | 
			
		||||
            ),
 | 
			
		||||
            GetAudioContentMainItem(
 | 
			
		||||
                contentId: 3,
 | 
			
		||||
@@ -92,7 +94,8 @@ struct ContentMainNewContentViewV2: View {
 | 
			
		||||
                creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
 | 
			
		||||
                creatorNickname: "유저3",
 | 
			
		||||
                price: 10,
 | 
			
		||||
                duration: "00:00:30"
 | 
			
		||||
                duration: "00:00:30",
 | 
			
		||||
                isPointAvailable: false
 | 
			
		||||
            )
 | 
			
		||||
        ],
 | 
			
		||||
        selectTheme: { _ in }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user