라이브 방 생성
- 크리에이터 입장 가능 설정 추가
This commit is contained in:
		| @@ -22,4 +22,5 @@ struct CreateLiveRoomRequest: Encodable { | |||||||
|     var menuPanId: Int = 0 |     var menuPanId: Int = 0 | ||||||
|     var menuPan: String = "" |     var menuPan: String = "" | ||||||
|     var isActiveMenuPan: Bool = false |     var isActiveMenuPan: Bool = false | ||||||
|  |     var isAvailableJoinCreator: Bool = true | ||||||
| } | } | ||||||
|   | |||||||
| @@ -147,6 +147,23 @@ struct LiveRoomCreateView: View { | |||||||
|                                         .frame(width: screenSize().width - 26.7) |                                         .frame(width: screenSize().width - 26.7) | ||||||
|                                         .padding(.top, 33.3) |                                         .padding(.top, 33.3) | ||||||
|                                      |                                      | ||||||
|  |                                     VStack(spacing: 13.3) { | ||||||
|  |                                         Text("크리에이터 입장 설정") | ||||||
|  |                                             .font(.custom(Font.bold.rawValue, size: 16.7)) | ||||||
|  |                                             .foregroundColor(Color.grayee) | ||||||
|  |                                             .frame(width: screenSize().width - 26.7, alignment: .leading) | ||||||
|  |                                          | ||||||
|  |                                         HStack(spacing: 13.3) { | ||||||
|  |                                             SelectedButtonView(title: "가능", isActive: true, isSelected: viewModel.isAvailableJoinCreator) | ||||||
|  |                                                 .onTapGesture { viewModel.isAvailableJoinCreator = true } | ||||||
|  |                                              | ||||||
|  |                                             SelectedButtonView(title: "불가능", isActive: true, isSelected: !viewModel.isAvailableJoinCreator) | ||||||
|  |                                                 .onTapGesture { viewModel.isAvailableJoinCreator = false } | ||||||
|  |                                         } | ||||||
|  |                                     } | ||||||
|  |                                     .frame(width: screenSize().width - 26.7) | ||||||
|  |                                     .padding(.top, 33.3) | ||||||
|  |                                      | ||||||
|                                     if UserDefaults.bool(forKey: .auth) { |                                     if UserDefaults.bool(forKey: .auth) { | ||||||
|                                         AdultSettingView() |                                         AdultSettingView() | ||||||
|                                             .frame(width: screenSize().width - 26.7) |                                             .frame(width: screenSize().width - 26.7) | ||||||
|   | |||||||
| @@ -88,6 +88,8 @@ final class LiveRoomCreateViewModel: ObservableObject { | |||||||
|     @Published var isActivateMenu = false |     @Published var isActivateMenu = false | ||||||
|     @Published var selectedMenu: SelectedMenu? = nil |     @Published var selectedMenu: SelectedMenu? = nil | ||||||
|      |      | ||||||
|  |     @Published var isAvailableJoinCreator = true | ||||||
|  |      | ||||||
|     private let repository = LiveRepository() |     private let repository = LiveRepository() | ||||||
|     private var subscription = Set<AnyCancellable>() |     private var subscription = Set<AnyCancellable>() | ||||||
|      |      | ||||||
| @@ -178,7 +180,8 @@ final class LiveRoomCreateViewModel: ObservableObject { | |||||||
|                 password: (roomType == .PRIVATE && !password.trimmingCharacters(in: .whitespaces).isEmpty) ? password : nil, |                 password: (roomType == .PRIVATE && !password.trimmingCharacters(in: .whitespaces).isEmpty) ? password : nil, | ||||||
|                 menuPanId: isActivateMenu ? menuId : 0, |                 menuPanId: isActivateMenu ? menuId : 0, | ||||||
|                 menuPan: isActivateMenu ? menu : "", |                 menuPan: isActivateMenu ? menu : "", | ||||||
|                 isActiveMenuPan: isActivateMenu |                 isActiveMenuPan: isActivateMenu, | ||||||
|  |                 isAvailableJoinCreator: isAvailableJoinCreator | ||||||
|             ) |             ) | ||||||
|              |              | ||||||
|             if timeSettingMode == .RESERVATION { |             if timeSettingMode == .RESERVATION { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung