fix(live): 라이브룸 후원·하트 랭킹 왕관 UI를 동일화한다

This commit is contained in:
Yu Sung
2026-03-18 14:26:00 +09:00
parent 84d8e2f2e3
commit e9fc7e180d
3 changed files with 34 additions and 48 deletions

View File

@@ -14,17 +14,11 @@ struct LiveRoomDonationRankingItemView: View {
let item: GetLiveRoomDonationItem
let itemCount: Int
let rankingCrawns = ["ic_crown_1", "ic_crown_2", "ic_crown_3"]
let rankingColors = [
[Color(hex: "ffdc00"), Color(hex: "ffb600")],
[Color(hex: "ffffff"), Color(hex: "9f9f9f")],
[Color(hex: "e6a77a"), Color(hex: "c67e4a")],
[Color(hex: "ffffff").opacity(0), Color(hex: "ffffff").opacity(0)]
]
let crowns = ["img_rank_1", "img_rank_2", "img_rank_3"]
var body: some View {
HStack(spacing: 0) {
ZStack {
ZStack(alignment: .center) {
KFImage(URL(string: item.profileImage))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 60, height: 60))
@@ -32,26 +26,14 @@ struct LiveRoomDonationRankingItemView: View {
.scaledToFill()
.frame(width: 60, height: 60, alignment: .top)
.clipShape(Circle())
.overlay(
Circle()
.stroke(
AngularGradient(colors: rankingColors[index < 4 ? index : 3], center: .center),
lineWidth: 3
)
)
if index < 3 {
VStack(alignment: .trailing, spacing: 0) {
Spacer()
Image(rankingCrawns[index])
.resizable()
.frame(width: 25, height: 25)
}
.frame(width: 63, height: 63, alignment: .trailing)
Image(crowns[index])
.resizable()
.frame(width: 77, height: 75)
}
}
.frame(width: 63, height: 63)
.frame(width: 77, height: 75)
Text("\(index + 1)")
.appFont(size: 13.3, weight: .bold)