feat(chat-original): ChatTabView 작품별 탭 및 리스트 UI/API 연동 추가

This commit is contained in:
Yu Sung
2025-09-15 22:42:36 +09:00
parent ed3f3f796a
commit 6a7a407a09
7 changed files with 375 additions and 1 deletions

View File

@@ -0,0 +1,54 @@
//
// OriginalTabItemView.swift
// SodaLive
//
// Created by klaus on 9/15/25.
//
import SwiftUI
import Kingfisher
struct OriginalTabItemView: View {
let item: OriginalWorkListItemResponse
let size: CGFloat
var body: some View {
VStack(alignment: .leading, spacing: 4) {
KFImage(URL(string: item.imageUrl!))
.placeholder { Color.gray.opacity(0.2) }
.retry(maxCount: 2, interval: .seconds(1))
.cancelOnDisappear(true)
.resizable()
.scaledToFill()
.frame(width: size, height: size * 432 / 306)
.clipped()
.cornerRadius(16)
Text(item.title)
.font(.custom(Font.preRegular.rawValue, size: 18))
.foregroundColor(.white)
.lineLimit(1)
.truncationMode(.tail)
Text(item.contentType)
.font(.custom(Font.preRegular.rawValue, size: 14))
.foregroundColor(Color(hex: "78909C"))
.lineLimit(1)
.truncationMode(.tail)
}
.frame(width: size, alignment: .leading)
}
}
#Preview {
OriginalTabItemView(
item: OriginalWorkListItemResponse(
id: 1,
imageUrl: "https://picsum.photos/300",
title: "작품제목",
contentType: "웹툰"
),
size: 106
)
}