parent
d060b8620a
commit
6c0ea9595c
|
@ -134,7 +134,7 @@ enum AppStep {
|
||||||
|
|
||||||
case blockList
|
case blockList
|
||||||
|
|
||||||
case myBox
|
case myBox(currentTab: ContentBoxViewModel.CurrentTab)
|
||||||
|
|
||||||
case auditionDetail(auditionId: Int)
|
case auditionDetail(auditionId: Int)
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ struct ContentBoxView: View {
|
||||||
|
|
||||||
@State private var selectedPlaylistId = 0
|
@State private var selectedPlaylistId = 0
|
||||||
|
|
||||||
|
let initCurrentTab: ContentBoxViewModel.CurrentTab
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
|
@ -71,6 +73,9 @@ struct ContentBoxView: View {
|
||||||
OrderListAllInnerView()
|
OrderListAllInnerView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onAppear {
|
||||||
|
viewModel.currentTab = initCurrentTab
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if isShowCreatePlaylist {
|
if isShowCreatePlaylist {
|
||||||
|
@ -92,5 +97,5 @@ struct ContentBoxView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
#Preview {
|
#Preview {
|
||||||
ContentBoxView()
|
ContentBoxView(initCurrentTab: .orderlist)
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ struct ContentMainView: View {
|
||||||
|
|
||||||
Image("ic_content_keep")
|
Image("ic_content_keep")
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
AppState.shared.setAppStep(step: .myBox)
|
AppState.shared.setAppStep(step: .myBox(currentTab: .orderlist))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.bottom, 26.7)
|
.padding(.bottom, 26.7)
|
||||||
|
|
|
@ -200,8 +200,8 @@ struct ContentView: View {
|
||||||
case .blockList:
|
case .blockList:
|
||||||
BlockMemberListView()
|
BlockMemberListView()
|
||||||
|
|
||||||
case .myBox:
|
case .myBox(let currentTab):
|
||||||
ContentBoxView()
|
ContentBoxView(initCurrentTab: currentTab)
|
||||||
|
|
||||||
case .auditionDetail(let auditionId):
|
case .auditionDetail(let auditionId):
|
||||||
AuditionDetailView(auditionId: auditionId)
|
AuditionDetailView(auditionId: auditionId)
|
||||||
|
|
|
@ -71,11 +71,7 @@ struct CanCardView_Previews: PreviewProvider {
|
||||||
websiteUrl: "",
|
websiteUrl: "",
|
||||||
blogUrl: "",
|
blogUrl: "",
|
||||||
liveReservationCount: 0,
|
liveReservationCount: 0,
|
||||||
isAuth: false,
|
isAuth: false
|
||||||
orderList: GetAudioContentOrderListResponse(
|
|
||||||
totalCount: 0,
|
|
||||||
items: []
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
refresh: {}
|
refresh: {}
|
||||||
)
|
)
|
||||||
|
|
|
@ -95,11 +95,7 @@ struct MyInfoCardView_Previews: PreviewProvider {
|
||||||
websiteUrl: "",
|
websiteUrl: "",
|
||||||
blogUrl: "",
|
blogUrl: "",
|
||||||
liveReservationCount: 0,
|
liveReservationCount: 0,
|
||||||
isAuth: false,
|
isAuth: false
|
||||||
orderList: GetAudioContentOrderListResponse(
|
|
||||||
totalCount: 0,
|
|
||||||
items: []
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
refresh: {}
|
refresh: {}
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,6 +18,5 @@ struct MyPageResponse: Decodable {
|
||||||
let blogUrl: String?
|
let blogUrl: String?
|
||||||
let liveReservationCount: Int
|
let liveReservationCount: Int
|
||||||
let isAuth: Bool
|
let isAuth: Bool
|
||||||
let orderList: GetAudioContentOrderListResponse
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,16 +81,17 @@ struct MyPageView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 10.7) {
|
||||||
Text("팔로잉 리스트")
|
Text("팔로잉 리스트")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color.button)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.padding(.vertical, 13.3)
|
.padding(.vertical, 13.3)
|
||||||
.font(.custom(Font.bold.rawValue, size: 15.3))
|
.background(Color.bg)
|
||||||
.foregroundColor(Color.grayee)
|
|
||||||
.cornerRadius(6.7)
|
.cornerRadius(6.7)
|
||||||
.overlay(
|
.overlay(
|
||||||
RoundedRectangle(cornerRadius: 6.7)
|
RoundedRectangle(cornerRadius: 6.7)
|
||||||
.stroke(Color.button, lineWidth: 1)
|
.stroke(Color.button, lineWidth: 1.3)
|
||||||
)
|
)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
|
@ -98,14 +99,15 @@ struct MyPageView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
Text("차단 리스트")
|
Text("차단 리스트")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color.button)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.padding(.vertical, 13.3)
|
.padding(.vertical, 13.3)
|
||||||
.font(.custom(Font.bold.rawValue, size: 15.3))
|
.background(Color.bg)
|
||||||
.foregroundColor(Color.grayee)
|
|
||||||
.cornerRadius(6.7)
|
.cornerRadius(6.7)
|
||||||
.overlay(
|
.overlay(
|
||||||
RoundedRectangle(cornerRadius: 6.7)
|
RoundedRectangle(cornerRadius: 6.7)
|
||||||
.stroke(Color.button, lineWidth: 1)
|
.stroke(Color.button, lineWidth: 1.3)
|
||||||
)
|
)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
|
@ -132,13 +134,50 @@ struct MyPageView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReservationStatusView(data: data)
|
VStack(alignment: .leading, spacing: 13.3) {
|
||||||
.padding(.top, 33.3)
|
Text("내 보관함")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||||
|
.foregroundColor(Color.grayee)
|
||||||
|
|
||||||
if data.orderList.totalCount > 0 {
|
HStack(spacing: 10.7) {
|
||||||
OrderListView(items: data.orderList.items)
|
Text("구매목록")
|
||||||
.padding(.top, 40)
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color.button)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.padding(.vertical, 13.3)
|
||||||
|
.background(Color.bg)
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 6.7)
|
||||||
|
.stroke(Color.button, lineWidth: 1.3)
|
||||||
|
)
|
||||||
|
.contentShape(Rectangle())
|
||||||
|
.onTapGesture {
|
||||||
|
AppState.shared.setAppStep(step: .myBox(currentTab: .orderlist))
|
||||||
|
}
|
||||||
|
|
||||||
|
Text("재생목록")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||||
|
.foregroundColor(Color.button)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.padding(.vertical, 13.3)
|
||||||
|
.background(Color.bg)
|
||||||
|
.cornerRadius(6.7)
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: 6.7)
|
||||||
|
.stroke(Color.button, lineWidth: 1.3)
|
||||||
|
)
|
||||||
|
.contentShape(Rectangle())
|
||||||
|
.onTapGesture {
|
||||||
|
AppState.shared.setAppStep(step: .myBox(currentTab: .playlist))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.top, 33)
|
||||||
|
.padding(.horizontal, 13.3)
|
||||||
|
|
||||||
|
ReservationStatusView(data: data)
|
||||||
|
.padding(.top, 40)
|
||||||
|
|
||||||
ServiceCenterButtonView()
|
ServiceCenterButtonView()
|
||||||
.padding(.top, 40)
|
.padding(.top, 40)
|
||||||
|
|
|
@ -61,11 +61,7 @@ struct ReservationStatusView_Previews: PreviewProvider {
|
||||||
websiteUrl: "",
|
websiteUrl: "",
|
||||||
blogUrl: "",
|
blogUrl: "",
|
||||||
liveReservationCount: 0,
|
liveReservationCount: 0,
|
||||||
isAuth: false,
|
isAuth: false
|
||||||
orderList: GetAudioContentOrderListResponse(
|
|
||||||
totalCount: 0,
|
|
||||||
items: []
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue