콘텐츠 상세 - 대여만 가능한 콘텐츠의 경우 소장 버튼이 보이지 않고 가격의 100%가 보이도록 수정
This commit is contained in:
@@ -12,6 +12,7 @@ struct ContentOrderDialogView: View {
|
||||
@Binding var isShowing: Bool
|
||||
|
||||
let price: Int
|
||||
let isOnlyRental: Bool
|
||||
let onTapPurchase: (OrderType) -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -31,7 +32,7 @@ struct ContentOrderDialogView: View {
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(.white)
|
||||
|
||||
Text("(이용기간 7일)")
|
||||
Text("(이용기간 15일)")
|
||||
.font(.custom(Font.light.rawValue, size: 12))
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
@@ -43,7 +44,7 @@ struct ContentOrderDialogView: View {
|
||||
.resizable()
|
||||
.frame(width: 16.7, height: 16.7)
|
||||
|
||||
Text("\(Int(ceil(Double(price) * 0.6)))")
|
||||
Text(isOnlyRental ? "\(price)" : "\(Int(ceil(Double(price) * 0.6)))")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
}
|
||||
@@ -57,35 +58,37 @@ struct ContentOrderDialogView: View {
|
||||
}
|
||||
}
|
||||
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 5.3) {
|
||||
Text("소장")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(.white)
|
||||
if !isOnlyRental {
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 5.3) {
|
||||
Text("소장")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(.white)
|
||||
|
||||
Text("(서비스 종료시까지)")
|
||||
.font(.custom(Font.light.rawValue, size: 12))
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
|
||||
Text("(서비스 종료시까지)")
|
||||
.font(.custom(Font.light.rawValue, size: 12))
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
HStack(spacing: 8) {
|
||||
Image("ic_can")
|
||||
.resizable()
|
||||
.frame(width: 16.7, height: 16.7)
|
||||
Spacer()
|
||||
|
||||
Text("\(price)")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
.padding(.horizontal, 13.3)
|
||||
.background(Color(hex: "9970ff"))
|
||||
.cornerRadius(5.3)
|
||||
.onTapGesture {
|
||||
onTapPurchase(.KEEP)
|
||||
isShowing = false
|
||||
HStack(spacing: 8) {
|
||||
Image("ic_can")
|
||||
.resizable()
|
||||
.frame(width: 16.7, height: 16.7)
|
||||
|
||||
Text("\(price)")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
.padding(.horizontal, 13.3)
|
||||
.background(Color(hex: "9970ff"))
|
||||
.cornerRadius(5.3)
|
||||
.onTapGesture {
|
||||
onTapPurchase(.KEEP)
|
||||
isShowing = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user