재생목록 만들기 페이지 추가
This commit is contained in:
@@ -11,44 +11,67 @@ struct ContentBoxView: View {
|
||||
|
||||
@StateObject var viewModel = ContentBoxViewModel()
|
||||
|
||||
@State private var isShowCreatePlaylist = false
|
||||
@State private var isReloadData = false
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
VStack(spacing: 13.3) {
|
||||
DetailNavigationBar(title: "내 보관함")
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 12) {
|
||||
ContentBoxTabView(
|
||||
title: "구매목록",
|
||||
isSelected: viewModel.currentTab == .orderlist
|
||||
)
|
||||
.onTapGesture {
|
||||
if viewModel.currentTab != .orderlist {
|
||||
viewModel.currentTab = .orderlist
|
||||
ZStack {
|
||||
NavigationView {
|
||||
VStack(spacing: 13.3) {
|
||||
DetailNavigationBar(title: "내 보관함")
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 12) {
|
||||
ContentBoxTabView(
|
||||
title: "구매목록",
|
||||
isSelected: viewModel.currentTab == .orderlist
|
||||
)
|
||||
.onTapGesture {
|
||||
if viewModel.currentTab != .orderlist {
|
||||
viewModel.currentTab = .orderlist
|
||||
}
|
||||
}
|
||||
|
||||
ContentBoxTabView(
|
||||
title: "재생목록",
|
||||
isSelected: viewModel.currentTab == .playlist
|
||||
)
|
||||
.onTapGesture {
|
||||
if viewModel.currentTab != .playlist {
|
||||
viewModel.currentTab = .playlist
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentBoxTabView(
|
||||
title: "재생목록",
|
||||
isSelected: viewModel.currentTab == .playlist
|
||||
)
|
||||
.onTapGesture {
|
||||
if viewModel.currentTab != .playlist {
|
||||
viewModel.currentTab = .playlist
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 13.3)
|
||||
}
|
||||
|
||||
if viewModel.currentTab == .playlist {
|
||||
ContentPlaylistListView()
|
||||
.padding(.bottom, 13.3)
|
||||
.padding(.horizontal, 13.3)
|
||||
} else {
|
||||
OrderListAllInnerView()
|
||||
}
|
||||
|
||||
if viewModel.currentTab == .playlist {
|
||||
if isReloadData {
|
||||
Color.clear
|
||||
.onAppear {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||
isReloadData = false
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ContentPlaylistListView(
|
||||
onClickCreate: { isShowCreatePlaylist = true }
|
||||
)
|
||||
.padding(.bottom, 13.3)
|
||||
.padding(.horizontal, 13.3)
|
||||
}
|
||||
} else {
|
||||
OrderListAllInnerView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if isShowCreatePlaylist {
|
||||
ContentPlaylistCreateView(
|
||||
isShowing: $isShowCreatePlaylist,
|
||||
reloadData: $isReloadData
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user