라이브 성별 제한 옵션 추가
라이브 생성과 수정 요청에 성별 제한 값을 포함한다. 라이브 정보 조회 응답에 성별 제한 값을 제공한다.
This commit is contained in:
@@ -45,13 +45,17 @@ struct LiveRoomEditView: View {
|
||||
NumberOfPeopleLimitView()
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
GenderRestrictionView()
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
if !viewModel.isLoading {
|
||||
Text("라이브 수정")
|
||||
.appFont(size: 18.3, weight: .bold)
|
||||
.foregroundColor(Color.white)
|
||||
.frame(width: screenSize().width - 26.7, height: 50)
|
||||
.background(Color(hex: "9970ff"))
|
||||
.background(Color.button)
|
||||
.cornerRadius(10)
|
||||
.padding(.top, 30)
|
||||
.onTapGesture {
|
||||
@@ -87,7 +91,7 @@ struct LiveRoomEditView: View {
|
||||
.padding(.vertical, 13.3)
|
||||
.frame(width: geo.size.width - 66.7, alignment: .center)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.background(Color(hex: "9970ff"))
|
||||
.background(Color.button)
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.center)
|
||||
.cornerRadius(20)
|
||||
@@ -175,7 +179,7 @@ struct LiveRoomEditView: View {
|
||||
.frame(width: buttonWidth, height: 48.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 6.7)
|
||||
.stroke(Color(hex: "9970ff"), lineWidth: 1.3)
|
||||
.stroke(Color.button, lineWidth: 1.3)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -195,7 +199,7 @@ struct LiveRoomEditView: View {
|
||||
.frame(width: buttonWidth, height: 48.7)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 6.7)
|
||||
.stroke(Color(hex: "9970ff"), lineWidth: 1.3)
|
||||
.stroke(Color.button, lineWidth: 1.3)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -227,6 +231,56 @@ struct LiveRoomEditView: View {
|
||||
.cornerRadius(6.7)
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
func GenderRestrictionView() -> some View {
|
||||
VStack(spacing: 13.3) {
|
||||
Text(I18n.CreateLive.genderRestrictionTitle)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.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 SelectDateView() -> some View {
|
||||
|
||||
Reference in New Issue
Block a user