콘텐츠, 라이브 메인
- 보이스 모닝콜 메뉴 추가 - 라이브 다시듣기 메뉴 라이브 메인으로 이동
| @@ -9,7 +9,7 @@ | |||||||
|       "scale" : "2x" |       "scale" : "2x" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "filename" : "ic_thumb_play_blue.png", |       "filename" : "ic_alarm_clock_blue.png", | ||||||
|       "idiom" : "universal", |       "idiom" : "universal", | ||||||
|       "scale" : "3x" |       "scale" : "3x" | ||||||
|     } |     } | ||||||
							
								
								
									
										
											BIN
										
									
								
								SodaLive/Resources/Assets.xcassets/ic_alarm_clock_blue.imageset/ic_alarm_clock_blue.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 3.2 KiB | 
							
								
								
									
										21
									
								
								SodaLive/Resources/Assets.xcassets/ic_thumb_play_purple.imageset/Contents.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,21 @@ | |||||||
|  | { | ||||||
|  |   "images" : [ | ||||||
|  |     { | ||||||
|  |       "idiom" : "universal", | ||||||
|  |       "scale" : "1x" | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "idiom" : "universal", | ||||||
|  |       "scale" : "2x" | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "filename" : "ic_thumb_play_purple.png", | ||||||
|  |       "idiom" : "universal", | ||||||
|  |       "scale" : "3x" | ||||||
|  |     } | ||||||
|  |   ], | ||||||
|  |   "info" : { | ||||||
|  |     "author" : "xcode", | ||||||
|  |     "version" : 1 | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										
											BIN
										
									
								
								SodaLive/Resources/Assets.xcassets/ic_thumb_play_purple.imageset/ic_thumb_play_purple.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.5 KiB | 
							
								
								
									
										21
									
								
								SodaLive/Resources/Assets.xcassets/img_bg_morning_call.imageset/Contents.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,21 @@ | |||||||
|  | { | ||||||
|  |   "images" : [ | ||||||
|  |     { | ||||||
|  |       "idiom" : "universal", | ||||||
|  |       "scale" : "1x" | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "idiom" : "universal", | ||||||
|  |       "scale" : "2x" | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "filename" : "img_bg_morning_call.png", | ||||||
|  |       "idiom" : "universal", | ||||||
|  |       "scale" : "3x" | ||||||
|  |     } | ||||||
|  |   ], | ||||||
|  |   "info" : { | ||||||
|  |     "author" : "xcode", | ||||||
|  |     "version" : 1 | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										
											BIN
										
									
								
								SodaLive/Resources/Assets.xcassets/img_bg_morning_call.imageset/img_bg_morning_call.png
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 10 KiB | 
| Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 7.2 KiB | 
| Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB | 
| @@ -82,7 +82,7 @@ final class ContentRepository { | |||||||
|         return api.requestPublisher( |         return api.requestPublisher( | ||||||
|             .getNewContentOfTheme( |             .getNewContentOfTheme( | ||||||
|                 theme: theme, |                 theme: theme, | ||||||
|                 isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible), |                 isAdultContentVisible: UserDefaults.isAdultContentVisible(), | ||||||
|                 contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL |                 contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL | ||||||
|             ) |             ) | ||||||
|         ) |         ) | ||||||
| @@ -91,7 +91,7 @@ final class ContentRepository { | |||||||
|     func getCurationList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> { |     func getCurationList(page: Int, size: Int) -> AnyPublisher<Response, MoyaError> { | ||||||
|         return api.requestPublisher( |         return api.requestPublisher( | ||||||
|             .getCurationList( |             .getCurationList( | ||||||
|                 isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible), |                 isAdultContentVisible: UserDefaults.isAdultContentVisible(), | ||||||
|                 contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL, |                 contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL, | ||||||
|                 page: page, |                 page: page, | ||||||
|                 size: size |                 size: size | ||||||
| @@ -115,7 +115,7 @@ final class ContentRepository { | |||||||
|         return api.requestPublisher( |         return api.requestPublisher( | ||||||
|             .getNewContentAllOfTheme( |             .getNewContentAllOfTheme( | ||||||
|                 theme: theme, |                 theme: theme, | ||||||
|                 isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible), |                 isAdultContentVisible: UserDefaults.isAdultContentVisible(), | ||||||
|                 contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL, |                 contentType: ContentType(rawValue: UserDefaults.string(forKey: .contentPreference)) ?? ContentType.ALL, | ||||||
|                 page: page, |                 page: page, | ||||||
|                 size: size |                 size: size | ||||||
|   | |||||||
| @@ -40,6 +40,28 @@ struct ContentMainView: View { | |||||||
|                         ContentMainRecommendSeriesView() |                         ContentMainRecommendSeriesView() | ||||||
|                          |                          | ||||||
|                         HStack(spacing: 8) { |                         HStack(spacing: 8) { | ||||||
|  |                             ZStack { | ||||||
|  |                                 Image("img_bg_morning_call") | ||||||
|  |                                     .resizable() | ||||||
|  |                                     .frame(height: 53.3) | ||||||
|  |                                     .frame(maxWidth: .infinity) | ||||||
|  |                                     .cornerRadius(2.6) | ||||||
|  |                                  | ||||||
|  |                                 HStack(spacing: 2.7) { | ||||||
|  |                                     Image("ic_alarm_clock_blue") | ||||||
|  |                                      | ||||||
|  |                                     Text("보이스 모닝콜") | ||||||
|  |                                         .font(.custom(Font.bold.rawValue, size: 16.7)) | ||||||
|  |                                         .foregroundColor(Color(hex: "0057ff")) | ||||||
|  |                                 } | ||||||
|  |                                 .cornerRadius(2.6) | ||||||
|  |                             } | ||||||
|  |                             .onTapGesture { | ||||||
|  |                                 AppState.shared.setAppStep( | ||||||
|  |                                     step: .contentAllByTheme(themeId: 12) | ||||||
|  |                                 ) | ||||||
|  |                             } | ||||||
|  |                              | ||||||
|                             ZStack { |                             ZStack { | ||||||
|                                 Image("img_bg_short_play") |                                 Image("img_bg_short_play") | ||||||
|                                     .resizable() |                                     .resizable() | ||||||
| @@ -61,28 +83,6 @@ struct ContentMainView: View { | |||||||
|                                     step: .contentAllByTheme(themeId: 11) |                                     step: .contentAllByTheme(themeId: 11) | ||||||
|                                 ) |                                 ) | ||||||
|                             } |                             } | ||||||
|                              |  | ||||||
|                             ZStack { |  | ||||||
|                                 Image("img_bg_review_live") |  | ||||||
|                                     .resizable() |  | ||||||
|                                     .frame(height: 53.3) |  | ||||||
|                                     .frame(maxWidth: .infinity) |  | ||||||
|                                     .cornerRadius(2.6) |  | ||||||
|                                  |  | ||||||
|                                 HStack(spacing: 2.7) { |  | ||||||
|                                     Image("ic_thumb_play_blue") |  | ||||||
|                                      |  | ||||||
|                                     Text("라이브 다시듣기") |  | ||||||
|                                         .font(.custom(Font.bold.rawValue, size: 16.7)) |  | ||||||
|                                         .foregroundColor(Color(hex: "0057ff")) |  | ||||||
|                                 } |  | ||||||
|                                 .cornerRadius(2.6) |  | ||||||
|                             } |  | ||||||
|                             .onTapGesture { |  | ||||||
|                                 AppState.shared.setAppStep( |  | ||||||
|                                     step: .contentAllByTheme(themeId: 7) |  | ||||||
|                                 ) |  | ||||||
|                             } |  | ||||||
|                         } |                         } | ||||||
|                         .padding(.bottom, 40) |                         .padding(.bottom, 40) | ||||||
|                         .padding(.horizontal, 13.3) |                         .padding(.horizontal, 13.3) | ||||||
|   | |||||||
| @@ -68,6 +68,11 @@ extension UserDefaults { | |||||||
|         return UserDefaults.standard.data(forKey: key) |         return UserDefaults.standard.data(forKey: key) | ||||||
|     } |     } | ||||||
|      |      | ||||||
|  |     static func isAdultContentVisible() -> Bool { | ||||||
|  |         let key = UserDefaultsKey.isAdultContentVisible.rawValue | ||||||
|  |         return UserDefaults.standard.object(forKey: key) != nil ? bool(forKey: .isAdultContentVisible) : true | ||||||
|  |     } | ||||||
|  |      | ||||||
|     static func reset() { |     static func reset() { | ||||||
|         UserDefaultsKey.allCases.forEach { UserDefaults.standard.removeObject(forKey: $0.rawValue) } |         UserDefaultsKey.allCases.forEach { UserDefaults.standard.removeObject(forKey: $0.rawValue) } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -26,6 +26,29 @@ struct LiveView: View { | |||||||
|                                     .padding(.top, 13.3) |                                     .padding(.top, 13.3) | ||||||
|                             } |                             } | ||||||
|                              |                              | ||||||
|  |                             ZStack { | ||||||
|  |                                 Image("img_bg_review_live") | ||||||
|  |                                     .resizable() | ||||||
|  |                                     .frame(height: 53.3) | ||||||
|  |                                     .frame(maxWidth: .infinity) | ||||||
|  |                                     .cornerRadius(2.6) | ||||||
|  |                                  | ||||||
|  |                                 HStack(spacing: 2.7) { | ||||||
|  |                                     Image("ic_thumb_play_purple") | ||||||
|  |                                      | ||||||
|  |                                     Text("라이브 다시듣기") | ||||||
|  |                                         .font(.custom(Font.bold.rawValue, size: 16.7)) | ||||||
|  |                                         .foregroundColor(Color(hex: "672bff")) | ||||||
|  |                                 } | ||||||
|  |                                 .cornerRadius(2.6) | ||||||
|  |                             } | ||||||
|  |                             .padding(.horizontal, 13.3) | ||||||
|  |                             .onTapGesture { | ||||||
|  |                                 AppState.shared.setAppStep( | ||||||
|  |                                     step: .contentAllByTheme(themeId: 7) | ||||||
|  |                                 ) | ||||||
|  |                             } | ||||||
|  |                              | ||||||
|                             if viewModel.recommendChannelItems.count > 0 { |                             if viewModel.recommendChannelItems.count > 0 { | ||||||
|                                 SectionRecommendChannelView( |                                 SectionRecommendChannelView( | ||||||
|                                     items: viewModel.isFollowingList ? |                                     items: viewModel.isFollowingList ? | ||||||
|   | |||||||
| @@ -99,7 +99,7 @@ final class LiveViewModel: ObservableObject { | |||||||
|                 timezone: TimeZone.current.identifier, |                 timezone: TimeZone.current.identifier, | ||||||
|                 dateString: nil, |                 dateString: nil, | ||||||
|                 status: .NOW, |                 status: .NOW, | ||||||
|                 isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible), |                 isAdultContentVisible: UserDefaults.isAdultContentVisible(), | ||||||
|                 page: 1, |                 page: 1, | ||||||
|                 size: 10 |                 size: 10 | ||||||
|             ) |             ) | ||||||
| @@ -110,7 +110,7 @@ final class LiveViewModel: ObservableObject { | |||||||
|                 timezone: TimeZone.current.identifier, |                 timezone: TimeZone.current.identifier, | ||||||
|                 dateString: nil, |                 dateString: nil, | ||||||
|                 status: .RESERVATION, |                 status: .RESERVATION, | ||||||
|                 isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible), |                 isAdultContentVisible: UserDefaults.isAdultContentVisible(), | ||||||
|                 page: 1, |                 page: 1, | ||||||
|                 size: 10 |                 size: 10 | ||||||
|             ) |             ) | ||||||
| @@ -289,7 +289,7 @@ final class LiveViewModel: ObservableObject { | |||||||
|                     timezone: TimeZone.current.identifier, |                     timezone: TimeZone.current.identifier, | ||||||
|                     dateString: nil, |                     dateString: nil, | ||||||
|                     status: .NOW, |                     status: .NOW, | ||||||
|                     isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible), |                     isAdultContentVisible: UserDefaults.isAdultContentVisible(), | ||||||
|                     page: page, |                     page: page, | ||||||
|                     size: pageSize |                     size: pageSize | ||||||
|                 ) |                 ) | ||||||
| @@ -347,7 +347,7 @@ final class LiveViewModel: ObservableObject { | |||||||
|                     timezone: TimeZone.current.identifier, |                     timezone: TimeZone.current.identifier, | ||||||
|                     dateString: selectedDateString, |                     dateString: selectedDateString, | ||||||
|                     status: .RESERVATION, |                     status: .RESERVATION, | ||||||
|                     isAdultContentVisible: UserDefaults.bool(forKey: .isAdultContentVisible), |                     isAdultContentVisible: UserDefaults.isAdultContentVisible(), | ||||||
|                     page: page, |                     page: page, | ||||||
|                     size: pageSize |                     size: pageSize | ||||||
|                 ) |                 ) | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ | |||||||
| import Foundation | import Foundation | ||||||
|  |  | ||||||
| final class ContentSettingsViewModel: ObservableObject { | final class ContentSettingsViewModel: ObservableObject { | ||||||
|     @Published var isAdultContentVisible = UserDefaults.bool(forKey: .isAdultContentVisible) { |     @Published var isAdultContentVisible = UserDefaults.isAdultContentVisible() { | ||||||
|         didSet { |         didSet { | ||||||
|             if oldValue != isAdultContentVisible { |             if oldValue != isAdultContentVisible { | ||||||
|                 UserDefaults.set(isAdultContentVisible, forKey: .isAdultContentVisible) |                 UserDefaults.set(isAdultContentVisible, forKey: .isAdultContentVisible) | ||||||
|   | |||||||
 Yu Sung
					Yu Sung