diff --git a/AIProject/iCo/Domain/Model/Common/Prompt.swift b/AIProject/iCo/Domain/Model/Common/Prompt.swift index acdd698a..ba88f9d1 100644 --- a/AIProject/iCo/Domain/Model/Common/Prompt.swift +++ b/AIProject/iCo/Domain/Model/Common/Prompt.swift @@ -85,7 +85,7 @@ enum Prompt { let summary: String } - 커뮤니티 분위기(호재, 악재, 중립)와 그렇게 평가한 이유를 한글로 200자 이상으로 요약해 위 형식으로 작성해서 JSON으로 제공 (답변은 한글, 마크다운 금지, 출처 제외) + 커뮤니티 분위기(호재, 악재, 중립)와 그렇게 평가한 이유를 한글로 200자 이상으로 요약해 위 InsightDTO로 디코딩 할 수 있도록 작성해서 JSON으로 제공 (답변은 한글, 종결 어미는 '-ㅂ니다', 마크다운 금지, 출처 제외) """ case .generateBookmarkBriefing(let importance, let bookmarks): """ diff --git a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift index 49c15f68..24b15bf8 100644 --- a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift +++ b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift @@ -34,7 +34,7 @@ struct AIBriefingView: View { VStack(spacing: 16) { if isPadLayout { - HStack(spacing: 16) { + HStack(alignment: .top, spacing: 16) { briefingView TopCoinListView() } diff --git a/AIProject/iCo/Features/Dashboard/View/CoinCarouselView.swift b/AIProject/iCo/Features/Dashboard/View/CoinCarouselView.swift index 1af5e0ce..43a06742 100644 --- a/AIProject/iCo/Features/Dashboard/View/CoinCarouselView.swift +++ b/AIProject/iCo/Features/Dashboard/View/CoinCarouselView.swift @@ -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() diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index 08ec55c1..758d6d4a 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -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) @@ -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 { @@ -119,6 +134,7 @@ struct FearGreedView: View { .font(.ico12M) .foregroundStyle(.secondary) } + .fixedSize(horizontal: true, vertical: false) } var fearGreedDescription: some View {