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
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.945",
"green" : "0.498",
"red" : "0.357"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.784",
"green" : "0.416",
"red" : "0.298"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.890",
"green" : "0.408",
"red" : "0.714"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.890",
"green" : "0.408",
"red" : "0.714"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0.675",
"green" : "0.431",
"red" : "0.824"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0.584",
"green" : "0.374",
"red" : "0.714"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
10 changes: 5 additions & 5 deletions AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ enum FearGreed: String {
var color: Color {
switch self {
case .extremeFear:
return .red
return .iCoNegative
case .fear:
return .orange
return .iCoNegativeGradient
case .neutral:
return .yellow
return .iCoNeutralGradient
case .greed:
return .green
return .iCoPositiveGradient
case .extremeGreed:
return .mint
return .iCoPositive
}
}

Expand Down
23 changes: 18 additions & 5 deletions AIProject/iCo/Features/Base/RoundedButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,42 @@
import SwiftUI

struct RoundedButton: View {
@State private var isRotated: Bool = false

var title: String?
var imageName: String?
var foregroundColor: Color?
var rotatingAnimation: Bool = false

/// 버튼이 눌렸을 때 실행될 액션
///
/// 외부에서 이 버튼을 사용할 때 실행하고자 하는 동작을 이 클로저로 전달
/// 예: 버튼 클릭 시 네비게이션 이동, 토글, API 호출 등.
var action: () -> Void
var action: (() -> Void)

var body: some View {
Button(action: action) {
Button {
action()
if rotatingAnimation {
isRotated.toggle()
}
} label: {
HStack(spacing: 4) {
if let title {
Text(title)
.font(.ico12)
.font(.ico11)
.tint(foregroundColor ?? .iCoLabel)
}

if let imageName {
Image(systemName: imageName)
.font(.ico10)
.tint(foregroundColor ?? .iCoLabel)

.tint(foregroundColor ?? .iCoLabelSecondary)
.rotation3DEffect(
.degrees(isRotated ? 180 : 0),
axis: (x: 1, y: 0, z: 0) // Y축 기준 회전
)
.animation(.smooth, value: isRotated)
}
}
.padding(.horizontal, 10)
Expand All @@ -55,6 +67,7 @@ struct RoundedButton: View {
.disabled(true)
RoundedButton(title: "Text Only", imageName: nil, action: { })
RoundedButton(title: nil, imageName: "xmark", action: { })
RoundedButton(title: "확장", imageName: "chevron.down", rotatingAnimation: true, action: { })
}
.padding()
.background(.iCoBackground)
Expand Down
18 changes: 10 additions & 8 deletions AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ struct AIBriefingView: View {
}

var body: some View {
SubheaderView(subheading: "새로운 소식들이 있어요")
SubheaderView(subheading: "시장 한눈에 보기")
.padding(.bottom, 4)

VStack(alignment: .leading, spacing: 20) {
Text(String.aiGeneratedContentNotice)
.font(.ico11)
.foregroundStyle(.iCoNeutral)
.lineSpacing(5)
FearGreedView()

VStack(spacing: 16) {
if isPadLayout {
Expand All @@ -51,8 +48,6 @@ struct AIBriefingView: View {
maxHeight = value
}
}

FearGreedView()
}
}
.padding(.horizontal, 16)
Expand All @@ -69,7 +64,14 @@ struct AIBriefingView: View {
.font(.ico16B)
.foregroundStyle($0.sentiment.color(for: themeManager.selectedTheme))
},
content: { Text($0.summary.byCharWrapping) }
content: {
Text(String.aiGeneratedContentNotice)
.font(.ico11)
.foregroundStyle(.iCoNeutral)
.lineSpacing(5)

Text($0.summary.byCharWrapping)
}
)
.frame(height: maxHeight)
}
Expand Down
Loading