feat: 메인 라이브
- 커뮤니티 신규 UI 사이즈 적용
This commit is contained in:
21
SodaLive/Resources/Assets.xcassets/ic_comment_78909c.imageset/Contents.json
vendored
Normal file
21
SodaLive/Resources/Assets.xcassets/ic_comment_78909c.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "ic_comment_78909c.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
SodaLive/Resources/Assets.xcassets/ic_comment_78909c.imageset/ic_comment_78909c.png
vendored
Normal file
BIN
SodaLive/Resources/Assets.xcassets/ic_comment_78909c.imageset/ic_comment_78909c.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 656 B |
21
SodaLive/Resources/Assets.xcassets/ic_heart_78909c.imageset/Contents.json
vendored
Normal file
21
SodaLive/Resources/Assets.xcassets/ic_heart_78909c.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "ic_heart_78909c.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
SodaLive/Resources/Assets.xcassets/ic_heart_78909c.imageset/ic_heart_78909c.png
vendored
Normal file
BIN
SodaLive/Resources/Assets.xcassets/ic_heart_78909c.imageset/ic_heart_78909c.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 677 B |
@@ -17,82 +17,73 @@ struct CreatorCommunityItemView: View {
|
||||
HStack(spacing: 11) {
|
||||
KFImage(URL(string: item.creatorProfileUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(
|
||||
size: CGSize(
|
||||
width: 40,
|
||||
height: 40
|
||||
)
|
||||
)
|
||||
.resizable()
|
||||
.frame(width: 40, height: 40)
|
||||
.clipShape(Circle())
|
||||
|
||||
Text(item.creatorNickname)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(item.creatorNickname)
|
||||
.font(.custom(Font.preBold.rawValue, size: 18))
|
||||
.foregroundColor(Color.white)
|
||||
|
||||
Text(item.date)
|
||||
.font(.custom(Font.preRegular.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "78909C"))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Text(item.date)
|
||||
.font(.custom(Font.light.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text(item.content)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color.graybb)
|
||||
.font(.custom(Font.preRegular.rawValue, size: 18))
|
||||
.foregroundColor(Color(hex: "B0BEC5"))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.lineLimit(3)
|
||||
.truncationMode(.tail)
|
||||
|
||||
Spacer()
|
||||
|
||||
if let imageUrl = item.imageUrl {
|
||||
KFImage(URL(string: imageUrl))
|
||||
.cancelOnDisappear(true)
|
||||
.downsampling(
|
||||
size: CGSize(
|
||||
width: 53.3,
|
||||
height: 53.3
|
||||
)
|
||||
)
|
||||
.resizable()
|
||||
.frame(width: 53.3, height: 53.3)
|
||||
.cornerRadius(4.7)
|
||||
.frame(width: 64, height: 64)
|
||||
.cornerRadius(12)
|
||||
.blur(radius: item.existOrdered || item.price <= 0 ? 0 : 15)
|
||||
} else {
|
||||
Rectangle()
|
||||
.foregroundColor(Color.gray22.opacity(0))
|
||||
.frame(width: 53.3, height: 53.3)
|
||||
.frame(width: 64, height: 64)
|
||||
}
|
||||
}
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
HStack(spacing: 6) {
|
||||
Image("ic_heart_777")
|
||||
HStack(spacing: 4) {
|
||||
Image("ic_heart_78909c")
|
||||
.resizable()
|
||||
.frame(width: 13.3, height: 13.3)
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Text("\(item.likeCount)")
|
||||
.font(.custom(Font.medium.rawValue, size: 11))
|
||||
.foregroundColor(Color.gray77)
|
||||
.font(.custom(Font.preRegular.rawValue, size: 18))
|
||||
.foregroundColor(Color(hex: "78909C"))
|
||||
}
|
||||
|
||||
HStack(spacing: 6) {
|
||||
Image("ic_message_square_777")
|
||||
HStack(spacing: 4) {
|
||||
Image("ic_comment_78909c")
|
||||
.resizable()
|
||||
.frame(width: 13.3, height: 13.3)
|
||||
.frame(width: 24, height: 24)
|
||||
|
||||
Text("\(item.commentCount)")
|
||||
.font(.custom(Font.medium.rawValue, size: 11))
|
||||
.foregroundColor(Color.gray77)
|
||||
.font(.custom(Font.preRegular.rawValue, size: 18))
|
||||
.foregroundColor(Color(hex: "78909C"))
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(13.3)
|
||||
.background(Color.gray22)
|
||||
.cornerRadius(11)
|
||||
.padding(16)
|
||||
.background(Color(hex: "263238"))
|
||||
.cornerRadius(16)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ enum UserDefaultsKey: String, CaseIterable {
|
||||
case noChatRoomList
|
||||
case devicePushToken
|
||||
case isContentPlayLoop
|
||||
case isFollowedChannel
|
||||
case isViewedOnboardingView
|
||||
case notShowingEventPopupId
|
||||
case isAdultContentVisible
|
||||
|
||||
@@ -39,12 +39,6 @@ final class LiveViewModel: ObservableObject {
|
||||
@Published var passwordDialogConfirmAction: (String) -> Void = { _ in }
|
||||
@Published var isShowPasswordDialog = false
|
||||
|
||||
@Published var isFollowingList = UserDefaults.bool(forKey: .isFollowedChannel) {
|
||||
didSet {
|
||||
UserDefaults.set(isFollowingList, forKey: .isFollowedChannel)
|
||||
}
|
||||
}
|
||||
|
||||
@Published var liveStartDate: String? = nil
|
||||
@Published var nowDate: String? = nil
|
||||
|
||||
|
||||
@@ -12,17 +12,30 @@ struct SectionCommunityPostView: View {
|
||||
let items: [GetCommunityPostListResponse]
|
||||
|
||||
var body: some View {
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 13.3) {
|
||||
ForEach(0..<items.count, id: \.self) { index in
|
||||
let item = items[index]
|
||||
CreatorCommunityItemView(item: item)
|
||||
.frame(width: 320)
|
||||
.onTapGesture {
|
||||
AppState.shared
|
||||
.setAppStep(step: .creatorCommunityAll(creatorId: item.creatorId))
|
||||
}
|
||||
VStack(spacing: 16) {
|
||||
HStack(spacing: 0) {
|
||||
Text("커뮤니티")
|
||||
.font(.custom(Font.preBold.rawValue, size: 24))
|
||||
.foregroundColor(.button)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, 24)
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(spacing: 16) {
|
||||
ForEach(0..<items.count, id: \.self) { index in
|
||||
let item = items[index]
|
||||
CreatorCommunityItemView(item: item)
|
||||
.frame(width: screenSize().width - 48)
|
||||
.onTapGesture {
|
||||
AppState.shared
|
||||
.setAppStep(step: .creatorCommunityAll(creatorId: item.creatorId))
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 24)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user