feat(creator-profile): 최신 콘텐츠 UI 추가
This commit is contained in:
@@ -41,30 +41,128 @@ struct UserProfileView: View {
|
||||
.clipped()
|
||||
}
|
||||
|
||||
if let item = creatorProfile.latestContent {
|
||||
HStack(spacing: 16) {
|
||||
KFImage(URL(string: item.coverImageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(size: CGSize(width: 133, height: 133))
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: 133, height: 133, alignment: .top)
|
||||
.clipped()
|
||||
.cornerRadius(12)
|
||||
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("최신 콘텐츠")
|
||||
.font(.custom(Font.preMedium.rawValue, size: 12))
|
||||
.foregroundColor(.button)
|
||||
.padding(.horizontal, 7)
|
||||
.padding(.vertical, 4)
|
||||
.background(Color(hex: "263238"))
|
||||
.cornerRadius(4)
|
||||
.overlay {
|
||||
RoundedRectangle(cornerRadius: 4)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(.button)
|
||||
}
|
||||
|
||||
HStack(spacing: 8) {
|
||||
if item.isScheduledToOpen {
|
||||
Text("오픈예정")
|
||||
.font(.custom(Font.preMedium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "3bb9f1"))
|
||||
.padding(2.6)
|
||||
.background(Color(hex: "003851"))
|
||||
.cornerRadius(2.6)
|
||||
}
|
||||
|
||||
Text(item.themeStr)
|
||||
.font(.custom(Font.preMedium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "3bac6a"))
|
||||
.padding(2.6)
|
||||
.background(Color(hex: "28312b"))
|
||||
.cornerRadius(2.6)
|
||||
|
||||
Text(item.duration!)
|
||||
.font(.custom(Font.preMedium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.padding(2.6)
|
||||
.background(Color(hex: "222222"))
|
||||
.cornerRadius(2.6)
|
||||
|
||||
if item.isPointAvailable {
|
||||
Text("포인트")
|
||||
.font(.custom(Font.preMedium.rawValue, size: 12))
|
||||
.foregroundColor(.white)
|
||||
.padding(2.6)
|
||||
.background(Color(hex: "7849bc"))
|
||||
.cornerRadius(2.6)
|
||||
}
|
||||
}
|
||||
|
||||
Text(item.title)
|
||||
.font(.custom(Font.preMedium.rawValue, size: 18))
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.leading)
|
||||
|
||||
HStack(spacing: 14) {
|
||||
HStack(spacing: 6) {
|
||||
Image("ic_heart_777")
|
||||
.resizable()
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Text("\(item.likeCount)")
|
||||
.font(.custom(Font.preMedium.rawValue, size: 18))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
}
|
||||
|
||||
HStack(spacing: 6) {
|
||||
Image("ic_message_square_777")
|
||||
.resizable()
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Text("\(item.commentCount)")
|
||||
.font(.custom(Font.preMedium.rawValue, size: 18))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(alignment: .leading)
|
||||
.padding(.horizontal, 24)
|
||||
.onTapGesture {
|
||||
AppState.shared
|
||||
.setAppStep(step: .contentDetail(contentId: item.contentId))
|
||||
}
|
||||
}
|
||||
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) || creatorProfile.liveRoomList.count > 0 {
|
||||
VStack(alignment: .leading, spacing: 26.7) {
|
||||
VStack(alignment: .leading, spacing: 14) {
|
||||
Text("라이브")
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color.grayee)
|
||||
.font(.custom(Font.preBold.rawValue, size: 26))
|
||||
.foregroundColor(Color.white)
|
||||
|
||||
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
|
||||
HStack(spacing: 8) {
|
||||
Text("룰렛 설정")
|
||||
.font(.custom(Font.bold.rawValue, size: 15))
|
||||
.font(.custom(Font.preBold.rawValue, size: 16))
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(.vertical, 17)
|
||||
.padding(.vertical, 12)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color.button)
|
||||
.cornerRadius(5.3)
|
||||
.cornerRadius(12)
|
||||
.onTapGesture { isShowRouletteSettings = true }
|
||||
|
||||
Text("메뉴 설정")
|
||||
.font(.custom(Font.bold.rawValue, size: 15))
|
||||
.font(.custom(Font.preBold.rawValue, size: 16))
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(.vertical, 17)
|
||||
.padding(.vertical, 12)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color.button)
|
||||
.cornerRadius(5.3)
|
||||
.cornerRadius(12)
|
||||
.onTapGesture { isShowMenuSettings = true }
|
||||
}
|
||||
}
|
||||
@@ -377,7 +475,7 @@ struct UserProfileView: View {
|
||||
Text(viewModel.errorMessage)
|
||||
.padding(.vertical, 13.3)
|
||||
.frame(width: screenSize().width - 66.7, alignment: .center)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.font(.custom(Font.preMedium.rawValue, size: 12))
|
||||
.background(Color.button)
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.leading)
|
||||
|
||||
Reference in New Issue
Block a user