콘텐츠 등록

- 한정판 등록 기능 추가
This commit is contained in:
Yu Sung
2024-06-07 14:51:24 +09:00
parent 5fc0f1789a
commit 9533e97f89
3 changed files with 80 additions and 7 deletions

View File

@@ -219,7 +219,7 @@ struct ContentCreateView: View {
VStack(spacing: 13.3) {
Text("소장 설정")
.font(.custom(Font.bold.rawValue, size: 16.7))
.foregroundColor(Color(hex: "eeeeee"))
.foregroundColor(Color.grayee)
.frame(maxWidth: .infinity, alignment: .leading)
HStack(spacing: 13.3) {
@@ -241,7 +241,7 @@ struct ContentCreateView: View {
VStack(spacing: 0) {
Text(viewModel.isOnlyRental ? "대여 가격" : "소장 가격")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "d2d2d2"))
.foregroundColor(Color.grayd2)
.frame(maxWidth: .infinity, alignment: .leading)
HStack(spacing: 0) {
@@ -249,7 +249,7 @@ struct ContentCreateView: View {
.autocapitalization(.none)
.disableAutocorrection(true)
.font(.custom(Font.bold.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
.foregroundColor(Color.grayee)
.cornerRadius(6.7)
.keyboardType(.numberPad)
.padding(.trailing, 10)
@@ -258,16 +258,16 @@ struct ContentCreateView: View {
Text("")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "777777"))
.foregroundColor(Color.gray77)
}
.padding(.vertical, 17)
.padding(.horizontal, 13.3)
.background(Color(hex: "222222"))
.background(Color.gray22)
.cornerRadius(5.3)
.padding(.top, 5.3)
Rectangle()
.foregroundColor(Color(hex: "232323"))
.foregroundColor(Color.gray23)
.frame(height: 1)
.padding(.top, 11)
@@ -289,6 +289,44 @@ struct ContentCreateView: View {
}
.padding(.top, 26.7)
if viewModel.price > 0 && !viewModel.isOnlyRental {
VStack(spacing: 13.3) {
Text("한정판 설정")
.font(.custom(Font.bold.rawValue, size: 16.7))
.foregroundColor(Color.grayee)
.frame(maxWidth: .infinity, alignment: .leading)
HStack(spacing: 13.3) {
SelectButtonView(title: "무제한", isChecked: !viewModel.isLimited) {
if viewModel.isLimited {
viewModel.isLimited = false
}
}
SelectButtonView(title: "한정판", isChecked: viewModel.isLimited) {
if !viewModel.isLimited {
viewModel.isLimited = true
}
}
}
if viewModel.isLimited {
TextField("한정판 개수를 입력하세요", text: $viewModel.limitedString)
.autocapitalization(.none)
.disableAutocorrection(true)
.font(.custom(Font.bold.rawValue, size: 14.7))
.foregroundColor(Color.grayee)
.cornerRadius(6.7)
.keyboardType(.numberPad)
.padding(.vertical, 17)
.padding(.horizontal, 13.3)
.background(Color.gray22)
.cornerRadius(5.3)
}
}
.padding(.top, 26.7)
}
VStack(spacing: 13.3) {
Text("미리듣기")
.font(.custom(Font.bold.rawValue, size: 16.7))