크리에이터 채널
- 룰렛 설정 메뉴 추가
This commit is contained in:
@@ -13,6 +13,8 @@ struct RouletteSettingsView: View {
|
||||
@StateObject var viewModel = RouletteSettingsViewModel()
|
||||
|
||||
@Binding var isShowing: Bool
|
||||
|
||||
let availableActive: Bool
|
||||
let onComplete: (Bool, String) -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -61,21 +63,23 @@ struct RouletteSettingsView: View {
|
||||
}
|
||||
.padding(.top, 26.7)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("룰렛을 활성화 하시겠습니까?")
|
||||
.font(.custom(Font.bold.rawValue, size: 16))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(viewModel.isActive ? "btn_toggle_on_big" : "btn_toggle_off_big")
|
||||
.resizable()
|
||||
.frame(width: 44, height: 27)
|
||||
.onTapGesture {
|
||||
viewModel.isActive.toggle()
|
||||
}
|
||||
if availableActive {
|
||||
HStack(spacing: 0) {
|
||||
Text("룰렛을 활성화 하시겠습니까?")
|
||||
.font(.custom(Font.bold.rawValue, size: 16))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(viewModel.isActive ? "btn_toggle_on_big" : "btn_toggle_off_big")
|
||||
.resizable()
|
||||
.frame(width: 44, height: 27)
|
||||
.onTapGesture {
|
||||
viewModel.isActive.toggle()
|
||||
}
|
||||
}
|
||||
.padding(.top, 26.7)
|
||||
}
|
||||
.padding(.top, 26.7)
|
||||
|
||||
VStack(alignment: .leading, spacing: 13.3) {
|
||||
Text("룰렛 금액 설정")
|
||||
@@ -238,6 +242,6 @@ struct RouletteSettingsView: View {
|
||||
|
||||
struct RouletteSettingsView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
RouletteSettingsView(isShowing: .constant(true)) { _, _ in }
|
||||
RouletteSettingsView(isShowing: .constant(true), availableActive: true) { _, _ in }
|
||||
}
|
||||
}
|
||||
|
@@ -610,7 +610,7 @@ struct LiveRoomViewV2: View {
|
||||
}
|
||||
|
||||
if viewModel.isShowRouletteSettings {
|
||||
RouletteSettingsView(isShowing: $viewModel.isShowRouletteSettings) { isActiveRoulette, message in
|
||||
RouletteSettingsView(isShowing: $viewModel.isShowRouletteSettings, availableActive: true) { isActiveRoulette, message in
|
||||
self.viewModel.setActiveRoulette(
|
||||
isActiveRoulette: isActiveRoulette,
|
||||
message: message
|
||||
|
Reference in New Issue
Block a user