커뮤니티 댓글, 팬토크, 콘텐츠 댓글
- 프로필 이미지 터치시 차단, 신고가 가능한 유저 프로필 표시
This commit is contained in:
@@ -17,6 +17,7 @@ struct AudioContentCommentItemView: 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 AudioContentCommentItemView: 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) {
|
||||
HStack(spacing: 6.7) {
|
||||
@@ -95,8 +101,8 @@ struct AudioContentCommentItemView: 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)
|
||||
|
||||
@@ -114,7 +120,7 @@ struct AudioContentCommentItemView: View {
|
||||
isModeModify = false
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "232323"))
|
||||
.background(Color.gray23)
|
||||
.cornerRadius(10)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
@@ -151,7 +157,7 @@ struct AudioContentCommentItemView: View {
|
||||
.padding(.leading, 46.7)
|
||||
|
||||
Rectangle()
|
||||
.foregroundColor(Color(hex: "595959"))
|
||||
.foregroundColor(Color.gray59)
|
||||
.frame(height: 0.5)
|
||||
.padding(.top, 16.7)
|
||||
}
|
||||
@@ -161,7 +167,7 @@ struct AudioContentCommentItemView: View {
|
||||
if commentItem.writerId == UserDefaults.int(forKey: .userId) {
|
||||
Text("수정")
|
||||
.font(.custom(Font.medium.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.onTapGesture {
|
||||
isModeModify = true
|
||||
isShowPopupMenu = false
|
||||
@@ -173,7 +179,7 @@ struct AudioContentCommentItemView: View {
|
||||
{
|
||||
Text("삭제")
|
||||
.font(.custom(Font.medium.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.foregroundColor(Color.gray77)
|
||||
.onTapGesture {
|
||||
onClickDelete(commentItem.id)
|
||||
isShowPopupMenu = false
|
||||
@@ -181,7 +187,7 @@ struct AudioContentCommentItemView: View {
|
||||
}
|
||||
}
|
||||
.padding(10)
|
||||
.background(Color(hex: "222222"))
|
||||
.background(Color.gray22)
|
||||
}
|
||||
}
|
||||
.onAppear { comment = commentItem.comment }
|
||||
|
@@ -21,6 +21,9 @@ struct AudioContentCommentListView: 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 {
|
||||
NavigationView {
|
||||
ZStack {
|
||||
@@ -137,6 +140,10 @@ struct AudioContentCommentListView: View {
|
||||
onClickDelete: {
|
||||
commentId = $0
|
||||
isShowDeletePopup = true
|
||||
},
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 26.7)
|
||||
@@ -169,6 +176,10 @@ struct AudioContentCommentListView: View {
|
||||
)
|
||||
}
|
||||
|
||||
if isShowMemberProfilePopup {
|
||||
MemberProfileDialog(isShowing: $isShowMemberProfilePopup, memberId: memberId)
|
||||
}
|
||||
|
||||
if viewModel.isLoading {
|
||||
LoadingView()
|
||||
}
|
||||
|
@@ -20,6 +20,9 @@ struct AudioContentListReplyView: 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 AudioContentListReplyView: 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 AudioContentListReplyView: View {
|
||||
onClickDelete: {
|
||||
commentId = $0
|
||||
isShowDeletePopup = true
|
||||
},
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 40)
|
||||
@@ -153,6 +164,10 @@ struct AudioContentListReplyView: View {
|
||||
)
|
||||
}
|
||||
|
||||
if isShowMemberProfilePopup {
|
||||
MemberProfileDialog(isShowing: $isShowMemberProfilePopup, memberId: memberId)
|
||||
}
|
||||
|
||||
if viewModel.isLoading {
|
||||
LoadingView()
|
||||
}
|
||||
|
Reference in New Issue
Block a user