라이브 성별 제한 옵션 추가
라이브 생성과 수정 요청에 성별 제한 값을 포함한다. 라이브 정보 조회 응답에 성별 제한 값을 제공한다.
This commit is contained in:
@@ -175,6 +175,10 @@ struct LiveRoomCreateView: View {
|
||||
AdultSettingView()
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
GenderRestrictionView()
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
}
|
||||
|
||||
PriceSettingView()
|
||||
@@ -698,6 +702,56 @@ struct LiveRoomCreateView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func GenderRestrictionView() -> some View {
|
||||
VStack(spacing: 13.3) {
|
||||
Text(I18n.CreateLive.genderRestrictionTitle)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
GenderRestrictionSelectButton(
|
||||
title: I18n.CreateLive.genderAll,
|
||||
restriction: .ALL,
|
||||
buttonWidth: (screenSize().width - 53) / 3
|
||||
)
|
||||
|
||||
GenderRestrictionSelectButton(
|
||||
title: I18n.CreateLive.genderMaleOnly,
|
||||
restriction: .MALE_ONLY,
|
||||
buttonWidth: (screenSize().width - 53) / 3
|
||||
)
|
||||
|
||||
GenderRestrictionSelectButton(
|
||||
title: I18n.CreateLive.genderFemaleOnly,
|
||||
restriction: .FEMALE_ONLY,
|
||||
buttonWidth: (screenSize().width - 53) / 3
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func GenderRestrictionSelectButton(
|
||||
title: String,
|
||||
restriction: LiveRoomCreateViewModel.GenderRestriction,
|
||||
buttonWidth: CGFloat
|
||||
) -> some View {
|
||||
SelectedButtonView(
|
||||
title: title,
|
||||
isActive: true,
|
||||
isSelected: viewModel.genderRestriction == restriction
|
||||
)
|
||||
.frame(width: buttonWidth)
|
||||
.onTapGesture {
|
||||
hideKeyboard()
|
||||
if viewModel.genderRestriction != restriction {
|
||||
viewModel.genderRestriction = restriction
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func PriceSettingView() -> some View {
|
||||
|
||||
Reference in New Issue
Block a user