라이브방 - 라이브 후원랭킹 리스트

- 방장은 일반후원 / 비밀후원 캔을 나눠서 보이도록 수정
This commit is contained in:
Yu Sung
2024-10-28 18:25:22 +09:00
parent 5b55c9d2e3
commit 54f70609c5
5 changed files with 81 additions and 9 deletions

View File

@@ -66,10 +66,38 @@ struct LiveRoomDonationRankingItemView: View {
Spacer()
if item.can > 0 {
Text("\(item.can)")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
VStack(alignment: .trailing, spacing: 8) {
if item.can > 0 {
HStack(spacing: 4) {
Text("\(item.can)")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color.button)
Text("")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
}
}
if item.secretCan > 0 {
HStack(spacing: 4) {
Text("비밀")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color.gray11)
.padding(.horizontal, 3.3)
.padding(.vertical, 2.7)
.background(Color(hex: "fedc00"))
.cornerRadius(2.7)
Text("\(item.secretCan)")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "fedc00"))
Text("")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
}
}
}
}
.padding(.horizontal, isTop3Index(index: index) ? 20 : 0)
@@ -112,3 +140,11 @@ struct LiveRoomDonationRankingItemView: View {
}
}
}
#Preview {
LiveRoomDonationRankingItemView(
index: 0,
item: GetLiveRoomDonationItem(profileImage: "", nickname: "테스트", userId: 1, can: 10, secretCan: 30),
itemCount: 3
)
}