룰렛 프리뷰 다이얼로그 추가
This commit is contained in:
@@ -121,6 +121,7 @@ struct RouletteSettingsView: View {
|
||||
.foregroundColor(Color(hex: "3bb9f1"))
|
||||
)
|
||||
.onTapGesture {
|
||||
viewModel.onClickPreview()
|
||||
}
|
||||
|
||||
Text("설정완료")
|
||||
@@ -143,6 +144,32 @@ struct RouletteSettingsView: View {
|
||||
.frame(width: screenSize().width, height: 15.3)
|
||||
}
|
||||
}
|
||||
|
||||
if let preview = viewModel.previewData, viewModel.isShowPreview {
|
||||
RoulettePreviewDialog(
|
||||
isShowing: $viewModel.isShowPreview,
|
||||
title: "룰렛 미리보기",
|
||||
onClickSpin: nil,
|
||||
preview: preview
|
||||
)
|
||||
}
|
||||
}
|
||||
.popup(isPresented: $viewModel.isShowErrorPopup, type: .toast, position: .top, autohideIn: 1.3) {
|
||||
GeometryReader { geo in
|
||||
HStack {
|
||||
Spacer()
|
||||
Text(viewModel.errorMessage)
|
||||
.padding(.vertical, 13.3)
|
||||
.frame(width: geo.size.width - 66.7, alignment: .center)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.background(Color(hex: "9970ff"))
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.center)
|
||||
.cornerRadius(20)
|
||||
.padding(.top, 66.7)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
viewModel.getRoulette(creatorId: UserDefaults.int(forKey: .userId))
|
||||
|
Reference in New Issue
Block a user