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) {
|
HStack(spacing: 11) {
|
||||||
KFImage(URL(string: item.creatorProfileUrl))
|
KFImage(URL(string: item.creatorProfileUrl))
|
||||||
.cancelOnDisappear(true)
|
.cancelOnDisappear(true)
|
||||||
.downsampling(
|
|
||||||
size: CGSize(
|
|
||||||
width: 40,
|
|
||||||
height: 40
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 40, height: 40)
|
.frame(width: 40, height: 40)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
Text(item.creatorNickname)
|
Text(item.creatorNickname)
|
||||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
.font(.custom(Font.preBold.rawValue, size: 18))
|
||||||
.foregroundColor(Color.grayee)
|
.foregroundColor(Color.white)
|
||||||
|
|
||||||
Spacer()
|
|
||||||
|
|
||||||
Text(item.date)
|
Text(item.date)
|
||||||
.font(.custom(Font.light.rawValue, size: 13.3))
|
.font(.custom(Font.preRegular.rawValue, size: 14))
|
||||||
.foregroundColor(Color.gray77)
|
.foregroundColor(Color(hex: "78909C"))
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
Text(item.content)
|
Text(item.content)
|
||||||
.font(.custom(Font.medium.rawValue, size: 12))
|
.font(.custom(Font.preRegular.rawValue, size: 18))
|
||||||
.foregroundColor(Color.graybb)
|
.foregroundColor(Color(hex: "B0BEC5"))
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
.lineLimit(3)
|
.lineLimit(3)
|
||||||
|
.truncationMode(.tail)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
if let imageUrl = item.imageUrl {
|
if let imageUrl = item.imageUrl {
|
||||||
KFImage(URL(string: imageUrl))
|
KFImage(URL(string: imageUrl))
|
||||||
.cancelOnDisappear(true)
|
.cancelOnDisappear(true)
|
||||||
.downsampling(
|
|
||||||
size: CGSize(
|
|
||||||
width: 53.3,
|
|
||||||
height: 53.3
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 53.3, height: 53.3)
|
.frame(width: 64, height: 64)
|
||||||
.cornerRadius(4.7)
|
.cornerRadius(12)
|
||||||
.blur(radius: item.existOrdered || item.price <= 0 ? 0 : 15)
|
.blur(radius: item.existOrdered || item.price <= 0 ? 0 : 15)
|
||||||
} else {
|
} else {
|
||||||
Rectangle()
|
Rectangle()
|
||||||
.foregroundColor(Color.gray22.opacity(0))
|
.foregroundColor(Color.gray22.opacity(0))
|
||||||
.frame(width: 53.3, height: 53.3)
|
.frame(width: 64, height: 64)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack(spacing: 13.3) {
|
HStack(spacing: 13.3) {
|
||||||
HStack(spacing: 6) {
|
HStack(spacing: 4) {
|
||||||
Image("ic_heart_777")
|
Image("ic_heart_78909c")
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 13.3, height: 13.3)
|
.frame(width: 24, height: 24)
|
||||||
|
|
||||||
Text("\(item.likeCount)")
|
Text("\(item.likeCount)")
|
||||||
.font(.custom(Font.medium.rawValue, size: 11))
|
.font(.custom(Font.preRegular.rawValue, size: 18))
|
||||||
.foregroundColor(Color.gray77)
|
.foregroundColor(Color(hex: "78909C"))
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack(spacing: 6) {
|
HStack(spacing: 4) {
|
||||||
Image("ic_message_square_777")
|
Image("ic_comment_78909c")
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 13.3, height: 13.3)
|
.frame(width: 24, height: 24)
|
||||||
|
|
||||||
Text("\(item.commentCount)")
|
Text("\(item.commentCount)")
|
||||||
.font(.custom(Font.medium.rawValue, size: 11))
|
.font(.custom(Font.preRegular.rawValue, size: 18))
|
||||||
.foregroundColor(Color.gray77)
|
.foregroundColor(Color(hex: "78909C"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.padding(13.3)
|
.padding(16)
|
||||||
.background(Color.gray22)
|
.background(Color(hex: "263238"))
|
||||||
.cornerRadius(11)
|
.cornerRadius(16)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ enum UserDefaultsKey: String, CaseIterable {
|
|||||||
case noChatRoomList
|
case noChatRoomList
|
||||||
case devicePushToken
|
case devicePushToken
|
||||||
case isContentPlayLoop
|
case isContentPlayLoop
|
||||||
case isFollowedChannel
|
|
||||||
case isViewedOnboardingView
|
case isViewedOnboardingView
|
||||||
case notShowingEventPopupId
|
case notShowingEventPopupId
|
||||||
case isAdultContentVisible
|
case isAdultContentVisible
|
||||||
|
|||||||
@@ -39,12 +39,6 @@ final class LiveViewModel: ObservableObject {
|
|||||||
@Published var passwordDialogConfirmAction: (String) -> Void = { _ in }
|
@Published var passwordDialogConfirmAction: (String) -> Void = { _ in }
|
||||||
@Published var isShowPasswordDialog = false
|
@Published var isShowPasswordDialog = false
|
||||||
|
|
||||||
@Published var isFollowingList = UserDefaults.bool(forKey: .isFollowedChannel) {
|
|
||||||
didSet {
|
|
||||||
UserDefaults.set(isFollowingList, forKey: .isFollowedChannel)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Published var liveStartDate: String? = nil
|
@Published var liveStartDate: String? = nil
|
||||||
@Published var nowDate: String? = nil
|
@Published var nowDate: String? = nil
|
||||||
|
|
||||||
|
|||||||
@@ -12,18 +12,31 @@ struct SectionCommunityPostView: View {
|
|||||||
let items: [GetCommunityPostListResponse]
|
let items: [GetCommunityPostListResponse]
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
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) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
HStack(spacing: 13.3) {
|
HStack(spacing: 16) {
|
||||||
ForEach(0..<items.count, id: \.self) { index in
|
ForEach(0..<items.count, id: \.self) { index in
|
||||||
let item = items[index]
|
let item = items[index]
|
||||||
CreatorCommunityItemView(item: item)
|
CreatorCommunityItemView(item: item)
|
||||||
.frame(width: 320)
|
.frame(width: screenSize().width - 48)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
AppState.shared
|
AppState.shared
|
||||||
.setAppStep(step: .creatorCommunityAll(creatorId: item.creatorId))
|
.setAppStep(step: .creatorCommunityAll(creatorId: item.creatorId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding(.horizontal, 24)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user