feat(original): 작품별 상세 UI 변경
- 캐릭터 / 작품 정보 탭 추가 - 작품 정보 탭 구성 - 작품 소개 - 원작 보러 가기 - 상세 정보 - 작가 - 제작사 - 원작
This commit is contained in:
@@ -12,8 +12,6 @@ struct OriginalWorkDetailHeaderView: View {
|
||||
|
||||
let item: OriginalWorkDetailResponse
|
||||
|
||||
@State var isDescriptionExpanded = false
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
if let imageUrl = item.imageUrl {
|
||||
@@ -74,33 +72,15 @@ struct OriginalWorkDetailHeaderView: View {
|
||||
}
|
||||
.padding(.top, 14)
|
||||
|
||||
Text(item.description)
|
||||
.font(.custom(Font.preRegular.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "cfd8dc"))
|
||||
.lineLimit(!isDescriptionExpanded ? 2 : Int.max)
|
||||
.truncationMode(.tail)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top, 14)
|
||||
.onTapGesture {
|
||||
isDescriptionExpanded.toggle()
|
||||
}
|
||||
|
||||
Text("원작 보러가기")
|
||||
.font(.custom(Font.preBold.rawValue, size: 16))
|
||||
.foregroundColor(.button)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 15)
|
||||
.overlay {
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.strokeBorder(lineWidth: 1)
|
||||
.foregroundColor(.button)
|
||||
}
|
||||
.padding(.top, 24)
|
||||
.onTapGesture {
|
||||
if let link = item.originalLink, let url = URL(string: link) {
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}
|
||||
Text(
|
||||
item.tags
|
||||
.map { $0.hasPrefix("#") ? $0 : "#\($0)" }
|
||||
.joined(separator: " ")
|
||||
)
|
||||
.font(.custom(Font.preRegular.rawValue, size: 14))
|
||||
.foregroundColor(Color(hex: "3bb9f1"))
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top, 14)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,7 +94,12 @@ struct OriginalWorkDetailHeaderView: View {
|
||||
category: "로맨스",
|
||||
isAdult: true,
|
||||
description: "작품설명입니다.보이스온의 오픈월드 캐릭터톡은 청소년 보호를 위해 본인인증한성인만 이용이 가능합니다.캐릭터톡 서비스를 이용하시려면 본인인증을 하고 이용해주세요.",
|
||||
originalWork: nil,
|
||||
originalLink: "https://apple.com",
|
||||
writer: nil,
|
||||
studio: nil,
|
||||
originalLinks: [],
|
||||
tags: [],
|
||||
characters: []
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user