feat(creator): 라이브 탭 UI를 마무리한다
This commit is contained in:
@@ -4,24 +4,30 @@ struct CreatorChannelLiveStartButton: View {
|
||||
let action: () -> Void
|
||||
|
||||
var body: some View {
|
||||
Button(action: action) {
|
||||
HStack(spacing: SodaSpacing.s6) {
|
||||
Image("ic_new_create_live")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Text(I18n.CreatorChannelLive.startLive)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.lineLimit(1)
|
||||
VStack {
|
||||
Button(action: action) {
|
||||
HStack(spacing: SodaSpacing.s6) {
|
||||
Image("ic_new_create_live")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Text(I18n.CreatorChannelLive.startLive)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
.foregroundColor(.white)
|
||||
.lineLimit(1)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: 52)
|
||||
.padding(.horizontal, SodaSpacing.s14)
|
||||
.background(Color.soda400)
|
||||
.clipShape(Capsule())
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: 56)
|
||||
.background(Color.soda400)
|
||||
.clipShape(Capsule())
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.padding(.top, SodaSpacing.s14)
|
||||
.padding(.bottom, 34)
|
||||
.background(Color.black)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,21 +5,12 @@ struct CreatorChannelLiveTabView: View {
|
||||
let isOwnCreatorChannel: Bool
|
||||
let onTapLive: (Int) -> Void
|
||||
let onTapContent: (Int) -> Void
|
||||
let onTapCreateLive: () -> Void
|
||||
|
||||
@StateObject private var viewModel = CreatorChannelLiveViewModel()
|
||||
@State private var isSortSheetPresented = false
|
||||
|
||||
var body: some View {
|
||||
ZStack(alignment: .bottom) {
|
||||
content
|
||||
|
||||
if isOwnCreatorChannel {
|
||||
CreatorChannelLiveStartButton(action: onTapCreateLive)
|
||||
.padding(.horizontal, SodaSpacing.s20)
|
||||
.padding(.bottom, SodaSpacing.s20)
|
||||
}
|
||||
}
|
||||
content
|
||||
.background(Color.black)
|
||||
.onAppear {
|
||||
if viewModel.hasLoaded == false {
|
||||
@@ -38,7 +29,6 @@ struct CreatorChannelLiveTabView: View {
|
||||
private var content: some View {
|
||||
VStack(spacing: 0) {
|
||||
CreatorChannelSortBar(
|
||||
totalCount: viewModel.response?.liveReplayContentCount ?? 0,
|
||||
selectedSort: viewModel.selectedSort,
|
||||
onTapSort: {
|
||||
isSortSheetPresented = true
|
||||
@@ -67,7 +57,7 @@ struct CreatorChannelLiveTabView: View {
|
||||
.padding(.vertical, SodaSpacing.s20)
|
||||
}
|
||||
}
|
||||
.padding(.bottom, isOwnCreatorChannel ? 96 : SodaSpacing.s20)
|
||||
.padding(.bottom, isOwnCreatorChannel ? 70 : SodaSpacing.s20)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,8 +68,7 @@ struct CreatorChannelLiveTabView_Previews: PreviewProvider {
|
||||
creatorId: 1,
|
||||
isOwnCreatorChannel: true,
|
||||
onTapLive: { _ in },
|
||||
onTapContent: { _ in },
|
||||
onTapCreateLive: {}
|
||||
onTapContent: { _ in }
|
||||
)
|
||||
.background(Color.black)
|
||||
.previewLayout(.sizeThatFits)
|
||||
|
||||
Reference in New Issue
Block a user