오디션 배역 상세 페이지 추가

This commit is contained in:
Yu Sung
2025-01-07 01:10:20 +09:00
parent 739a9b42b7
commit 36028aa108
19 changed files with 531 additions and 5 deletions

View File

@@ -0,0 +1,72 @@
//
// AuditionApplicantItemView.swift
// SodaLive
//
// Created by klaus on 1/7/25.
//
import SwiftUI
import Kingfisher
struct AuditionApplicantItemView: View {
let item: GetAuditionRoleApplicantItem
var body: some View {
VStack(spacing: 5.3) {
HStack(spacing: 13.3) {
ZStack {
KFImage(URL(string: item.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 40, height: 40))
.resizable()
.aspectRatio(1, contentMode: .fit)
.scaledToFill()
.frame(width: 40, height: 40)
.clipShape(Circle())
Image("ic_audition_play")
.onTapGesture {
}
}
VStack(spacing: 8) {
HStack(spacing: 0) {
Text(item.nickname.count > 9 ? "\(item.nickname.prefix(9))..." : item.nickname)
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color.white)
Spacer()
}
}
VStack(spacing: 2.3) {
Image("ic_heart_vote")
Text("\(item.voteCount)")
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color.gray77)
}
}
.padding(.vertical, 18.7)
Color.gray55
.frame(maxWidth: .infinity)
.frame(height: 1)
}
.padding(.horizontal, 13.3)
}
}
#Preview {
AuditionApplicantItemView(
item: GetAuditionRoleApplicantItem(
applicantId: 1,
memberId: 2,
nickname: "유저일유저일유저일유저일",
profileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
voiceUrl: "",
voteCount: 777
)
)
}

View File

@@ -0,0 +1,10 @@
//
// AuditionApplicantSortType.swift
// SodaLive
//
// Created by klaus on 1/6/25.
//
enum AuditionApplicantSortType: String, Codable {
case NEWEST, LIKE
}

View File

@@ -0,0 +1,20 @@
//
// GetAuditionApplicantListResponse.swift
// SodaLive
//
// Created by klaus on 1/6/25.
//
struct GetAuditionApplicantListResponse: Decodable {
let totalCount: Int
let items: [GetAuditionRoleApplicantItem]
}
struct GetAuditionRoleApplicantItem: Decodable {
let applicantId: Int
let memberId: Int
let nickname: String
let profileImageUrl: String
let voiceUrl: String
let voteCount: Int
}