크리에이터 채널 페이지 추가

This commit is contained in:
Yu Sung
2023-08-11 18:33:48 +09:00
parent a167840162
commit a8338e6fea
69 changed files with 4087 additions and 10 deletions

View File

@@ -0,0 +1,203 @@
//
// LiveReservationCompleteView.swift
// SodaLive
//
// Created by klaus on 2023/08/11.
//
import SwiftUI
struct LiveReservationCompleteView: View {
let reservationCompleteData: MakeLiveReservationResponse
var body: some View {
BaseView {
VStack(spacing: 0) {
DetailNavigationBar(title: "라이브 예약 완료") {
AppState.shared.setAppStep(step: .main)
}
ScrollView(.vertical, showsIndicators: false) {
VStack(spacing: 0) {
Text("예약이 완료되었습니다.")
.font(.custom(Font.bold.rawValue, size: 20))
.foregroundColor(Color(hex: "a285eb"))
.frame(width: screenSize().width - 26.7, alignment: .leading)
.padding(.top, 20)
Image("img_compleate_book")
.resizable()
.scaledToFit()
.frame(width: 233.25)
.padding(.top, 16.7)
.padding(.bottom, 26.7)
Text("라이브 예약정보")
.font(.custom(Font.bold.rawValue, size: 16.7))
.foregroundColor(Color(hex: "eeeeee"))
.frame(width: screenSize().width - 53.4, alignment: .leading)
VStack(spacing: 6.7) {
HStack(spacing: 26.7) {
Text("채널")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "777777"))
Text(reservationCompleteData.nickname)
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
}
.frame(width: screenSize().width - 53.4, alignment: .leading)
HStack(spacing: 26.7) {
Text("구매내역")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "777777"))
Text(reservationCompleteData.title)
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
}
.frame(width: screenSize().width - 53.4, alignment: .leading)
HStack(spacing: 26.7) {
Text("예약일자")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "777777"))
Text(reservationCompleteData.beginDateString)
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
}
.frame(width: screenSize().width - 53.4, alignment: .leading)
HStack(spacing: 26.7) {
Text("라이브 비용")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "777777"))
Text(reservationCompleteData.price)
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
}
.frame(width: screenSize().width - 53.4, alignment: .leading)
}
.padding(.top, 16.7)
Rectangle()
.frame(width: screenSize().width, height: 6.7)
.foregroundColor(Color(hex: "232323"))
.padding(.vertical, 20)
Text("결제정보")
.font(.custom(Font.bold.rawValue, size: 16.7))
.foregroundColor(Color(hex: "eeeeee"))
.frame(width: screenSize().width - 53.4, alignment: .leading)
VStack(spacing: 13.3) {
HStack(spacing: 0) {
Text("보유코인")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "777777"))
Spacer()
Text("\(reservationCompleteData.haveCan)")
.font(.custom(Font.bold.rawValue, size: 15.3))
.foregroundColor(Color(hex: "eeeeee"))
Text(" 코인")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
}
.frame(width: screenSize().width - 53.4, alignment: .leading)
HStack(spacing: 0) {
Text("결제코인")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "777777"))
Spacer()
Text("\(reservationCompleteData.useCan)")
.font(.custom(Font.bold.rawValue, size: 15.3))
.foregroundColor(Color(hex: "eeeeee"))
Text(" 코인")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
}
.frame(width: screenSize().width - 53.4, alignment: .leading)
HStack(spacing: 0) {
Text("잔여코인")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "777777"))
Spacer()
Text("\(reservationCompleteData.remainingCan)")
.font(.custom(Font.bold.rawValue, size: 15.3))
.foregroundColor(Color(hex: "eeeeee"))
Text(" 코인")
.font(.custom(Font.medium.rawValue, size: 14.7))
.foregroundColor(Color(hex: "eeeeee"))
}
.frame(width: screenSize().width - 53.4, alignment: .leading)
}
.padding(.top, 20)
HStack(spacing: 13.3) {
Text("홈으로 이동")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(Color(hex: "9970ff"))
.padding(.vertical, 16)
.frame(width: (screenSize().width - 40) / 2)
.background(Color(hex: "9970ff").opacity(0.2))
.cornerRadius(10)
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(lineWidth: 1)
.foregroundColor(Color(hex: "9970ff"))
)
.onTapGesture {
AppState.shared.setAppStep(step: .main)
}
Text("예약 내역 이동")
.font(.custom(Font.bold.rawValue, size: 18.3))
.foregroundColor(.white)
.padding(.vertical, 16)
.frame(width: (screenSize().width - 40) / 2)
.background(Color(hex: "9970ff"))
.cornerRadius(10)
.onTapGesture {
AppState.shared.setAppStep(step: .liveReservation)
}
}
.padding(.vertical, 26.7)
}
}
}
}
}
}
struct LiveReservationCompleteView_Previews: PreviewProvider {
static var previews: some View {
LiveReservationCompleteView(
reservationCompleteData: MakeLiveReservationResponse(
reservationId: 10,
nickname: "김상담",
title: "여자들이 좋아하는 남자 스타일은?",
beginDateString: "2021년 7월 9일 (금), 오후 02:00",
price: "무료",
haveCan: 100,
useCan: 0,
remainingCan: 100
)
)
}
}

View File

@@ -0,0 +1,15 @@
//
// MakeLiveReservationRequest.swift
// SodaLive
//
// Created by klaus on 2023/08/11.
//
import Foundation
struct MakeLiveReservationRequest: Encodable {
let roomId: Int
let password: Int?
let container: String = "ios"
let timezone: String = TimeZone.current.identifier
}

View File

@@ -0,0 +1,19 @@
//
// MakeLiveReservationResponse.swift
// SodaLive
//
// Created by klaus on 2023/08/11.
//
import Foundation
struct MakeLiveReservationResponse: Decodable {
let reservationId: Int
let nickname: String
let title: String
let beginDateString: String
let price: String
let haveCan: Int
let useCan: Int
let remainingCan: Int
}