feat(creator-profile): 후원 랭킹 섹션, 팬 Talk 섹션 UI 변경

This commit is contained in:
Yu Sung
2025-10-17 09:22:00 +09:00
parent 788add773b
commit 39f744f925
3 changed files with 50 additions and 60 deletions

View File

@@ -31,9 +31,9 @@ struct UserProfileFanTalkCheersItemView: View {
HStack(alignment: .top, spacing: 6.7) { HStack(alignment: .top, spacing: 6.7) {
KFImage(URL(string: cheersItem.profileUrl)) KFImage(URL(string: cheersItem.profileUrl))
.cancelOnDisappear(true) .cancelOnDisappear(true)
.downsampling(size: CGSize(width: 33.3, height: 33.3)) .downsampling(size: CGSize(width: 42, height: 42))
.resizable() .resizable()
.frame(width: 33.3, height: 33.3) .frame(width: 42, height: 42)
.clipShape(Circle()) .clipShape(Circle())
.onTapGesture { .onTapGesture {
if UserDefaults.int(forKey: .userId) != cheersItem.memberId { if UserDefaults.int(forKey: .userId) != cheersItem.memberId {
@@ -43,20 +43,20 @@ struct UserProfileFanTalkCheersItemView: View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
Text("\(cheersItem.nickname)") Text("\(cheersItem.nickname)")
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.preBold.rawValue, size: 16))
.foregroundColor(Color.gray90) .foregroundColor(Color.white)
Text("\(cheersItem.date)") Text("\(cheersItem.date)")
.font(.custom(Font.medium.rawValue, size: 10.7)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.gray55) .foregroundColor(Color(hex: "78909C"))
.padding(.top, 8.3) .padding(.top, 4)
if isModeModify { if isModeModify {
HStack(spacing: 10) { HStack(spacing: 10) {
TextField("", text: $cheers) TextField("", text: $cheers)
.autocapitalization(.none) .autocapitalization(.none)
.disableAutocorrection(true) .disableAutocorrection(true)
.font(.custom(Font.medium.rawValue, size: 13.3)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.grayee) .foregroundColor(Color.grayee)
.padding(13.3) .padding(13.3)
.background(Color.gray23) .background(Color.gray23)
@@ -70,7 +70,7 @@ struct UserProfileFanTalkCheersItemView: View {
) )
Text("수정") Text("수정")
.font(.custom(Font.bold.rawValue, size: 13.3)) .font(.custom(Font.preBold.rawValue, size: 14))
.foregroundColor(Color.white) .foregroundColor(Color.white)
.padding(13.3) .padding(13.3)
.background(Color.button) .background(Color.button)
@@ -81,7 +81,7 @@ struct UserProfileFanTalkCheersItemView: View {
} }
Text("취소") Text("취소")
.font(.custom(Font.bold.rawValue, size: 13.3)) .font(.custom(Font.preBold.rawValue, size: 14))
.foregroundColor(Color.button) .foregroundColor(Color.button)
.padding(13.3) .padding(13.3)
.background(Color.gray22) .background(Color.gray22)
@@ -93,11 +93,11 @@ struct UserProfileFanTalkCheersItemView: View {
.padding(.top, 13.3) .padding(.top, 13.3)
} else { } else {
Text("\(cheersItem.content)") Text("\(cheersItem.content)")
.font(.custom(Font.medium.rawValue, size: 13.3)) .font(.custom(Font.preMedium.rawValue, size: 16))
.foregroundColor(Color.grayee) .foregroundColor(Color(hex: "B0BEC5"))
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
.lineSpacing(8) .lineSpacing(8)
.padding(.top, 13.3) .padding(.top, 12)
} }
if isShowInputReply { if isShowInputReply {
@@ -105,7 +105,7 @@ struct UserProfileFanTalkCheersItemView: View {
TextField("응원댓글에 답글을 남겨보세요!", text: $replyContent) TextField("응원댓글에 답글을 남겨보세요!", text: $replyContent)
.autocapitalization(.none) .autocapitalization(.none)
.disableAutocorrection(true) .disableAutocorrection(true)
.font(.custom(Font.medium.rawValue, size: 13.3)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.grayee) .foregroundColor(Color.grayee)
.padding(13.3) .padding(13.3)
.background(Color.gray23) .background(Color.gray23)
@@ -119,7 +119,7 @@ struct UserProfileFanTalkCheersItemView: View {
) )
Text("등록") Text("등록")
.font(.custom(Font.bold.rawValue, size: 13.3)) .font(.custom(Font.preBold.rawValue, size: 14))
.foregroundColor(Color.white) .foregroundColor(Color.white)
.padding(13.3) .padding(13.3)
.background(Color.button) .background(Color.button)
@@ -137,7 +137,7 @@ struct UserProfileFanTalkCheersItemView: View {
if cheersItem.replyList.count <= 0 { if cheersItem.replyList.count <= 0 {
if userId == UserDefaults.int(forKey: .userId) { if userId == UserDefaults.int(forKey: .userId) {
Text("답글쓰기") Text("답글쓰기")
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.preMedium.rawValue, size: 12))
.foregroundColor(Color.button) .foregroundColor(Color.button)
.padding(.top, 18.3) .padding(.top, 18.3)
.onTapGesture { .onTapGesture {
@@ -148,7 +148,7 @@ struct UserProfileFanTalkCheersItemView: View {
let reply = cheersItem.replyList[0] let reply = cheersItem.replyList[0]
VStack(alignment: .leading, spacing: 8.3) { VStack(alignment: .leading, spacing: 8.3) {
Text(reply.content) Text(reply.content)
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.preMedium.rawValue, size: 12))
.foregroundColor(Color.white) .foregroundColor(Color.white)
.frame(minWidth: 100) .frame(minWidth: 100)
.padding(.horizontal, 6.7) .padding(.horizontal, 6.7)
@@ -160,12 +160,12 @@ struct UserProfileFanTalkCheersItemView: View {
HStack(spacing: 6.7) { HStack(spacing: 6.7) {
Text(reply.date) Text(reply.date)
.font(.custom(Font.medium.rawValue, size: 10.7)) .font(.custom(Font.preMedium.rawValue, size: 10.7))
.foregroundColor(Color.gray52) .foregroundColor(Color.gray52)
if userId == UserDefaults.int(forKey: .userId) { if userId == UserDefaults.int(forKey: .userId) {
Text("답글 수정") Text("답글 수정")
.font(.custom(Font.medium.rawValue, size: 10.7)) .font(.custom(Font.preMedium.rawValue, size: 12))
.foregroundColor(Color.button) .foregroundColor(Color.button)
.onTapGesture { .onTapGesture {
self.replyContent = reply.content self.replyContent = reply.content
@@ -197,7 +197,7 @@ struct UserProfileFanTalkCheersItemView: View {
VStack(spacing: 10) { VStack(spacing: 10) {
if cheersItem.memberId != UserDefaults.int(forKey: .userId) { if cheersItem.memberId != UserDefaults.int(forKey: .userId) {
Text("신고하기") Text("신고하기")
.font(.custom(Font.medium.rawValue, size: 14)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.gray77) .foregroundColor(Color.gray77)
.onTapGesture { .onTapGesture {
reportPopup(cheersItem.cheersId) reportPopup(cheersItem.cheersId)
@@ -207,7 +207,7 @@ struct UserProfileFanTalkCheersItemView: View {
if cheersItem.memberId == UserDefaults.int(forKey: .userId) { if cheersItem.memberId == UserDefaults.int(forKey: .userId) {
Text("수정") Text("수정")
.font(.custom(Font.medium.rawValue, size: 14)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.gray77) .foregroundColor(Color.gray77)
.onTapGesture { .onTapGesture {
isModeModify = true isModeModify = true
@@ -220,7 +220,7 @@ struct UserProfileFanTalkCheersItemView: View {
cheersItem.memberId == UserDefaults.int(forKey: .userId) cheersItem.memberId == UserDefaults.int(forKey: .userId)
{ {
Text("삭제") Text("삭제")
.font(.custom(Font.medium.rawValue, size: 14)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.gray77) .foregroundColor(Color.gray77)
.onTapGesture { .onTapGesture {
onClickDelete(cheersItem.cheersId) onClickDelete(cheersItem.cheersId)

View File

@@ -26,42 +26,36 @@ struct UserProfileFanTalkView: View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 0) { HStack(spacing: 0) {
Text("팬 Talk") Text("팬 Talk")
.font(.custom(Font.bold.rawValue, size: 16.7)) .font(.custom(Font.preBold.rawValue, size: 26))
.foregroundColor(Color.grayee) .foregroundColor(Color.white)
Spacer() Spacer()
Text("전체보기") Text("전체보기")
.font(.custom(Font.light.rawValue, size: 11.3)) .font(.custom(Font.preLight.rawValue, size: 14))
.foregroundColor(Color.graybb) .foregroundColor(Color(hex: "78909C"))
.onTapGesture { .onTapGesture {
AppState.shared.setAppStep(step: .userProfileFanTalkAll(userId: userId)) AppState.shared.setAppStep(step: .userProfileFanTalkAll(userId: userId))
} }
} }
.padding(.horizontal, 13.3) .padding(.horizontal, 24)
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 20) {
HStack(spacing: 6.7) { HStack(spacing: 6.7) {
Text("응원") Text("응원")
.font(.custom(Font.medium.rawValue, size: 14.7)) .font(.custom(Font.preMedium.rawValue, size: 16))
.foregroundColor(Color.grayee) .foregroundColor(Color.grayee)
Text("\(cheers.totalCount)") Text("\(cheers.totalCount)")
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.gray77) .foregroundColor(Color.gray77)
} }
.padding(.top, 20)
Rectangle()
.frame(height: 1)
.foregroundColor(Color.gray90.opacity(0.5))
.padding(.top, 13.3)
HStack(spacing: 0) { HStack(spacing: 0) {
TextField("응원댓글을 입력하세요", text: $cheersContent) TextField("응원댓글을 입력하세요", text: $cheersContent)
.autocapitalization(.none) .autocapitalization(.none)
.disableAutocorrection(true) .disableAutocorrection(true)
.font(.custom(Font.medium.rawValue, size: 13.3)) .font(.custom(Font.preMedium.rawValue, size: 14))
.foregroundColor(Color.grayee) .foregroundColor(Color.grayee)
.accentColor(Color.button) .accentColor(Color.button)
.keyboardType(.default) .keyboardType(.default)
@@ -86,12 +80,6 @@ struct UserProfileFanTalkView: View {
.strokeBorder(lineWidth: 1) .strokeBorder(lineWidth: 1)
.foregroundColor(Color.button) .foregroundColor(Color.button)
) )
.padding(.top, 13.3)
Rectangle()
.frame(height: 1)
.foregroundColor(Color.gray90.opacity(0.5))
.padding(.top, 13.3)
VStack(spacing: 20) { VStack(spacing: 20) {
if viewModel.cheersTotalCount > 0 { if viewModel.cheersTotalCount > 0 {
@@ -122,19 +110,20 @@ struct UserProfileFanTalkView: View {
} }
} else { } else {
Text("응원이 없습니다.\n\n처음으로 응원을 해보세요!") Text("응원이 없습니다.\n\n처음으로 응원을 해보세요!")
.font(.custom(Font.light.rawValue, size: 13.3)) .font(.custom(Font.preLight.rawValue, size: 13.3))
.foregroundColor(Color.graybb) .foregroundColor(Color.graybb)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
.padding(.vertical, 60) .padding(.vertical, 60)
.frame(width: screenSize().width - 26.7) .frame(maxWidth: .infinity)
.padding(.horizontal, 24)
} }
} }
}
.frame(maxWidth: .infinity)
.padding(.horizontal, 24)
.padding(.top, 20) .padding(.top, 20)
} }
.frame(width: screenSize().width - 26.7)
.padding(.horizontal, 13.3)
}
.onTapGesture { hideKeyboard() } .onTapGesture { hideKeyboard() }
.onAppear { .onAppear {
viewModel.pageSize = 4 viewModel.pageSize = 4

View File

@@ -21,21 +21,22 @@ struct UserProfileDonationView: View {
] ]
var body: some View { var body: some View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 14) {
HStack(spacing: 0) { HStack(spacing: 0) {
Text("후원랭킹") Text("후원랭킹")
.font(.custom(Font.bold.rawValue, size: 16.7)) .font(.custom(Font.preBold.rawValue, size: 26))
.foregroundColor(Color.grayee) .foregroundColor(Color.white)
Spacer() Spacer()
Text("전체보기") Text("전체보기")
.font(.custom(Font.light.rawValue, size: 11.3)) .font(.custom(Font.preLight.rawValue, size: 14))
.foregroundColor(Color.graybb) .foregroundColor(Color(hex: "78909C"))
.onTapGesture { .onTapGesture {
AppState.shared.setAppStep(step: .userProfileDonationAll(userId: userId)) AppState.shared.setAppStep(step: .userProfileDonationAll(userId: userId))
} }
} }
.padding(.horizontal, 24)
ScrollView(.horizontal, showsIndicators: false) { ScrollView(.horizontal, showsIndicators: false) {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
@@ -47,13 +48,13 @@ struct UserProfileDonationView: View {
.cancelOnDisappear(true) .cancelOnDisappear(true)
.downsampling( .downsampling(
size: CGSize( size: CGSize(
width: 60, width: 70,
height: 60 height: 70
) )
) )
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 60, height: 60, alignment: .top) .frame(width: 70, height: 70, alignment: .top)
.clipShape(Circle()) .clipShape(Circle())
.overlay( .overlay(
Circle() Circle()
@@ -71,21 +72,21 @@ struct UserProfileDonationView: View {
.resizable() .resizable()
.frame(width: 25, height: 25) .frame(width: 25, height: 25)
} }
.frame(width: 63, height: 63, alignment: .trailing) .frame(width: 73, height: 73, alignment: .trailing)
} }
} }
.frame(width: 63, height: 63) .frame(width: 73, height: 73)
Text(item.nickname) Text(item.nickname)
.font(.custom(Font.medium.rawValue, size: 12)) .font(.custom(Font.preMedium.rawValue, size: 12))
.foregroundColor(.grayee) .foregroundColor(.grayee)
.frame(width: 63) .frame(width: 63)
.lineLimit(1) .lineLimit(1)
} }
} }
} }
} .padding(.horizontal, 24)
.padding(.top, 26.7) }
} }
} }
} }