라이브 메뉴 설정 페이지 추가
This commit is contained in:
@@ -15,13 +15,84 @@ struct MenuSettingsView: View {
|
||||
|
||||
var body: some View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
VStack(spacing: 0) {
|
||||
DetailNavigationBar(title: "메뉴 설정")
|
||||
VStack(spacing: 13.3) {
|
||||
DetailNavigationBar(title: "메뉴 설정") {
|
||||
isShowing = false
|
||||
}
|
||||
|
||||
Text("메뉴 설정")
|
||||
HStack(spacing: 13.3) {
|
||||
SelectedButtonView(
|
||||
title: "메뉴 1",
|
||||
isActive: true,
|
||||
isSelected: viewModel.selectedMenu == .MENU_1
|
||||
)
|
||||
.onTapGesture {
|
||||
viewModel.selectMenuPreset(selectedMenuPreset: .MENU_1)
|
||||
}
|
||||
|
||||
SelectedButtonView(
|
||||
title: "메뉴 2",
|
||||
isActive: viewModel.menuList.count > 0,
|
||||
isSelected: viewModel.selectedMenu == .MENU_2
|
||||
)
|
||||
.onTapGesture {
|
||||
viewModel.selectMenuPreset(selectedMenuPreset: .MENU_2)
|
||||
}
|
||||
|
||||
SelectedButtonView(
|
||||
title: "메뉴 3",
|
||||
isActive: viewModel.menuList.count > 1,
|
||||
isSelected: viewModel.selectedMenu == .MENU_3
|
||||
)
|
||||
.onTapGesture {
|
||||
viewModel.selectMenuPreset(selectedMenuPreset: .MENU_3)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
|
||||
TextViewWrapper(
|
||||
text: $viewModel.menu,
|
||||
placeholder: "메뉴판을 작성해주세요.",
|
||||
textColorHex: "eeeeee",
|
||||
backgroundColorHex: "303030"
|
||||
)
|
||||
.frame(height: 350)
|
||||
.cornerRadius(6.7)
|
||||
.padding(.horizontal, 13.3)
|
||||
|
||||
Text("저장하기")
|
||||
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||
.foregroundColor(.white)
|
||||
.padding(.vertical, 16)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color.button)
|
||||
.cornerRadius(10)
|
||||
.padding(.horizontal, 13.3)
|
||||
.clipShape(Rectangle())
|
||||
.onTapGesture { viewModel.saveMenu() }
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.onAppear {
|
||||
viewModel.getAllMenuPreset {
|
||||
self.isShowing = false
|
||||
}
|
||||
}
|
||||
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .bottom, autohideIn: 2) {
|
||||
HStack {
|
||||
Spacer()
|
||||
Text(viewModel.errorMessage)
|
||||
.padding(.vertical, 13.3)
|
||||
.frame(width: screenSize().width - 66.7, alignment: .center)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.background(Color.button)
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.leading)
|
||||
.cornerRadius(20)
|
||||
.padding(.bottom, 66.7)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user