커뮤니티 댓글, 팬토크, 콘텐츠 댓글
- 프로필 이미지 터치시 차단, 신고가 가능한 유저 프로필 표시
This commit is contained in:
@@ -17,6 +17,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
|
||||
let modifyComment: (Int, String) -> Void
|
||||
let onClickDelete: (Int) -> Void
|
||||
let onClickProfile: (Int) -> Void
|
||||
|
||||
@State var isShowPopupMenu: Bool = false
|
||||
@State var isModeModify: Bool = false
|
||||
@@ -30,6 +31,11 @@ struct CreatorCommunityCommentItemView: View {
|
||||
.resizable()
|
||||
.frame(width: 40, height: 40)
|
||||
.clipShape(Circle())
|
||||
.onTapGesture {
|
||||
if UserDefaults.int(forKey: .userId) != commentItem.writerId {
|
||||
onClickProfile(commentItem.writerId)
|
||||
}
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(commentItem.nickname)
|
||||
@@ -38,7 +44,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
|
||||
Text(commentItem.date)
|
||||
.font(.custom(Font.medium.rawValue, size: 10.3))
|
||||
.foregroundColor(Color(hex: "525252"))
|
||||
.foregroundColor(Color.gray52)
|
||||
.padding(.top, 4)
|
||||
}
|
||||
|
||||
@@ -57,8 +63,8 @@ struct CreatorCommunityCommentItemView: View {
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.accentColor(Color(hex: "3bb9f1"))
|
||||
.foregroundColor(Color.grayee)
|
||||
.accentColor(Color.button)
|
||||
.keyboardType(.default)
|
||||
.padding(.horizontal, 13.3)
|
||||
|
||||
|
@@ -17,6 +17,10 @@ struct CreatorCommunityCommentListView: View {
|
||||
|
||||
@State private var commentId: Int = 0
|
||||
@State private var isShowDeletePopup: Bool = false
|
||||
|
||||
@State private var memberId: Int = 0
|
||||
@State private var isShowMemberProfilePopup: Bool = false
|
||||
|
||||
@StateObject var viewModel = CreatorCommunityCommentListViewModel()
|
||||
|
||||
var body: some View {
|
||||
@@ -115,6 +119,10 @@ struct CreatorCommunityCommentListView: View {
|
||||
onClickDelete: {
|
||||
commentId = $0
|
||||
isShowDeletePopup = true
|
||||
},
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 26.7)
|
||||
@@ -147,6 +155,10 @@ struct CreatorCommunityCommentListView: View {
|
||||
)
|
||||
}
|
||||
|
||||
if isShowMemberProfilePopup {
|
||||
MemberProfileDialog(isShowing: $isShowMemberProfilePopup, memberId: memberId)
|
||||
}
|
||||
|
||||
if viewModel.isLoading {
|
||||
LoadingView()
|
||||
}
|
||||
|
@@ -20,6 +20,9 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
@State private var commentId: Int = 0
|
||||
@State private var isShowDeletePopup: Bool = false
|
||||
|
||||
@State private var memberId: Int = 0
|
||||
@State private var isShowMemberProfilePopup: Bool = false
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
VStack(spacing: 0) {
|
||||
@@ -98,7 +101,11 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
isReplyComment: true,
|
||||
isShowPopupMenuButton: false,
|
||||
modifyComment: { _, _ in },
|
||||
onClickDelete: { _ in }
|
||||
onClickDelete: { _ in },
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 26.7)
|
||||
.padding(.bottom, 13.3)
|
||||
@@ -120,6 +127,10 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
onClickDelete: {
|
||||
commentId = $0
|
||||
isShowDeletePopup = true
|
||||
},
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 26.7)
|
||||
@@ -154,6 +165,10 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
)
|
||||
}
|
||||
|
||||
if isShowMemberProfilePopup {
|
||||
MemberProfileDialog(isShowing: $isShowMemberProfilePopup, memberId: memberId)
|
||||
}
|
||||
|
||||
if viewModel.isLoading {
|
||||
LoadingView()
|
||||
}
|
||||
|
@@ -16,6 +16,9 @@ struct UserProfileFanTalkAllView: View {
|
||||
@State private var cheersContent: String = ""
|
||||
@State private var cheersId: Int = 0
|
||||
|
||||
@State private var memberId: Int = 0
|
||||
@State private var isShowMemberProfilePopup: Bool = false
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { proxy in
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
@@ -26,17 +29,17 @@ struct UserProfileFanTalkAllView: View {
|
||||
HStack(spacing: 6.7) {
|
||||
Text("응원")
|
||||
.font(.custom(Font.medium.rawValue, size: 14.7))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Text("\(viewModel.cheersTotalCount)")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
.padding(.top, 20)
|
||||
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(hex: "909090").opacity(0.5))
|
||||
.foregroundColor(Color.gray90.opacity(0.5))
|
||||
.padding(.top, 13.3)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
@@ -44,8 +47,8 @@ struct UserProfileFanTalkAllView: View {
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.accentColor(Color(hex: "3bb9f1"))
|
||||
.foregroundColor(Color.grayee)
|
||||
.accentColor(Color.button)
|
||||
.keyboardType(.default)
|
||||
.padding(.horizontal, 13.3)
|
||||
|
||||
@@ -61,18 +64,18 @@ struct UserProfileFanTalkAllView: View {
|
||||
cheersContent = ""
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "232323"))
|
||||
.background(Color.gray23)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: "3bb9f1"))
|
||||
.foregroundColor(Color.button)
|
||||
)
|
||||
.padding(.top, 13.3)
|
||||
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(hex: "909090").opacity(0.5))
|
||||
.foregroundColor(Color.gray90.opacity(0.5))
|
||||
.padding(.top, 13.3)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
@@ -96,6 +99,10 @@ struct UserProfileFanTalkAllView: View {
|
||||
onClickDelete: { cheersId in
|
||||
self.cheersId = cheersId
|
||||
viewModel.isShowCheersDeleteView = true
|
||||
},
|
||||
onClickProfile: {
|
||||
self.memberId = $0
|
||||
self.isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
.onAppear {
|
||||
@@ -110,7 +117,7 @@ struct UserProfileFanTalkAllView: View {
|
||||
} else {
|
||||
Text("응원이 없습니다.\n\n처음으로 응원을 해보세요!")
|
||||
.font(.custom(Font.light.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "bbbbbb"))
|
||||
.foregroundColor(Color.graybb)
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding(.vertical, 60)
|
||||
@@ -136,7 +143,7 @@ struct UserProfileFanTalkAllView: View {
|
||||
.padding(.vertical, 13.3)
|
||||
.frame(width: screenSize().width - 66.7, alignment: .center)
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.background(Color(hex: "9970ff"))
|
||||
.background(Color.button)
|
||||
.foregroundColor(Color.white)
|
||||
.multilineTextAlignment(.leading)
|
||||
.cornerRadius(20)
|
||||
@@ -171,6 +178,10 @@ struct UserProfileFanTalkAllView: View {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if isShowMemberProfilePopup {
|
||||
MemberProfileDialog(isShowing: $isShowMemberProfilePopup, memberId: memberId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
let modifyCheer: (Int, String) -> Void
|
||||
let reportPopup: (Int) -> Void
|
||||
let onClickDelete: (Int) -> Void
|
||||
let onClickProfile: (Int) -> Void
|
||||
|
||||
@State var replyContent: String = ""
|
||||
@State var isShowInputReply = false
|
||||
@@ -34,6 +35,11 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
.resizable()
|
||||
.frame(width: 33.3, height: 33.3)
|
||||
.clipShape(Circle())
|
||||
.onTapGesture {
|
||||
if UserDefaults.int(forKey: .userId) != cheersItem.memberId {
|
||||
onClickProfile(cheersItem.memberId)
|
||||
}
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text("\(cheersItem.nickname)")
|
||||
@@ -51,10 +57,10 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(13.3)
|
||||
.background(Color(hex: "232323"))
|
||||
.accentColor(Color(hex: "3bb9f1"))
|
||||
.background(Color.gray23)
|
||||
.accentColor(Color.button)
|
||||
.keyboardType(.default)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
@@ -65,7 +71,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
|
||||
Text("수정")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "ffffff"))
|
||||
.foregroundColor(Color.white)
|
||||
.padding(13.3)
|
||||
.background(Color.button)
|
||||
.cornerRadius(6.7)
|
||||
@@ -78,7 +84,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color.button)
|
||||
.padding(13.3)
|
||||
.background(Color(hex: "222222"))
|
||||
.background(Color.gray22)
|
||||
.cornerRadius(6.7)
|
||||
.onTapGesture {
|
||||
isModeModify = false
|
||||
@@ -100,23 +106,23 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
.padding(13.3)
|
||||
.background(Color(hex: "232323"))
|
||||
.accentColor(Color(hex: "3bb9f1"))
|
||||
.background(Color.gray23)
|
||||
.accentColor(Color.button)
|
||||
.keyboardType(.default)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: "3bb9f1"))
|
||||
.foregroundColor(Color.button)
|
||||
)
|
||||
|
||||
Text("등록")
|
||||
.font(.custom(Font.bold.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "ffffff"))
|
||||
.foregroundColor(Color.white)
|
||||
.padding(13.3)
|
||||
.background(Color(hex: "3bb9f1"))
|
||||
.background(Color.button)
|
||||
.cornerRadius(6.7)
|
||||
.onTapGesture {
|
||||
if cheersItem.replyList.count > 0 {
|
||||
@@ -182,7 +188,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(hex: "909090").opacity(0.5))
|
||||
.foregroundColor(Color.gray90.opacity(0.5))
|
||||
.padding(.top, 13.3)
|
||||
}
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
@@ -192,7 +198,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
if cheersItem.memberId != UserDefaults.int(forKey: .userId) {
|
||||
Text("신고하기")
|
||||
.font(.custom(Font.medium.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.onTapGesture {
|
||||
reportPopup(cheersItem.cheersId)
|
||||
isShowPopupMenu = false
|
||||
@@ -202,7 +208,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
if cheersItem.memberId == UserDefaults.int(forKey: .userId) {
|
||||
Text("수정")
|
||||
.font(.custom(Font.medium.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.onTapGesture {
|
||||
isModeModify = true
|
||||
isShowPopupMenu = false
|
||||
@@ -215,7 +221,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
{
|
||||
Text("삭제")
|
||||
.font(.custom(Font.medium.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.onTapGesture {
|
||||
onClickDelete(cheersItem.cheersId)
|
||||
isShowPopupMenu = false
|
||||
@@ -223,7 +229,7 @@ struct UserProfileFanTalkCheersItemView: View {
|
||||
}
|
||||
}
|
||||
.padding(10)
|
||||
.background(Color(hex: "222222"))
|
||||
.background(Color.gray22)
|
||||
}
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
|
@@ -17,6 +17,7 @@ struct UserProfileFanTalkView: View {
|
||||
let errorPopup: (String) -> Void
|
||||
let reportPopup: (Int) -> Void
|
||||
let deletePopup: (Int) -> Void
|
||||
let profilePopup: (Int) -> Void
|
||||
|
||||
@Binding var isLoading: Bool
|
||||
@State private var cheersContent: String = ""
|
||||
@@ -26,13 +27,13 @@ struct UserProfileFanTalkView: View {
|
||||
HStack(spacing: 0) {
|
||||
Text("팬 Talk")
|
||||
.font(.custom(Font.bold.rawValue, size: 16.7))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("전체보기")
|
||||
.font(.custom(Font.light.rawValue, size: 11.3))
|
||||
.foregroundColor(Color(hex: "bbbbbb"))
|
||||
.foregroundColor(Color.graybb)
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(step: .userProfileFanTalkAll(userId: userId))
|
||||
}
|
||||
@@ -43,17 +44,17 @@ struct UserProfileFanTalkView: View {
|
||||
HStack(spacing: 6.7) {
|
||||
Text("응원")
|
||||
.font(.custom(Font.medium.rawValue, size: 14.7))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Text("\(cheers.totalCount)")
|
||||
.font(.custom(Font.medium.rawValue, size: 12))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
}
|
||||
.padding(.top, 20)
|
||||
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(hex: "909090").opacity(0.5))
|
||||
.foregroundColor(Color.gray90.opacity(0.5))
|
||||
.padding(.top, 13.3)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
@@ -61,8 +62,8 @@ struct UserProfileFanTalkView: View {
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.font(.custom(Font.medium.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.accentColor(Color(hex: "3bb9f1"))
|
||||
.foregroundColor(Color.grayee)
|
||||
.accentColor(Color.button)
|
||||
.keyboardType(.default)
|
||||
.padding(.horizontal, 13.3)
|
||||
|
||||
@@ -78,18 +79,18 @@ struct UserProfileFanTalkView: View {
|
||||
cheersContent = ""
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "232323"))
|
||||
.background(Color.gray23)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(Color(hex: "9970ff"))
|
||||
.foregroundColor(Color.button)
|
||||
)
|
||||
.padding(.top, 13.3)
|
||||
|
||||
Rectangle()
|
||||
.frame(height: 1)
|
||||
.foregroundColor(Color(hex: "909090").opacity(0.5))
|
||||
.foregroundColor(Color.gray90.opacity(0.5))
|
||||
.padding(.top, 13.3)
|
||||
|
||||
VStack(spacing: 20) {
|
||||
@@ -110,6 +111,9 @@ struct UserProfileFanTalkView: View {
|
||||
},
|
||||
onClickDelete: { cheersId in
|
||||
deletePopup(cheersId)
|
||||
},
|
||||
onClickProfile: {
|
||||
profilePopup($0)
|
||||
}
|
||||
)
|
||||
.onTapGesture {
|
||||
@@ -119,7 +123,7 @@ struct UserProfileFanTalkView: View {
|
||||
} else {
|
||||
Text("응원이 없습니다.\n\n처음으로 응원을 해보세요!")
|
||||
.font(.custom(Font.light.rawValue, size: 13.3))
|
||||
.foregroundColor(Color(hex: "bbbbbb"))
|
||||
.foregroundColor(Color.graybb)
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding(.vertical, 60)
|
||||
|
@@ -12,6 +12,9 @@ struct UserProfileView: View {
|
||||
let userId: Int
|
||||
@StateObject var viewModel = UserProfileViewModel()
|
||||
|
||||
@State private var memberId: Int = 0
|
||||
@State private var isShowMemberProfilePopup: Bool = false
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { proxy in
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
@@ -196,6 +199,10 @@ struct UserProfileView: View {
|
||||
viewModel.cheersId = cheerId
|
||||
viewModel.isShowCheersDeleteView = true
|
||||
},
|
||||
profilePopup: {
|
||||
self.memberId = $0
|
||||
self.isShowMemberProfilePopup = true
|
||||
},
|
||||
isLoading: $viewModel.isLoading
|
||||
)
|
||||
.padding(.top, 26.7)
|
||||
@@ -311,6 +318,10 @@ struct UserProfileView: View {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if isShowMemberProfilePopup {
|
||||
MemberProfileDialog(isShowing: $isShowMemberProfilePopup, memberId: memberId)
|
||||
}
|
||||
}
|
||||
}
|
||||
.sheet(
|
||||
|
Reference in New Issue
Block a user