커뮤니티 유료 게시글 조회, 구매 기능 추가

This commit is contained in:
Yu Sung
2024-05-24 16:19:43 +09:00
parent 0a96509b35
commit 3ae5ea776c
13 changed files with 337 additions and 63 deletions

View File

@@ -22,19 +22,19 @@ struct CreatorCommunityItemView: View {
Text(item.creatorNickname)
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
.foregroundColor(Color.grayee)
Spacer()
Text(item.date)
.font(.custom(Font.light.rawValue, size: 13.3))
.foregroundColor(Color(hex: "777777"))
.foregroundColor(Color.gray77)
}
HStack(spacing: 0) {
Text(item.content)
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color(hex: "bbbbbb"))
.foregroundColor(Color.graybb)
.fixedSize(horizontal: false, vertical: true)
.lineLimit(3)
@@ -45,9 +45,10 @@ struct CreatorCommunityItemView: View {
.resizable()
.frame(width: 53.3, height: 53.3)
.cornerRadius(4.7)
.blur(radius: item.existOrdered ? 0 : 15)
} else {
Rectangle()
.foregroundColor(Color(hex: "222222").opacity(0))
.foregroundColor(Color.gray22.opacity(0))
.frame(width: 53.3, height: 53.3)
}
}
@@ -60,7 +61,7 @@ struct CreatorCommunityItemView: View {
Text("\(item.likeCount)")
.font(.custom(Font.medium.rawValue, size: 11))
.foregroundColor(Color(hex: "777777"))
.foregroundColor(Color.gray77)
}
HStack(spacing: 6) {
@@ -70,13 +71,13 @@ struct CreatorCommunityItemView: View {
Text("\(item.commentCount)")
.font(.custom(Font.medium.rawValue, size: 11))
.foregroundColor(Color(hex: "777777"))
.foregroundColor(Color.gray77)
}
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(13.3)
.background(Color(hex: "222222"))
.background(Color.gray22)
.cornerRadius(11)
}
}
@@ -91,10 +92,12 @@ struct CreatorCommunityItemView_Previews: PreviewProvider {
creatorProfileUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
imageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
content: "안녕하세요",
price: 10,
date: "3일전",
isCommentAvailable: false,
isAdult: false,
isLike: false,
existOrdered: false,
likeCount: 10,
commentCount: 0,
firstComment: nil