fix(profile): 프로필 후원 랭킹 전체보기 왕관 UI 위치와 크기를 통일한다
This commit is contained in:
@@ -213,44 +213,31 @@ struct UserProfileDonationAllItemView: View {
|
|||||||
let withDonationCan: Bool
|
let withDonationCan: Bool
|
||||||
let itemCount: Int
|
let itemCount: Int
|
||||||
|
|
||||||
let rankingCrawns = ["ic_crown_1", "ic_crown_2", "ic_crown_3"]
|
let crowns = ["img_rank_1", "img_rank_2", "img_rank_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)]
|
|
||||||
]
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
ZStack {
|
ZStack(alignment: .center) {
|
||||||
KFImage(URL(string: item.profileImage))
|
KFImage(URL(string: item.profileImage))
|
||||||
.cancelOnDisappear(true)
|
.cancelOnDisappear(true)
|
||||||
.downsampling(size: CGSize(width: 60, height: 60))
|
.downsampling(
|
||||||
|
size: CGSize(
|
||||||
|
width: 60,
|
||||||
|
height: 60
|
||||||
|
)
|
||||||
|
)
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFill()
|
.scaledToFill()
|
||||||
.frame(width: 60, height: 60, alignment: .top)
|
.frame(width: 60, height: 60, alignment: .top)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
.overlay(
|
|
||||||
Circle()
|
|
||||||
.stroke(
|
|
||||||
AngularGradient(colors: rankingColors[index < 4 ? index : 3], center: .center),
|
|
||||||
lineWidth: 3
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if index < 3 {
|
if index < 3 {
|
||||||
VStack(alignment: .trailing, spacing: 0) {
|
Image(crowns[index])
|
||||||
Spacer()
|
|
||||||
|
|
||||||
Image(rankingCrawns[index])
|
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 25, height: 25)
|
.frame(width: 77, height: 75)
|
||||||
}
|
|
||||||
.frame(width: 63, height: 63, alignment: .trailing)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(width: 63, height: 63)
|
.frame(width: 77, height: 75)
|
||||||
|
|
||||||
Text("\(index + 1)")
|
Text("\(index + 1)")
|
||||||
.appFont(size: 13.3, weight: .bold)
|
.appFont(size: 13.3, weight: .bold)
|
||||||
|
|||||||
Reference in New Issue
Block a user