콘텐츠 메인 다시듣기 탭
- 새로운 다시듣기 전체보기
This commit is contained in:
		| @@ -149,4 +149,6 @@ enum AppStep { | ||||
|     case newAlarmContentAll | ||||
|      | ||||
|     case newAsmrContentAll | ||||
|      | ||||
|     case newReplayContentAll | ||||
| } | ||||
|   | ||||
| @@ -66,6 +66,7 @@ struct ContentMainAsmrAllView: View { | ||||
|                     viewModel.selectedTheme = "ASMR" | ||||
|                 } | ||||
|             } | ||||
|             .navigationBarHidden(true) | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -0,0 +1,76 @@ | ||||
| // | ||||
| //  ContentMainReplayAllView.swift | ||||
| //  SodaLive | ||||
| // | ||||
| //  Created by klaus on 2/22/25. | ||||
| // | ||||
|  | ||||
| import SwiftUI | ||||
|  | ||||
| struct ContentMainReplayAllView: View { | ||||
|      | ||||
|     @StateObject var viewModel = ContentNewAllViewModel() | ||||
|      | ||||
|     let columns = [ | ||||
|         GridItem(.flexible(), alignment: .top), | ||||
|         GridItem(.flexible(), alignment: .top), | ||||
|         GridItem(.flexible(), alignment: .top) | ||||
|     ] | ||||
|      | ||||
|     var body: some View { | ||||
|         NavigationView { | ||||
|             BaseView(isLoading: $viewModel.isLoading) { | ||||
|                 VStack(alignment: .leading, spacing: 13.3) { | ||||
|                     DetailNavigationBar(title: "새로운 라이브 다시듣기") | ||||
|                      | ||||
|                     Text("※ 최근 2주간 등록된 새로운 라이브 다시듣기 입니다.") | ||||
|                         .font(.custom(Font.medium.rawValue, size: 14.7)) | ||||
|                         .foregroundColor(.graybb) | ||||
|                         .padding(.horizontal, 13.3) | ||||
|                         .padding(.vertical, 8) | ||||
|                         .frame(width: screenSize().width, alignment: .leading) | ||||
|                         .background(Color.gray22) | ||||
|                      | ||||
|                     HStack(spacing: 0) { | ||||
|                         Text("전체") | ||||
|                             .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                             .foregroundColor(Color(hex: "e2e2e2")) | ||||
|                          | ||||
|                         Text("\(viewModel.totalCount)") | ||||
|                             .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                             .foregroundColor(Color(hex: "ff5c49")) | ||||
|                             .padding(.leading, 8) | ||||
|                          | ||||
|                         Text("개") | ||||
|                             .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                             .foregroundColor(Color(hex: "e2e2e2")) | ||||
|                             .padding(.leading, 2) | ||||
|                     } | ||||
|                     .padding(.horizontal, 13.3) | ||||
|                      | ||||
|                     ScrollView(.vertical, showsIndicators: false) { | ||||
|                         LazyVGrid(columns: columns, spacing: 32) { | ||||
|                             ForEach(0..<viewModel.newContentList.count, id: \.self) { index in | ||||
|                                 ContentNewAllItemView(item: viewModel.newContentList[index]) | ||||
|                                     .onAppear { | ||||
|                                         if index == viewModel.newContentList.count - 1 { | ||||
|                                             viewModel.getNewContentList() | ||||
|                                         } | ||||
|                                     } | ||||
|                             } | ||||
|                         } | ||||
|                         .padding(.horizontal, 13.3) | ||||
|                     } | ||||
|                 } | ||||
|                 .onAppear { | ||||
|                     viewModel.selectedTheme = "다시듣기" | ||||
|                 } | ||||
|             } | ||||
|             .navigationBarHidden(true) | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| #Preview { | ||||
|     ContentMainReplayAllView() | ||||
| } | ||||
| @@ -23,7 +23,10 @@ struct ContentMainTabReplayView: View { | ||||
|                     if !viewModel.newReplayContentList.isEmpty { | ||||
|                         ContentMainNewContentViewV2( | ||||
|                             title: "새로운 라이브 다시듣기", | ||||
|                             onClickMore: {}, | ||||
|                             onClickMore: { | ||||
|                                 AppState.shared | ||||
|                                     .setAppStep(step: .newReplayContentAll) | ||||
|                             }, | ||||
|                             themeList: [], | ||||
|                             contentList: viewModel.newReplayContentList | ||||
|                         ) { _ in } | ||||
|   | ||||
| @@ -227,6 +227,9 @@ struct ContentView: View { | ||||
|             case .newAsmrContentAll: | ||||
|                 ContentMainAsmrAllView() | ||||
|                  | ||||
|             case .newReplayContentAll: | ||||
|                 ContentMainReplayAllView() | ||||
|                  | ||||
|             default: | ||||
|                 EmptyView() | ||||
|                     .frame(width: 0, height: 0, alignment: .topLeading) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung