Skip to content

Commit 6fc1d80

Browse files
authored
Feat: Home 화면 수정된 디자인 반영 (#T3-165)
* Refactor: HomeRegisterEmotionButton UI 수정 (#T3-165) * Feat: Home headerView 구현 (#T3-165) * Refactor: cafe24 디자인 시스템 폰트 수정 및 HomeLabel 적용 (#T3-165) * Refactor: HomeEmptyView 수정된 디자인 반영 (#T3-165) * Refactor: DateView, WeekView 수정된 디자인 반영 (#T3-165) - DateView, WeekView 수정된 디자인 반영 - WeekView 로직 HomeViewModel로 이동 * Refactor: FloatingButton · FloatingMenu 수정된 디자인 반영 (#T3-165) * Refactor: 감정구슬 조회 api 및 디자인 반영 v2 (#T3-165) * Refactor: RoutineView 수정된 디자인 반영 (#T3-165) * Refactor: TabBar 아이콘 변경
1 parent 93662e4 commit 6fc1d80

146 files changed

Lines changed: 705 additions & 831 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Projects/DataSource/Sources/DTO/EmotionResponseDTO.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ struct EmotionResponseDTO: Decodable {
1212
let type: String?
1313
let name: String?
1414
let imageUrl: String?
15+
let message: String?
1516

1617
enum CodingKeys: String, CodingKey {
1718
case type = "emotionMarbleType"
1819
case name = "emotionMarbleName"
1920
case imageUrl
21+
case message = "emotionMarbleHomeMessage"
2022
}
2123
}
2224

@@ -31,6 +33,7 @@ extension EmotionResponseDTO {
3133
return EmotionEntity(
3234
emotionType: type,
3335
emotionName: name,
34-
emotionImageUrl: URL(string: imageUrl))
36+
emotionImageUrl: URL(string: imageUrl),
37+
emotionMessage: message)
3538
}
3639
}

Projects/DataSource/Sources/Endpoint/EmotionEndpoint.swift

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@
77

88
enum EmotionEndpoint {
99
case fetchEmotions
10-
case fetchEmotion(date: String)
10+
case loadEmotion(date: String)
1111
case registerEmotion(emotion: String)
1212
}
1313

1414
extension EmotionEndpoint: Endpoint {
1515
var baseURL: String {
16-
return AppProperties.baseURL + "/api/v1/emotion-marbles"
16+
switch self {
17+
case .fetchEmotions, .registerEmotion:
18+
return AppProperties.baseURL + "/api/v1/emotion-marbles"
19+
case .loadEmotion:
20+
return AppProperties.baseURL + "/api/v2/emotion-marbles"
21+
}
1722
}
1823

1924
var path: String {
2025
switch self {
2126
case .fetchEmotions:
2227
return baseURL
23-
case .fetchEmotion(let date):
28+
case .loadEmotion(let date):
2429
return baseURL + "/\(date)"
2530
case .registerEmotion:
2631
return baseURL
@@ -30,7 +35,7 @@ extension EmotionEndpoint: Endpoint {
3035
var method: HTTPMethod {
3136
switch self {
3237
case .fetchEmotions: .get
33-
case .fetchEmotion: .get
38+
case .loadEmotion: .get
3439
case .registerEmotion: .post
3540
}
3641
}
@@ -51,7 +56,7 @@ extension EmotionEndpoint: Endpoint {
5156
switch self {
5257
case .fetchEmotions:
5358
return [:]
54-
case .fetchEmotion:
59+
case .loadEmotion:
5560
return [:]
5661
case .registerEmotion(let emotion):
5762
return ["emotionMarbleType": emotion]

Projects/DataSource/Sources/Repository/EmotionRepository.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ final class EmotionRepository: EmotionRepositoryProtocol {
1919
return emotionEntities
2020
}
2121

22-
func fetchEmotion(date: String) async throws -> EmotionEntity? {
23-
let endpoint = EmotionEndpoint.fetchEmotion(date: date)
22+
func loadEmotion(date: String) async throws -> EmotionEntity? {
23+
let endpoint = EmotionEndpoint.loadEmotion(date: date)
2424
guard let response = try await networkService.request(endpoint: endpoint, type: EmotionResponseDTO.self)
2525
else { throw NetworkError.unknown(description: "Emotion Reponse를 받아오지 못했습니다.") }
2626

Projects/Domain/Sources/Entity/EmotionEntity.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ public struct EmotionEntity {
1111
public let emotionType: String
1212
public let emotionName: String
1313
public let emotionImageUrl: URL?
14+
public let emotionMessage: String?
1415

1516
public init(
1617
emotionType: String,
1718
emotionName: String,
18-
emotionImageUrl: URL?
19+
emotionImageUrl: URL?,
20+
emotionMessage: String?
1921
) {
2022
self.emotionType = emotionType
2123
self.emotionName = emotionName
2224
self.emotionImageUrl = emotionImageUrl
25+
self.emotionMessage = emotionMessage
2326
}
2427
}

Projects/Domain/Sources/Protocol/Repository/EmotionRepositoryProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public protocol EmotionRepositoryProtocol {
1414
/// 해당하는 날짜에 등록한 감정 구슬을 조회합니다.
1515
/// - Parameter date: 조회하고 싶은 날짜 (yyyy-MM-dd)
1616
/// - Returns: 등록한 감정 구슬
17-
func fetchEmotion(date: String) async throws -> EmotionEntity?
17+
func loadEmotion(date: String) async throws -> EmotionEntity?
1818

1919
/// 감정 구슬을 등록합니다.
2020
/// - Parameter emotion: 감정 구슬 String 값

Projects/Domain/Sources/Protocol/UseCase/EmotionUseCaseProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ public protocol EmotionUseCaseProtocol {
1515
/// 해당하는 날짜에 등록된 감정 구슬을 조회합니다.
1616
/// - Parameter date: 조회하고 싶은 날짜
1717
/// - Returns: 감정 구슬
18-
func fetchEmotion(date: Date) async throws -> EmotionEntity?
18+
func loadEmotion(date: Date) async throws -> EmotionEntity?
1919
}

Projects/Domain/Sources/UseCase/Emotion/EmotionUseCase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public final class EmotionUseCase: EmotionUseCaseProtocol {
2020
return emotions
2121
}
2222

23-
public func fetchEmotion(date: Date) async throws -> EmotionEntity? {
23+
public func loadEmotion(date: Date) async throws -> EmotionEntity? {
2424
let dateString = date.convertToString(dateType: .yearMonthDate)
2525

26-
let emotion = try await emotionRepository.fetchEmotion(date: dateString)
26+
let emotion = try await emotionRepository.loadEmotion(date: dateString)
2727
return emotion
2828
}
2929
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

Projects/Presentation/Resources/Images.xcassets/add_routine_icon.imageset/Contents.json renamed to Projects/Presentation/Resources/Images.xcassets/Common/add_routine_icon.imageset/Contents.json

File renamed without changes.
591 Bytes

0 commit comments

Comments
 (0)