Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AIProject/iCo/Domain/Model/Common/Prompt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ enum Prompt {
let summary: String
}

커뮤니티 분위기(호재, 악재, 중립)와 그렇게 평가한 이유를 한글로 200자 이상으로 요약해 위 형식으로 작성해서 JSON으로 제공 (답변은 한글, 마크다운 금지, 출처 제외)
커뮤니티 분위기(호재, 악재, 중립)와 그렇게 평가한 이유를 한글로 200자 이상으로 요약해 위 InsightDTO로 디코딩 할 수 있도록 작성해서 JSON으로 제공 (답변은 한글, 종결 어미는 '-ㅂ니다', 마크다운 금지, 출처 제외)
"""
case .generateBookmarkBriefing(let importance, let bookmarks):
"""
Expand Down
2 changes: 1 addition & 1 deletion AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct AIBriefingView: View {

VStack(spacing: 16) {
if isPadLayout {
HStack(spacing: 16) {
HStack(alignment: .top, spacing: 16) {
briefingView
TopCoinListView()
}
Expand Down
78 changes: 41 additions & 37 deletions AIProject/iCo/Features/Dashboard/View/CoinCarouselView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,50 +139,54 @@ struct CoinCarouselView: View {
wrappedCoins.removeAll()
}
.sheet(item: $selectedCoin) { coin in
VStack(spacing: 30) {
CoinInfoView(recommendCoin: coin) {
selectedCoin = nil
}

VStack(alignment: .leading, spacing: 12) {
HStack(spacing: 8) {
Image(systemName: "sparkles")
.font(.ico16B)
.foregroundStyle(.iCoAccent)
ScrollView {
VStack(spacing: 30) {
CoinInfoView(recommendCoin: coin) {
selectedCoin = nil
}

VStack(alignment: .leading, spacing: 12) {
HStack(spacing: 8) {
Image(systemName: "sparkles")
.font(.ico16B)
.foregroundStyle(.iCoAccent)

Text("아이코가 추천하는 이유")
.font(.ico18B)
.foregroundStyle(.iCoLabel)
}

Text(String.aiGeneratedContentNotice)
.font(.ico13)
.foregroundStyle(.iCoNeutral)
.lineSpacing(6)

Text("아이코가 추천하는 이유")
.font(.ico18B)
Text(coin.comment.byCharWrapping)
.font(.ico16)
.lineSpacing(6)
.foregroundStyle(.iCoLabel)
}
.fixedSize(horizontal: false, vertical: true)

Text(String.aiGeneratedContentNotice)
.font(.ico13)
.foregroundStyle(.iCoNeutral)
.lineSpacing(6)

Text(coin.comment.byCharWrapping)
.font(.ico16)
.lineSpacing(6)
.foregroundStyle(.iCoLabel)
}
.fixedSize(horizontal: false, vertical: true)

RoundedRectangleFillButton(title: "더 자세히 보러가기", imageName: "info.circle", isHighlighted: .constant(true)) {
selectedCoin = nil
showDetailCoin = coin
RoundedRectangleFillButton(title: "더 자세히 보러가기", imageName: "info.circle", isHighlighted: .constant(true)) {
selectedCoin = nil
showDetailCoin = coin
}
}
.padding(20)
.background(.background)
.background(
GeometryReader { geo in
Color.clear
.onAppear {
measuredHeight = geo.size.height
}
}
)
}
.padding(20)
.background(.background)
.background(
GeometryReader { geo in
Color.clear
.onAppear {
measuredHeight = geo.size.height
}
}
)
.scrollIndicators(.hidden)
.presentationDetents([detent])

}
.onChange(of: selectedCoin) { _, newValue in
updateTimerState()
Expand Down
46 changes: 31 additions & 15 deletions AIProject/iCo/Features/Dashboard/View/FearGreedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,43 @@ struct FearGreedView: View {
case .xSmall, .small, .medium, .large:
return baseWidth
case .xLarge, .xxLarge, .xxxLarge:
return baseWidth * 0.9
return baseWidth * 1.2
default:
return baseWidth * 0.7
return baseWidth * 1.4
}
}

var body: some View {
VStack {
HStack(alignment: .center, spacing: 0) {
headerSection

Spacer()
if typeSize >= .xLarge && hSizeClass == .compact {
VStack(alignment: .leading, spacing: 0) {
headerSection

if showFearGreedDescription {
fearGreedDescription
.opacity(!showFearGreedDescription ? 0 : 1)
.animation(.snappy(duration: 0.3), value: showFearGreedDescription)
}

chartSection
.padding(.top, 22)
.frame(maxWidth: .infinity, alignment: .center)
}
.frame(maxWidth: .infinity, alignment: .leading)
} else {
HStack(alignment: .center, spacing: 0) {
headerSection

Spacer()

chartSection
}

chartSection
.fixedSize(horizontal: true, vertical: false)
}

if showFearGreedDescription {
fearGreedDescription
.opacity(!showFearGreedDescription ? 0 : 1)
.animation(.snappy(duration: 0.3), value: showFearGreedDescription)
if showFearGreedDescription {
fearGreedDescription
.opacity(!showFearGreedDescription ? 0 : 1)
.animation(.snappy(duration: 0.3), value: showFearGreedDescription)
}
}
}
.padding(.horizontal, 22)
Expand All @@ -57,7 +73,6 @@ struct FearGreedView: View {
RoundedRectangle(cornerRadius: Self.cornerRadius)
.strokeBorder(.defaultGradient, lineWidth: 0.5)
)
.animation(.snappy(duration: 0.2), value: showFearGreedDescription)
}

var headerSection: some View {
Expand Down Expand Up @@ -119,6 +134,7 @@ struct FearGreedView: View {
.font(.ico12M)
.foregroundStyle(.secondary)
}
.fixedSize(horizontal: true, vertical: false)
}

var fearGreedDescription: some View {
Expand Down