diff --git a/.DS_Store b/.DS_Store index 5c7e0718..51329bca 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/dogether.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/dogether.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2d36bc11..124cdc73 100644 --- a/dogether.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/dogether.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "67632596993244690140ed2f794de4454d2f57216919445edf9fd36f48e47246", + "originHash" : "9e26ea48cd905fd9c2808ca39939b8dbe7f495dae71ef08d40e9dbdbde0de604", "pins" : [ { "identity" : "abseil-cpp-binary", @@ -19,15 +19,6 @@ "version" : "11.2.0" } }, - { - "identity" : "chottulink-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ConnectingDotsInfotech/chottulink-ios-sdk.git", - "state" : { - "revision" : "08e129a44af36eb636aa04c63c357265bcaa0404", - "version" : "1.0.8" - } - }, { "identity" : "firebase-ios-sdk", "kind" : "remoteSourceControl", diff --git a/dogether/Data/Network/Request/ReviewTodoRequest.swift b/dogether/Data/Network/Request/ReviewTodoRequest.swift index 722f3914..0c9c34bc 100644 --- a/dogether/Data/Network/Request/ReviewTodoRequest.swift +++ b/dogether/Data/Network/Request/ReviewTodoRequest.swift @@ -11,7 +11,7 @@ struct ReviewTodoRequest: Encodable { let result: String let reviewFeedback: String - init(result: ReviewResults, reviewFeedback: String) { + init(result: ReviewStatus, reviewFeedback: String) { self.result = result.rawValue self.reviewFeedback = reviewFeedback } diff --git a/dogether/Data/Repository/ChallengeGroupsRepository.swift b/dogether/Data/Repository/ChallengeGroupsRepository.swift index 56ac1c9f..ed9ca244 100644 --- a/dogether/Data/Repository/ChallengeGroupsRepository.swift +++ b/dogether/Data/Repository/ChallengeGroupsRepository.swift @@ -24,7 +24,7 @@ final class ChallengeGroupsRepository: ChallengeGroupsProtocol { TodoEntity( id: $0.id, content: $0.content, - status: TodoStatus(rawValue: $0.status) ?? .waitCertification, + status: TodoStatus(rawValue: $0.status) ?? .uncertified, certificationContent: $0.certificationContent, certificationMediaUrl: $0.certificationMediaUrl, reviewFeedback: $0.reviewFeedback @@ -42,7 +42,7 @@ final class ChallengeGroupsRepository: ChallengeGroupsProtocol { TodoEntity( id: $0.id, content: $0.content, - status: TodoStatus(rawValue: $0.status) ?? .waitCertification, + status: TodoStatus(rawValue: $0.status) ?? .uncertified, thumbnailStatus: $0.isRead ? .done : .yet, certificationContent: $0.certificationContent, certificationMediaUrl: $0.certificationMediaUrl, diff --git a/dogether/Data/Repository/UserRepository.swift b/dogether/Data/Repository/UserRepository.swift index ef20cb2c..1f100865 100644 --- a/dogether/Data/Repository/UserRepository.swift +++ b/dogether/Data/Repository/UserRepository.swift @@ -68,7 +68,7 @@ final class UserRepository: UserProtocol { TodoEntity( id: info.id, content: info.content, - status: TodoStatus(rawValue: info.status) ?? .waitCertification, + status: TodoStatus(rawValue: info.status) ?? .uncertified, certificationContent: info.certificationContent, certificationMediaUrl: info.certificationMediaUrl, reviewFeedback: info.reviewFeedback, diff --git a/dogether/Data/RepositoryTest/ChallengeGroupsRepositoryTest.swift b/dogether/Data/RepositoryTest/ChallengeGroupsRepositoryTest.swift index 52fe8dd2..9eb785fc 100644 --- a/dogether/Data/RepositoryTest/ChallengeGroupsRepositoryTest.swift +++ b/dogether/Data/RepositoryTest/ChallengeGroupsRepositoryTest.swift @@ -12,17 +12,17 @@ final class ChallengeGroupsRepositoryTest: ChallengeGroupsProtocol { func getMyTodos(groupId: String, date: String) async throws -> [TodoEntity] { let certify_pendings = (1 ... 2).map { - TodoEntity(id: $0, content: "testTodo \($0)", status: .waitCertification) + TodoEntity(id: $0, content: "testTodo \($0)", status: .uncertified) } let review_pendings = (3 ... 4).map { - TodoEntity(id: $0, content: "testTodo \($0)", status: .waitExamination, certificationContent: "test todo content \($0)") + TodoEntity(id: $0, content: "testTodo \($0)", status: .reviewed(.pending), certificationContent: "test todo content \($0)") } let approves = (5 ... 6).map { - TodoEntity(id: $0, content: "testTodo \($0)", status: .approve, certificationContent: "test todo content \($0)") + TodoEntity(id: $0, content: "testTodo \($0)", status: .reviewed(.approve), certificationContent: "test todo content \($0)") } let rejects = (7 ... 8).map { TodoEntity( - id: $0, content: "testTodo \($0)testTodo \($0)testTodo \($0)", status: .reject, + id: $0, content: "testTodo \($0)testTodo \($0)testTodo \($0)", status: .reviewed(.reject), certificationContent: "test todo content \($0)test todo content \($0)test todo content \($0)", reviewFeedback: "test todo reject reason \($0)test todo reject reason \($0)test todo reject reason \($0)test todo reject reason \($0)" ) } @@ -31,22 +31,22 @@ final class ChallengeGroupsRepositoryTest: ChallengeGroupsProtocol { func getMemberTodos(groupId: Int, memberId: Int) async throws -> (index: Int, todos: [TodoEntity]) { return (index: 3, todos: [ - TodoEntity(id: 1, content: "신규 기능 개발", status: .waitCertification, thumbnailStatus: .done), - TodoEntity(id: 2, content: "치킨 먹기", status: .waitCertification, thumbnailStatus: .done, certificationContent: "치킨 냠냠", reviewFeedback: ""), - TodoEntity(id: 1, content: "신규 기능 개발", status: .waitCertification, thumbnailStatus: .done, reviewFeedback: "test"), - TodoEntity(id: 2, content: "치킨 먹기", status: .waitCertification, thumbnailStatus: .done, certificationContent: "치킨 냠냠"), - TodoEntity(id: 1, content: "신규 기능 개발", status: .waitExamination, thumbnailStatus: .yet), - TodoEntity(id: 2, content: "치킨 먹기", status: .waitExamination, thumbnailStatus: .yet, certificationContent: "치킨 냠냠", certificationMediaUrl: "https://dogether-bucket-dev.s3.ap-northeast-2.amazonaws.com/daily-todo-proof-media/mock/e.png"), - TodoEntity(id: 1, content: "신규 기능 개발", status: .waitExamination, thumbnailStatus: .yet, certificationMediaUrl: "https://dogether-bucket-dev.s3.ap-northeast-2.amazonaws.com/daily-todo-proof-media/mock/e1.png"), - TodoEntity(id: 2, content: "치킨 먹기", status: .approve, thumbnailStatus: .yet, certificationContent: "치킨 냠냠", certificationMediaUrl: "https://dogether-bucket-dev.s3.ap-northeast-2.amazonaws.com/daily-todo-proof-media/mock/e1.png"), - TodoEntity(id: 1, content: "신규 기능 개발", status: .approve, thumbnailStatus: .yet), - TodoEntity(id: 2, content: "치킨 먹기", status: .approve, thumbnailStatus: .yet, certificationContent: "치킨 냠냠"), - TodoEntity(id: 1, content: "신규 기능 개발", status: .approve, thumbnailStatus: .yet), - TodoEntity(id: 2, content: "치킨 먹기", status: .approve, thumbnailStatus: .yet, certificationContent: "치킨 냠냠"), - TodoEntity(id: 1, content: "신규 기능 개발", status: .reject, thumbnailStatus: .yet), - TodoEntity(id: 2, content: "치킨 먹기", status: .reject, thumbnailStatus: .yet, certificationContent: "치킨 냠냠"), - TodoEntity(id: 1, content: "신규 기능 개발", status: .reject, thumbnailStatus: .yet), - TodoEntity(id: 2, content: "치킨 먹기", status: .reject, thumbnailStatus: .yet, certificationContent: "치킨 냠냠") + TodoEntity(id: 1, content: "신규 기능 개발", status: .uncertified, thumbnailStatus: .done), + TodoEntity(id: 2, content: "치킨 먹기", status: .uncertified, thumbnailStatus: .done, certificationContent: "치킨 냠냠", reviewFeedback: ""), + TodoEntity(id: 1, content: "신규 기능 개발", status: .uncertified, thumbnailStatus: .done, reviewFeedback: "test"), + TodoEntity(id: 2, content: "치킨 먹기", status: .uncertified, thumbnailStatus: .done, certificationContent: "치킨 냠냠"), + TodoEntity(id: 1, content: "신규 기능 개발", status: .reviewed(.pending), thumbnailStatus: .yet), + TodoEntity(id: 2, content: "치킨 먹기", status: .reviewed(.pending), thumbnailStatus: .yet, certificationContent: "치킨 냠냠", certificationMediaUrl: "https://dogether-bucket-dev.s3.ap-northeast-2.amazonaws.com/daily-todo-proof-media/mock/e.png"), + TodoEntity(id: 1, content: "신규 기능 개발", status: .reviewed(.pending), thumbnailStatus: .yet, certificationMediaUrl: "https://dogether-bucket-dev.s3.ap-northeast-2.amazonaws.com/daily-todo-proof-media/mock/e1.png"), + TodoEntity(id: 2, content: "치킨 먹기", status: .reviewed(.approve), thumbnailStatus: .yet, certificationContent: "치킨 냠냠", certificationMediaUrl: "https://dogether-bucket-dev.s3.ap-northeast-2.amazonaws.com/daily-todo-proof-media/mock/e1.png"), + TodoEntity(id: 1, content: "신규 기능 개발", status: .reviewed(.approve), thumbnailStatus: .yet), + TodoEntity(id: 2, content: "치킨 먹기", status: .reviewed(.approve), thumbnailStatus: .yet, certificationContent: "치킨 냠냠"), + TodoEntity(id: 1, content: "신규 기능 개발", status: .reviewed(.approve), thumbnailStatus: .yet), + TodoEntity(id: 2, content: "치킨 먹기", status: .reviewed(.approve), thumbnailStatus: .yet, certificationContent: "치킨 냠냠"), + TodoEntity(id: 1, content: "신규 기능 개발", status: .reviewed(.reject), thumbnailStatus: .yet), + TodoEntity(id: 2, content: "치킨 먹기", status: .reviewed(.reject), thumbnailStatus: .yet, certificationContent: "치킨 냠냠"), + TodoEntity(id: 1, content: "신규 기능 개발", status: .reviewed(.reject), thumbnailStatus: .yet), + TodoEntity(id: 2, content: "치킨 먹기", status: .reviewed(.reject), thumbnailStatus: .yet, certificationContent: "치킨 냠냠") ]) } diff --git a/dogether/Data/RepositoryTest/UserRepositoryTest.swift b/dogether/Data/RepositoryTest/UserRepositoryTest.swift index 77dde783..469c6101 100644 --- a/dogether/Data/RepositoryTest/UserRepositoryTest.swift +++ b/dogether/Data/RepositoryTest/UserRepositoryTest.swift @@ -87,7 +87,7 @@ final class UserRepositoryTest: UserProtocol { TodoEntity( id: info.id, content: info.content, - status: TodoStatus(rawValue: info.status) ?? .waitCertification, + status: TodoStatus(rawValue: info.status) ?? .uncertified, certificationContent: info.certificationContent, certificationMediaUrl: info.certificationMediaUrl, reviewFeedback: info.reviewFeedback, diff --git a/dogether/Domain/Entity/Enum/ButtonStatus.swift b/dogether/Domain/Entity/Enum/ButtonStatus.swift index 8efbc232..4f95e446 100644 --- a/dogether/Domain/Entity/Enum/ButtonStatus.swift +++ b/dogether/Domain/Entity/Enum/ButtonStatus.swift @@ -14,18 +14,18 @@ enum ButtonStatus { var textColor: UIColor { switch self { case .enabled: - return .grey800 + return Color.Text.inverse case .disabled: - return .grey400 + return Color.Text.disabled } } var backgroundColor: UIColor { switch self { case .enabled: - return .blue300 + return Color.Background.primary case .disabled: - return .grey500 + return Color.Background.disabled } } } diff --git a/dogether/Domain/Entity/Enum/CertificationTypes.swift b/dogether/Domain/Entity/Enum/CertificationTypes.swift index f9137b80..62a44fde 100644 --- a/dogether/Domain/Entity/Enum/CertificationTypes.swift +++ b/dogether/Domain/Entity/Enum/CertificationTypes.swift @@ -9,40 +9,36 @@ import UIKit enum CertificationTypes { case achievement - case approve - case reject - + case review(ReviewStatus) + var iconImage: UIImage { switch self { case .achievement: return .achievement - case .approve: - return .approve - case .reject: - return .reject + case .review(let status): + return status.image ?? .achievement } } - + var text: String { switch self { case .achievement: return "달성" - case .approve: - return "인정" - case .reject: - return "노인정" + case .review(let status): + return status.text } } - - // FIXME: 추후 수정 + var titleLabelWidth: CGFloat { switch self { case .achievement: - 25 - case .approve: - 25 - case .reject: - 37 + return 25 + case .review(let status): + switch status { + case .pending: return 49 + case .approve: return 25 + case .reject: return 37 + } } } } diff --git a/dogether/Domain/Entity/Enum/FilterTypes.swift b/dogether/Domain/Entity/Enum/FilterTypes.swift index 3afb697a..081cbfcf 100644 --- a/dogether/Domain/Entity/Enum/FilterTypes.swift +++ b/dogether/Domain/Entity/Enum/FilterTypes.swift @@ -7,83 +7,113 @@ import UIKit -enum FilterTypes: String, CaseIterable, BaseEntity { - case all = "전체" - case wait = "검사 대기" - case reject = "노인정" - case approve = "인정" - +enum FilterTypes: BaseEntity, Equatable { + case all + case status(ReviewStatus) + + // MARK: - 스타일 속성 var tag: Int { switch self { case .all: return 0 - case .wait: - return 1 - case .reject: - return 2 - case .approve: - return 3 + case .status(let status): + switch status { + case .pending: return 1 + case .reject: return 2 + case .approve: return 3 + } } } - + + var text: String { + switch self { + case .all: + return "전체" + case .status(let status): + return status.text + } + } + var image: UIImage? { switch self { case .all: return nil - case .wait: - return .wait - case .reject: - return .reject - case .approve: - return .approve + case .status(let status): + return status.image } } - + var backgroundColor: UIColor { switch self { - case .all, .approve: - return .blue300 - case .wait: - return .dogetherYellow - case .reject: - return .dogetherRed + case .all: + return Color.Background.primary + case .status(let status): + return status.backgroundColor } } - + var emptyTitle: String { switch self { - case .wait: - return "검사 대기 중인 투두가 없어요" - case .reject: - return "노인정받은 투두가 없어요" - case .approve: - return "인정받은 투두가 없어요" - default: + case .all: return "" + case .status(let status): + switch status { + case .pending: + return "검사 대기 중인 투두가 없어요" + case .reject: + return "노인정받은 투두가 없어요" + case .approve: + return "인정받은 투두가 없어요" + } } } - - var reviewResult: ReviewResults? { + + var reviewStatus: ReviewStatus? { switch self { - case .reject: - return .reject - case .approve: - return .approve - default: + case .all: return nil + case .status(let status): + return status } } } +// MARK: - CaseIterable 대체 extension FilterTypes { - init?(status: String) { - switch status.uppercased() { + static var allCases: [FilterTypes] { + [.all, .status(.pending), .status(.reject), .status(.approve)] + } +} + +// MARK: - 서버 응답 매핑용 +extension FilterTypes { + init?(rawValue: String) { + switch rawValue { + case "전체": + self = .all + case "검사 대기": + self = .status(.pending) + case "노인정": + self = .status(.reject) + case "인정": + self = .status(.approve) + default: + return nil + } + } + + var rawValue: String { + return text + } + + init?(statusString: String) { + switch statusString.uppercased() { case "REVIEW_PENDING": - self = .wait + self = .status(.pending) case "REJECT": - self = .reject + self = .status(.reject) case "APPROVE": - self = .approve + self = .status(.approve) default: return nil } diff --git a/dogether/Domain/Entity/Enum/HistoryReadStatus.swift b/dogether/Domain/Entity/Enum/HistoryReadStatus.swift index bd4d4d41..3a8c7dea 100644 --- a/dogether/Domain/Entity/Enum/HistoryReadStatus.swift +++ b/dogether/Domain/Entity/Enum/HistoryReadStatus.swift @@ -14,9 +14,9 @@ enum HistoryReadStatus: String { var colors: [CGColor] { switch self { case .readYet: - return [UIColor.blue300.cgColor, UIColor.dogetherYellow.cgColor, UIColor.dogetherRed.cgColor] + return [UIColor.blue300.cgColor, UIColor.dogetherYellow.cgColor, UIColor.dogetherRed.cgColor] // FIXME: 컬러 추가 필요 case .readAll: - return [UIColor.grey500.cgColor, UIColor.grey500.cgColor] + return [UIColor.grey500.cgColor, UIColor.grey500.cgColor] // FIXME: 컬러 추가 필요 } } } diff --git a/dogether/Domain/Entity/Enum/PopupTypes.swift b/dogether/Domain/Entity/Enum/PopupTypes.swift index e377c597..76ab2e93 100644 --- a/dogether/Domain/Entity/Enum/PopupTypes.swift +++ b/dogether/Domain/Entity/Enum/PopupTypes.swift @@ -122,10 +122,10 @@ enum AlertTypes { var buttonColor: UIColor { switch self { case .leaveGroup, .withdraw: - return .dogetherRed + return .dogetherRed // FIXME: 컬러 추가 필요 case .pushNotice, .gallery, .camera, .logout, .saveTodo, .needLogout, .needRevoke, .alreadyParticipated, .fullGroup, .unableToParticipate: - return .blue300 + return Color.Background.primary } } diff --git a/dogether/Domain/Entity/Enum/ReviewResults.swift b/dogether/Domain/Entity/Enum/ReviewResults.swift deleted file mode 100644 index 9deeccd4..00000000 --- a/dogether/Domain/Entity/Enum/ReviewResults.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// ReviewResults.swift -// dogether -// -// Created by seungyooooong on 2/12/25. -// - -import Foundation - -enum ReviewResults: String { - case approve = "APPROVE" - case reject = "REJECT" -} diff --git a/dogether/Domain/Entity/Enum/ReviewStatus.swift b/dogether/Domain/Entity/Enum/ReviewStatus.swift new file mode 100644 index 00000000..98fd7e3c --- /dev/null +++ b/dogether/Domain/Entity/Enum/ReviewStatus.swift @@ -0,0 +1,47 @@ +// +// ReviewStatus.swift +// dogether +// +// Created by yujaehong on 2/2/26. +// + +import UIKit + +enum ReviewStatus: String, CaseIterable, BaseEntity { + case pending = "REVIEW_PENDING" // 검사 대기 + case reject = "REJECT" // 노인정 + case approve = "APPROVE" // 인정 + + var text: String { + switch self { + case .pending: + return "검사 대기" + case .reject: + return "노인정" + case .approve: + return "인정" + } + } + + var image: UIImage? { + switch self { + case .pending: + return .wait + case .reject: + return .reject + case .approve: + return .approve + } + } + + var backgroundColor: UIColor { + switch self { + case .pending: + return .dogetherYellow // FIXME: 컬러 추가 필요 + case .reject: + return .dogetherRed // FIXME: 컬러 추가 필요 + case .approve: + return Color.Background.primary + } + } +} diff --git a/dogether/Domain/Entity/Enum/TodoStatus.swift b/dogether/Domain/Entity/Enum/TodoStatus.swift index 265425e2..249ff299 100644 --- a/dogether/Domain/Entity/Enum/TodoStatus.swift +++ b/dogether/Domain/Entity/Enum/TodoStatus.swift @@ -7,61 +7,89 @@ import UIKit -enum TodoStatus: String, CaseIterable, BaseEntity { - case waitCertification = "CERTIFY_PENDING" - case waitExamination = "REVIEW_PENDING" - case reject = "REJECT" - case approve = "APPROVE" - +enum TodoStatus: BaseEntity, Equatable { + case uncertified // 미인증 + case reviewed(ReviewStatus) // 검사대기/노인정/인정 + + // MARK: - 서버 응답 매핑용 + init?(rawValue: String) { + switch rawValue { + case "CERTIFY_PENDING": + self = .uncertified + case "REVIEW_PENDING": + self = .reviewed(.pending) + case "REJECT": + self = .reviewed(.reject) + case "APPROVE": + self = .reviewed(.approve) + default: + return nil + } + } + + var rawValue: String { + switch self { + case .uncertified: + return "CERTIFY_PENDING" + case .reviewed(let status): + return status.rawValue + } + } + + // MARK: - 스타일 속성 var tag: Int { switch self { - case .waitCertification: + case .uncertified: return 0 - case .waitExamination: - return 1 - case .reject: - return 2 - case .approve: - return 3 + case .reviewed(let status): + switch status { + case .pending: return 1 + case .reject: return 2 + case .approve: return 3 + } } } - + var image: UIImage? { switch self { - case .waitCertification: + case .uncertified: return nil - case .waitExamination: - return .wait - case .reject: - return .reject - case .approve: - return .approve + case .reviewed(let status): + return status.image } } - + var text: String { switch self { - case .waitCertification: + case .uncertified: return "미인증" - case .waitExamination: - return "검사 대기" - case .reject: - return "노인정" - case .approve: - return "인정" + case .reviewed(let status): + return status.text } } - + var backgroundColor: UIColor { switch self { - case .waitCertification: - return .grey300 - case .waitExamination: - return .dogetherYellow - case .reject: - return .dogetherRed - case .approve: - return .blue300 + case .uncertified: + return .grey300 // FIXME: 컬러 추가 필요 + case .reviewed(let status): + return status.backgroundColor + } + } + + var reviewStatus: ReviewStatus? { + switch self { + case .uncertified: + return nil + case .reviewed(let status): + return status } } } + +// MARK: - CaseIterable 대체 +extension TodoStatus { + static var allCases: [TodoStatus] { + [.uncertified, .reviewed(.pending), .reviewed(.reject), .reviewed(.approve)] + } +} diff --git a/dogether/Domain/Entity/Model/MemberCertificationInfo.swift b/dogether/Domain/Entity/Model/MemberCertificationInfo.swift index 3c3bfc17..03b40051 100644 --- a/dogether/Domain/Entity/Model/MemberCertificationInfo.swift +++ b/dogether/Domain/Entity/Model/MemberCertificationInfo.swift @@ -19,7 +19,7 @@ struct MemberCertificationInfo { init( id: Int = 0, content: String = "", - status: TodoStatus = .waitCertification, + status: TodoStatus = .uncertified, certificationContent: String? = nil, certificationMediaUrl: String? = nil, feedback: String? = nil, diff --git a/dogether/Domain/Entity/ViewDatas/CertificateViewDatas.swift b/dogether/Domain/Entity/ViewDatas/CertificateViewDatas.swift index bea4533b..8af4a05c 100644 --- a/dogether/Domain/Entity/ViewDatas/CertificateViewDatas.swift +++ b/dogether/Domain/Entity/ViewDatas/CertificateViewDatas.swift @@ -13,7 +13,7 @@ struct CertificateViewDatas: BaseEntity { var isFirstResponder: Bool init( - todo: TodoEntity = TodoEntity(id: 0, content: "", status: .waitCertification), + todo: TodoEntity = TodoEntity(id: 0, content: "", status: .uncertified), keyboardHeight: CGFloat = 0, isFirstResponder: Bool = false ) { diff --git a/dogether/Domain/Entity/ViewDatas/ExaminateViewDatas.swift b/dogether/Domain/Entity/ViewDatas/ExaminateViewDatas.swift index 34331781..61a5a210 100644 --- a/dogether/Domain/Entity/ViewDatas/ExaminateViewDatas.swift +++ b/dogether/Domain/Entity/ViewDatas/ExaminateViewDatas.swift @@ -10,10 +10,10 @@ import Foundation struct ExaminateViewDatas: BaseEntity { var index: Int var reviews: [ReviewEntity] - var result: ReviewResults? + var result: ReviewStatus? var feedback: String - - init(index: Int = 0, reviews: [ReviewEntity] = [], result: ReviewResults? = nil, feedback: String = "") { + + init(index: Int = 0, reviews: [ReviewEntity] = [], result: ReviewStatus? = nil, feedback: String = "") { self.index = index self.reviews = reviews self.result = result diff --git a/dogether/Domain/UseCase/TodoCertificationsUseCase.swift b/dogether/Domain/UseCase/TodoCertificationsUseCase.swift index 5874de3e..dbca5e8b 100644 --- a/dogether/Domain/UseCase/TodoCertificationsUseCase.swift +++ b/dogether/Domain/UseCase/TodoCertificationsUseCase.swift @@ -18,7 +18,7 @@ final class TodoCertificationsUseCase { return try await repository.getReviews() } - func reviewTodo(todoId: String, result: ReviewResults?, reviewFeedback: String) async throws { + func reviewTodo(todoId: String, result: ReviewStatus?, reviewFeedback: String) async throws { guard let result else { return } let reviewTodoRequest = ReviewTodoRequest(result: result, reviewFeedback: reviewFeedback) try await repository.reviewTodo(todoId: todoId, reviewTodoRequest: reviewTodoRequest) diff --git a/dogether/Presentation/Base/BaseViewController.swift b/dogether/Presentation/Base/BaseViewController.swift index e541e8b8..aefa67c6 100644 --- a/dogether/Presentation/Base/BaseViewController.swift +++ b/dogether/Presentation/Base/BaseViewController.swift @@ -19,7 +19,7 @@ class BaseViewController: UIViewController, CoordinatorDelegate { override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .grey900 + view.backgroundColor = Color.Background.default guard let pages else { return } configurePages(pages) diff --git a/dogether/Presentation/Common/BottomSheetView.swift b/dogether/Presentation/Common/BottomSheetView.swift index ff3a1b35..f590653a 100644 --- a/dogether/Presentation/Common/BottomSheetView.swift +++ b/dogether/Presentation/Common/BottomSheetView.swift @@ -56,13 +56,13 @@ final class BottomSheetView: BaseView { override func configureView() { alpha = 0 - backgroundView.backgroundColor = UIColor.black.withAlphaComponent(0.5) // FIXME: 추후 ColorBackgroundDim 으로 변경 + backgroundView.backgroundColor = Color.Background.dim - sheetView.backgroundColor = .grey700 + sheetView.backgroundColor = Color.Background.surface sheetView.layer.cornerRadius = 12 sheetView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] - sheetTitleLabel.textColor = .grey0 + sheetTitleLabel.textColor = Color.Text.default sheetTitleLabel.font = Fonts.head2B itemListStackView.axis = .vertical @@ -151,7 +151,7 @@ final class BottomSheetView: BaseView { extension BottomSheetView { private func itemButton(index: Int, title: String, isSelected: Bool) -> UIButton { let button = UIButton() - button.backgroundColor = .grey700 + button.backgroundColor = Color.Background.surface button.addAction( UIAction { [weak self] _ in guard let self else { return } @@ -172,7 +172,7 @@ extension BottomSheetView { let titleLabel = UILabel() titleLabel.text = title - titleLabel.textColor = isSelected ? .blue300 : .grey400 + titleLabel.textColor = isSelected ? Color.Text.primary : Color.Text.disabled titleLabel.font = isSelected ? Fonts.body1B : Fonts.body1S let checkImageView = UIImageView(image: .check) @@ -201,7 +201,7 @@ extension BottomSheetView { private func addGroupButton() -> UIButton { let button = UIButton() - button.backgroundColor = .grey700 + button.backgroundColor = Color.Background.surface button.addAction( UIAction { [weak self] _ in guard let self else { return } @@ -216,7 +216,7 @@ extension BottomSheetView { let titleLabel = UILabel() titleLabel.text = "새 그룹 추가하기" - titleLabel.textColor = .grey200 + titleLabel.textColor = Color.Text.subtle titleLabel.font = Fonts.body1B [addGroupImageView, titleLabel].forEach { button.addSubview($0) } diff --git a/dogether/Presentation/Common/CertificationImageView.swift b/dogether/Presentation/Common/CertificationImageView.swift index 7b507d11..38fa39b2 100644 --- a/dogether/Presentation/Common/CertificationImageView.swift +++ b/dogether/Presentation/Common/CertificationImageView.swift @@ -36,7 +36,7 @@ final class CertificationImageView: BaseImageView { override func configureView() { image = type.image contentMode = .scaleAspectFit - backgroundColor = .grey900 + backgroundColor = Color.Background.default clipsToBounds = true layer.cornerRadius = 12 @@ -51,17 +51,17 @@ final class CertificationImageView: BaseImageView { gradientLayer.cornerRadius = 12 gradientView.layer.cornerRadius = 12 - gradientView.layer.borderColor = UIColor.grey700.cgColor + gradientView.layer.borderColor = UIColor.grey700.cgColor // FIXME: 색상 추가 필요 gradientView.layer.borderWidth = 1 certificationContentLabel.attributedText = NSAttributedString( string: type.content ?? "", attributes: Fonts.getAttributes(for: Fonts.body1R, textAlignment: .center) ) - certificationContentLabel.textColor = .grey0 + certificationContentLabel.textColor = Color.Text.default certificationContentLabel.numberOfLines = 0 - certificatorLabel.textColor = .grey100 + certificatorLabel.textColor = .grey100 // FIXME: 색상 추가 필요 certificatorLabel.font = Fonts.head2B } diff --git a/dogether/Presentation/Common/DogetherGroupInfo.swift b/dogether/Presentation/Common/DogetherGroupInfo.swift index 105e75d6..67f806f2 100644 --- a/dogether/Presentation/Common/DogetherGroupInfo.swift +++ b/dogether/Presentation/Common/DogetherGroupInfo.swift @@ -14,14 +14,14 @@ final class DogetherGroupInfo: BaseView { private func descriptionLabel() -> UILabel { let label = UILabel() - label.textColor = .blue300 + label.textColor = Color.Text.primary label.font = Fonts.body1B return label } private func infoLabel() -> UILabel { let label = UILabel() - label.textColor = .grey200 + label.textColor = Color.Text.subtle label.font = Fonts.body1R return label } @@ -43,13 +43,13 @@ final class DogetherGroupInfo: BaseView { private var currentEndAtString: String? override func configureView() { - groupInfoView.backgroundColor = .grey700 + groupInfoView.backgroundColor = Color.Background.surface groupInfoView.layer.cornerRadius = 12 - groupNameLabel.textColor = .grey0 + groupNameLabel.textColor = Color.Text.default groupNameLabel.font = Fonts.head1B - dividerView.backgroundColor = .grey600 + dividerView.backgroundColor = .grey600 // // FIXME: 색상 추가 필요 durationDescriptionLabel = descriptionLabel() memberCountDescriptionLabel = descriptionLabel() diff --git a/dogether/Presentation/Common/DogetherHeader.swift b/dogether/Presentation/Common/DogetherHeader.swift index 8021ab2a..04ef4f27 100644 --- a/dogether/Presentation/Common/DogetherHeader.swift +++ b/dogether/Presentation/Common/DogetherHeader.swift @@ -28,14 +28,14 @@ final class DogetherHeader: BaseView { private let dogetherIconTypo = { let imageView = UIImageView() imageView.image = .logoTypo.withRenderingMode(.alwaysTemplate) - imageView.tintColor = .grey0 + imageView.tintColor = Color.Icon.default return imageView }() private let myPageButton = { let button = UIButton() button.setImage(.myPage.withRenderingMode(.alwaysTemplate), for: .normal) - button.tintColor = .grey0 + button.tintColor = Color.Icon.default return button }() diff --git a/dogether/Presentation/Common/DogetherTextView.swift b/dogether/Presentation/Common/DogetherTextView.swift index 2c0b1524..f633a5e3 100644 --- a/dogether/Presentation/Common/DogetherTextView.swift +++ b/dogether/Presentation/Common/DogetherTextView.swift @@ -27,7 +27,7 @@ final class DogetherTextView: BaseTextView { private(set) var currentIsShowKeyboard: Bool? override func configureView() { - textColor = .grey50 + textColor = .grey50 // FIXME: 컬러 추가 필요 font = Fonts.body1S tintColor = .blue300 @@ -36,7 +36,7 @@ final class DogetherTextView: BaseTextView { textContainer.lineFragmentPadding = 0 textContainerInset = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16) - backgroundColor = .grey800 + backgroundColor = Color.Background.elavated layer.cornerRadius = 12 layer.borderWidth = 1 @@ -44,14 +44,14 @@ final class DogetherTextView: BaseTextView { string: type.placeHolder, attributes: Fonts.getAttributes(for: Fonts.body1S, textAlignment: .left) ) - placeHolder.textColor = .grey300 + placeHolder.textColor = Color.Text.secondary placeHolder.numberOfLines = 0 placeHolder.lineBreakMode = .byWordWrapping textCountLabel.font = Fonts.smallS maxLengthLabel.text = "/\(type.maxLength)" - maxLengthLabel.textColor = .grey400 + maxLengthLabel.textColor = Color.Text.disabled maxLengthLabel.font = Fonts.smallS } @@ -100,8 +100,8 @@ final class DogetherTextView: BaseTextView { if currentIsShowKeyboard != datas.isShowKeyboard { currentIsShowKeyboard = datas.isShowKeyboard - layer.borderColor = datas.isShowKeyboard ? UIColor.blue300.cgColor : UIColor.clear.cgColor - textCountLabel.textColor = datas.isShowKeyboard ? .blue300 : .grey400 + layer.borderColor = datas.isShowKeyboard ? Color.Border.primary.cgColor : UIColor.clear.cgColor + textCountLabel.textColor = datas.isShowKeyboard ? Color.Text.primary : Color.Text.disabled } } } diff --git a/dogether/Presentation/Common/EmptyStateView.swift b/dogether/Presentation/Common/EmptyStateView.swift index 846852fa..a75aee0a 100644 --- a/dogether/Presentation/Common/EmptyStateView.swift +++ b/dogether/Presentation/Common/EmptyStateView.swift @@ -31,12 +31,12 @@ final class EmptyStateView: BaseView { titleLabel.text = title titleLabel.font = Fonts.head2B - titleLabel.textColor = .grey200 + titleLabel.textColor = Color.Text.subtle titleLabel.textAlignment = .center descriptionLabel.text = descriptionText descriptionLabel.font = Fonts.body2R - descriptionLabel.textColor = .grey400 + descriptionLabel.textColor = Color.Text.disabled descriptionLabel.textAlignment = .center descriptionLabel.numberOfLines = 2 } diff --git a/dogether/Presentation/Common/FilterButton.swift b/dogether/Presentation/Common/FilterButton.swift deleted file mode 100644 index 7b690321..00000000 --- a/dogether/Presentation/Common/FilterButton.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// FilterButton.swift -// dogether -// -// Created by seungyooooong on 2/16/25. -// - -import UIKit - -final class FilterButton: BaseButton { - var mainDelegate: MainDelegate? { - didSet { - addAction( - UIAction { [weak self] _ in - guard let self else { return } - mainDelegate?.selectFilterAction(filterType: type) - }, for: .touchUpInside - ) - } - } - - var certificationListDelegate: CertificationListPageDelegate? { - didSet { - addAction( - UIAction { [weak self] _ in - guard let self else { return } - certificationListDelegate?.selectFilterAction(filterType: type) - }, for: .touchUpInside - ) - } - } - - private let type: FilterTypes - - init(type: FilterTypes) { - self.type = type - - super.init(frame: .zero) - } - required init?(coder: NSCoder) { fatalError() } - - private let icon = UIImageView() - private let label = UILabel() - private let stackView = UIStackView() - - override func configureView() { - layer.cornerRadius = 16 - layer.borderWidth = 1 - - icon.image = type.image?.withRenderingMode(.alwaysTemplate) - - label.text = type.rawValue - label.font = Fonts.body2S - - stackView.axis = .horizontal - stackView.spacing = 4 - stackView.alignment = .center - stackView.isUserInteractionEnabled = false - } - - override func configureAction() { } - - override func configureHierarchy() { - let views = icon.image == nil ? [label] : [icon, label] - views.forEach { stackView.addArrangedSubview($0) } - - [stackView].forEach { addSubview($0) } - } - - override func configureConstraints() { - stackView.snp.makeConstraints { - $0.verticalEdges.equalToSuperview().inset(6) - $0.horizontalEdges.equalToSuperview().inset(12) - $0.center.equalToSuperview() - } - - icon.snp.makeConstraints { - $0.width.height.equalTo(16) - } - } - - // MARK: - updateView - override func updateView(_ data: any BaseEntity) { - if let datas = data as? FilterTypes { - let isColorful = type == datas - - backgroundColor = isColorful ? type.backgroundColor : .clear - layer.borderColor = isColorful ? type.backgroundColor.cgColor : UIColor.grey500.cgColor - icon.tintColor = isColorful ? .grey900 : .grey400 - label.textColor = isColorful ? .grey800 : .grey300 - } - } -} diff --git a/dogether/Presentation/Common/FilterStackView.swift b/dogether/Presentation/Common/FilterStackView.swift index f9b4c51c..36ea7de9 100644 --- a/dogether/Presentation/Common/FilterStackView.swift +++ b/dogether/Presentation/Common/FilterStackView.swift @@ -10,38 +10,38 @@ import Foundation final class FilterStackView: BaseStackView { var mainDelegate: MainDelegate? { didSet { - [allButton, waitButton, approveButton, rejectButton].forEach { $0.mainDelegate = mainDelegate } + [allChip, waitChip, approveChip, rejectChip].forEach { $0.mainDelegate = mainDelegate } } } - + var certificationListDelegate: CertificationListPageDelegate? { didSet { - [allButton, waitButton, approveButton, rejectButton].forEach { $0.certificationListDelegate = certificationListDelegate } + [allChip, waitChip, approveChip, rejectChip].forEach { $0.certificationListDelegate = certificationListDelegate } } } - - private let allButton = FilterButton(type: .all) - private let waitButton = FilterButton(type: .wait) - private let rejectButton = FilterButton(type: .reject) - private let approveButton = FilterButton(type: .approve) - + + private let allChip = StatusChip(filterType: .all) + private let waitChip = StatusChip(filterType: .status(.pending)) + private let rejectChip = StatusChip(filterType: .status(.reject)) + private let approveChip = StatusChip(filterType: .status(.approve)) + override func configureView() { axis = .horizontal spacing = 8 } - + override func configureAction() { } - + override func configureHierarchy() { - [allButton, waitButton, approveButton, rejectButton].forEach { addArrangedSubview($0) } + [allChip, waitChip, approveChip, rejectChip].forEach { addArrangedSubview($0) } } - + override func configureConstraints() { } - + // MARK: - updateView override func updateView(_ data: any BaseEntity) { if let datas = data as? FilterTypes { - [allButton, waitButton, rejectButton, approveButton].forEach { $0.updateView(datas) } + [allChip, waitChip, rejectChip, approveChip].forEach { $0.updateView(datas) } } } } diff --git a/dogether/Presentation/Common/JoinCodeShareButton.swift b/dogether/Presentation/Common/JoinCodeShareButton.swift index 73cfdb1e..3fdc41fb 100644 --- a/dogether/Presentation/Common/JoinCodeShareButton.swift +++ b/dogether/Presentation/Common/JoinCodeShareButton.swift @@ -16,12 +16,12 @@ final class JoinCodeShareButton: BaseButton { override func configureView() { layer.cornerRadius = 12 - backgroundColor = .grey700 + backgroundColor = Color.Background.surface - codeLabel.textColor = .grey0 + codeLabel.textColor = Color.Text.default codeLabel.font = Fonts.head1B - iconImageView.tintColor = .grey400 + iconImageView.tintColor = Color.Icon.secondary stackView.axis = .horizontal stackView.spacing = 8 diff --git a/dogether/Presentation/Common/NavigationHeader.swift b/dogether/Presentation/Common/NavigationHeader.swift index d3edc3fb..16143250 100644 --- a/dogether/Presentation/Common/NavigationHeader.swift +++ b/dogether/Presentation/Common/NavigationHeader.swift @@ -32,13 +32,13 @@ final class NavigationHeader: BaseView{ private let prevButton = { let button = UIButton() button.setImage(.arrowLeft.withRenderingMode(.alwaysTemplate), for: .normal) - button.tintColor = .grey0 + button.tintColor = Color.Icon.default return button }() private let titleLabel = { let label = UILabel() - label.textColor = .grey0 + label.textColor = Color.Text.default label.font = Fonts.head2B return label }() diff --git a/dogether/Presentation/Common/ReviewFeedbackView.swift b/dogether/Presentation/Common/ReviewFeedbackView.swift index a2254a07..bda9605d 100644 --- a/dogether/Presentation/Common/ReviewFeedbackView.swift +++ b/dogether/Presentation/Common/ReviewFeedbackView.swift @@ -11,10 +11,10 @@ final class ReviewFeedbackView: BaseView { private let reviewFeedbackLabel = UILabel() override func configureView() { - backgroundColor = .grey700 + backgroundColor = Color.Background.surface layer.cornerRadius = 8 - reviewFeedbackLabel.textColor = .grey0 + reviewFeedbackLabel.textColor = Color.Text.default reviewFeedbackLabel.numberOfLines = 0 } diff --git a/dogether/Presentation/Common/SkeletonView.swift b/dogether/Presentation/Common/SkeletonView.swift index 91a4c245..fe63ab2c 100644 --- a/dogether/Presentation/Common/SkeletonView.swift +++ b/dogether/Presentation/Common/SkeletonView.swift @@ -9,7 +9,7 @@ import Foundation final class SkeletonView: BaseView { override func configureView() { - backgroundColor = .grey700 + backgroundColor = Color.Background.surface layer.cornerRadius = 8 } } diff --git a/dogether/Presentation/Common/StatusChip.swift b/dogether/Presentation/Common/StatusChip.swift new file mode 100644 index 00000000..88fa04cc --- /dev/null +++ b/dogether/Presentation/Common/StatusChip.swift @@ -0,0 +1,141 @@ +// +// StatusChip.swift +// dogether +// +// Created by yujaehong on 2/2/26. +// + +import UIKit + +enum StatusChipMode { + case selectable(FilterTypes) + case display +} + +final class StatusChip: BaseButton { + // MARK: - Delegates + var mainDelegate: MainDelegate? { + didSet { + guard case let .selectable(filterType) = mode else { return } + addAction( + UIAction { [weak self] _ in + guard let self else { return } + mainDelegate?.selectFilterAction(filterType: filterType) + }, for: .touchUpInside + ) + } + } + + var certificationListDelegate: CertificationListPageDelegate? { + didSet { + guard case let .selectable(filterType) = mode else { return } + addAction( + UIAction { [weak self] _ in + guard let self else { return } + certificationListDelegate?.selectFilterAction(filterType: filterType) + }, for: .touchUpInside + ) + } + } + + private let mode: StatusChipMode + + private let icon = UIImageView() + private let label = UILabel() + private let stackView = UIStackView() + + // MARK: - Initializers + + init(filterType: FilterTypes) { + self.mode = .selectable(filterType) + super.init(frame: .zero) + } + + init() { + self.mode = .display + + super.init(frame: .zero) + } + + required init?(coder: NSCoder) { fatalError() } + + // MARK: - Configure + + override func configureView() { + layer.cornerRadius = 16 + + switch mode { + case let .selectable(filterType): + layer.borderWidth = 1 + icon.image = filterType.image?.withRenderingMode(.alwaysTemplate) + label.text = filterType.text + case .display: + layer.borderWidth = 0 + } + + label.font = Fonts.body2S + + stackView.axis = .horizontal + stackView.spacing = 4 + stackView.alignment = .center + stackView.isUserInteractionEnabled = false + } + + override func configureAction() { } + + override func configureHierarchy() { + let views = icon.image == nil ? [label] : [icon, label] + views.forEach { stackView.addArrangedSubview($0) } + + addSubview(stackView) + } + + override func configureConstraints() { + stackView.snp.makeConstraints { + $0.verticalEdges.equalToSuperview().inset(6) + $0.horizontalEdges.equalToSuperview().inset(12) + $0.center.equalToSuperview() + } + + icon.snp.makeConstraints { + $0.width.height.equalTo(16) + } + } + + // MARK: - updateView + + override func updateView(_ data: any BaseEntity) { + switch mode { + case let .selectable(filterType): + updateSelectableStyle(data, filterType: filterType) + case .display: + updateDisplayStyle(data) + } + } + + private func updateSelectableStyle(_ data: any BaseEntity, filterType: FilterTypes) { + guard let selectedFilter = data as? FilterTypes else { return } + + let isSelected = filterType == selectedFilter + + backgroundColor = isSelected ? filterType.backgroundColor : .clear + layer.borderColor = isSelected ? filterType.backgroundColor.cgColor : UIColor.grey500.cgColor // FIXME: 컬러 추가 필요 + icon.tintColor = isSelected ? .grey900 : Color.Icon.secondary // FIXME: 컬러 추가 필요 + label.textColor = isSelected ? Color.Text.inverse : Color.Text.secondary + } + + private func updateDisplayStyle(_ data: any BaseEntity) { + if let status = data as? TodoStatus { + backgroundColor = status.backgroundColor + icon.image = status.image?.withRenderingMode(.alwaysTemplate) + icon.tintColor = .grey900 // FIXME: 컬러 추가 필요 + label.text = status.text + label.textColor = Color.Text.inverse + + stackView.arrangedSubviews.forEach { stackView.removeArrangedSubview($0); $0.removeFromSuperview() } + + let views = icon.image == nil ? [label] : [icon, label] + views.forEach { stackView.addArrangedSubview($0) } + } + } +} diff --git a/dogether/Presentation/Common/TodoStatusButton.swift b/dogether/Presentation/Common/TodoStatusButton.swift deleted file mode 100644 index f185d8e2..00000000 --- a/dogether/Presentation/Common/TodoStatusButton.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// TodoStatusButton.swift -// dogether -// -// Created by seungyooooong on 6/11/25. -// - -import UIKit - -final class TodoStatusButton: BaseButton { - private let icon = UIImageView() - private let label = UILabel() - private let stackView = UIStackView() - - override func configureView() { - layer.cornerRadius = 16 - - icon.tintColor = .grey900 - - label.textColor = .grey800 - label.font = Fonts.body2S - - stackView.axis = .horizontal - stackView.spacing = 4 - stackView.alignment = .center - stackView.isUserInteractionEnabled = false - - let views = icon.image == nil ? [label] : [icon, label] - views.forEach { stackView.addArrangedSubview($0) } - } - - override func configureAction() { } - - override func configureHierarchy() { - [stackView].forEach { addSubview($0) } - } - - override func configureConstraints() { - stackView.snp.makeConstraints { - $0.verticalEdges.equalToSuperview().inset(6) - $0.horizontalEdges.equalToSuperview().inset(12) - $0.center.equalToSuperview() - } - - icon.snp.makeConstraints { - $0.width.height.equalTo(16) - } - } - - // MARK: - updateView - override func updateView(_ data: any BaseEntity) { - if let datas = data as? TodoStatus { - backgroundColor = datas.backgroundColor - icon.image = datas.image?.withRenderingMode(.alwaysTemplate) - label.text = datas.text - - stackView.arrangedSubviews.forEach { stackView.removeArrangedSubview($0) } - - let views = icon.image == nil ? [label] : [icon, label] - views.forEach { stackView.addArrangedSubview($0) } - } - } -} diff --git a/dogether/Presentation/Features/Certificate/Components/CertificateButton.swift b/dogether/Presentation/Features/Certificate/Components/CertificateButton.swift index 14f16583..b506072a 100644 --- a/dogether/Presentation/Features/Certificate/Components/CertificateButton.swift +++ b/dogether/Presentation/Features/Certificate/Components/CertificateButton.swift @@ -23,13 +23,13 @@ final class CertificateButton: BaseButton { override func configureView() { layer.cornerRadius = 8 - backgroundColor = .grey700 + backgroundColor = Color.Background.surface tag = type.rawValue iconImageView.image = type.image label.text = type.title - label.textColor = .grey200 + label.textColor = Color.Text.subtle label.font = Fonts.body1S stackView.axis = .horizontal diff --git a/dogether/Presentation/Features/Certificate/Components/CertificateContentPage.swift b/dogether/Presentation/Features/Certificate/Components/CertificateContentPage.swift index 98b50c78..c29b9db8 100644 --- a/dogether/Presentation/Features/Certificate/Components/CertificateContentPage.swift +++ b/dogether/Presentation/Features/Certificate/Components/CertificateContentPage.swift @@ -24,14 +24,14 @@ final class CertificateContentPage: BasePage { private let descriptionView = { let view = UIView() view.layer.cornerRadius = 8 - view.layer.borderColor = UIColor.grey600.cgColor + view.layer.borderColor = Color.Border.disabled.cgColor view.layer.borderWidth = 1 let imageView = UIImageView(image: .notice) let label = UILabel() label.text = "한번 인증한 내용은 바꿀 수 없어요" - label.textColor = .grey200 + label.textColor = Color.Text.subtle label.font = Fonts.body2S let stackView = UIStackView(arrangedSubviews: [imageView, label]) @@ -59,7 +59,7 @@ final class CertificateContentPage: BasePage { override func configureView() { descriptionLabel.text = "인증 내용을 보완해주세요!" - descriptionLabel.textColor = .grey0 + descriptionLabel.textColor = Color.Text.default descriptionLabel.textAlignment = .center descriptionLabel.font = Fonts.head1B } diff --git a/dogether/Presentation/Features/Certificate/Components/CertificateImagePage.swift b/dogether/Presentation/Features/Certificate/Components/CertificateImagePage.swift index 559020b3..085a94ef 100644 --- a/dogether/Presentation/Features/Certificate/Components/CertificateImagePage.swift +++ b/dogether/Presentation/Features/Certificate/Components/CertificateImagePage.swift @@ -30,7 +30,7 @@ final class CertificateImagePage: BasePage { private let certificateButton = DogetherButton("다음") override func configureView() { - todoContentLabel.textColor = .grey0 + todoContentLabel.textColor = Color.Text.default todoContentLabel.numberOfLines = 0 certificationStackView.axis = .horizontal diff --git a/dogether/Presentation/Features/Certification/Components/CertificationPage.swift b/dogether/Presentation/Features/Certification/Components/CertificationPage.swift index 41af8f01..279fd800 100644 --- a/dogether/Presentation/Features/Certification/Components/CertificationPage.swift +++ b/dogether/Presentation/Features/Certification/Components/CertificationPage.swift @@ -26,7 +26,7 @@ final class CertificationPage: BasePage { private let certificationScrollView = UIScrollView() private let certificationStackView = UIStackView() private let certificationListView = CertificationListView() - private let statusView = TodoStatusButton() + private let statusView = StatusChip() private let contentLabel = UILabel() private let reviewFeedbackView = ReviewFeedbackView() // private let certificateButton = DogetherButton("인증하기") @@ -45,7 +45,7 @@ final class CertificationPage: BasePage { certificationStackView.setCustomSpacing(8, after: statusView) certificationStackView.setCustomSpacing(16, after: contentLabel) - contentLabel.textColor = .grey0 + contentLabel.textColor = Color.Text.default contentLabel.numberOfLines = 0 } diff --git a/dogether/Presentation/Features/Certification/Components/ThumbnailView.swift b/dogether/Presentation/Features/Certification/Components/ThumbnailView.swift index 37d429ec..73b7f855 100644 --- a/dogether/Presentation/Features/Certification/Components/ThumbnailView.swift +++ b/dogether/Presentation/Features/Certification/Components/ThumbnailView.swift @@ -16,7 +16,7 @@ final class ThumbnailView: BaseView { private(set) var currentIsHighlizghted: Bool? override func configureView() { - backgroundColor = .grey800 + backgroundColor = Color.Background.elavated layer.cornerRadius = 12 layer.borderWidth = 1 @@ -24,7 +24,7 @@ final class ThumbnailView: BaseView { imageView.clipsToBounds = true imageView.layer.cornerRadius = 12 - doneOverlayView.backgroundColor = .grey800.withAlphaComponent(0.8) + doneOverlayView.backgroundColor = Color.Background.dim doneOverlayView.layer.cornerRadius = 12 } diff --git a/dogether/Presentation/Features/CertificationList/Components/CertificationListCell.swift b/dogether/Presentation/Features/CertificationList/Components/CertificationListCell.swift index d22ecfc8..8b49ddd4 100644 --- a/dogether/Presentation/Features/CertificationList/Components/CertificationListCell.swift +++ b/dogether/Presentation/Features/CertificationList/Components/CertificationListCell.swift @@ -11,7 +11,7 @@ final class CertificationCell: UICollectionViewCell { static let reuseIdentifier = "CertificationCell" private let imageView = UIImageView() - private let statusButton = TodoStatusButton() + private let statusView = StatusChip() override init(frame: CGRect) { super.init(frame: frame) @@ -23,13 +23,13 @@ final class CertificationCell: UICollectionViewCell { imageView.clipsToBounds = true contentView.addSubview(imageView) - contentView.addSubview(statusButton) + contentView.addSubview(statusView) imageView.snp.makeConstraints { $0.top.leading.trailing.bottom.equalToSuperview() } - statusButton.snp.makeConstraints { + statusView.snp.makeConstraints { $0.leading.equalToSuperview().offset(12) $0.bottom.equalToSuperview().offset(-12) } @@ -46,6 +46,6 @@ final class CertificationCell: UICollectionViewCell { func configure(with certificationItem: TodoEntity) { imageView.loadImage(url: certificationItem.certificationMediaUrl) - statusButton.updateView(certificationItem.status) + statusView.updateView(certificationItem.status) } } diff --git a/dogether/Presentation/Features/CertificationList/Components/CertificationListContentView.swift b/dogether/Presentation/Features/CertificationList/Components/CertificationListContentView.swift index fb39d5b1..176c49ab 100644 --- a/dogether/Presentation/Features/CertificationList/Components/CertificationListContentView.swift +++ b/dogether/Presentation/Features/CertificationList/Components/CertificationListContentView.swift @@ -28,7 +28,7 @@ final class CertificationListContentView: BaseView { private(set) var isPagingRequestInProgress: Bool = false override func configureView() { - headerLabel.textColor = .grey0 + headerLabel.textColor = Color.Text.default headerLabel.font = Fonts.head1B headerLabel.numberOfLines = 0 @@ -104,7 +104,7 @@ final class CertificationListContentView: BaseView { sections = datas.sections.compactMap { section in let filteredTodos = section.todos.filter { - datas.filter == .all || datas.filter == FilterTypes(status: $0.status.rawValue) + datas.filter == .all || datas.filter.reviewStatus == $0.status.reviewStatus } return filteredTodos.isEmpty ? nil : SectionEntity(type: section.type, todos: filteredTodos) } @@ -134,7 +134,7 @@ extension CertificationListContentView { if let range = fullText.range(of: targetText) { let nsRange = NSRange(range, in: fullText) - attributedString.addAttribute(.foregroundColor, value: UIColor.blue300, range: nsRange) + attributedString.addAttribute(.foregroundColor, value: Color.Text.primary, range: nsRange) } headerLabel.attributedText = attributedString diff --git a/dogether/Presentation/Features/CertificationList/Components/CertificationSectionHeader.swift b/dogether/Presentation/Features/CertificationList/Components/CertificationSectionHeader.swift index 1ac5e0dd..769e98e2 100644 --- a/dogether/Presentation/Features/CertificationList/Components/CertificationSectionHeader.swift +++ b/dogether/Presentation/Features/CertificationList/Components/CertificationSectionHeader.swift @@ -16,7 +16,7 @@ final class CertificationSectionHeader: UICollectionReusableView { super.init(frame: frame) titleLabel.font = .boldSystemFont(ofSize: 18) - titleLabel.textColor = .white + titleLabel.textColor = Color.Text.default addSubview(titleLabel) diff --git a/dogether/Presentation/Features/CertificationList/Components/CertificationSortButton.swift b/dogether/Presentation/Features/CertificationList/Components/CertificationSortButton.swift index 77f6ae0b..5c1f5bbd 100644 --- a/dogether/Presentation/Features/CertificationList/Components/CertificationSortButton.swift +++ b/dogether/Presentation/Features/CertificationList/Components/CertificationSortButton.swift @@ -15,11 +15,11 @@ final class CertificationSortButton: BaseButton { backgroundColor = .clear layer.cornerRadius = 16 layer.borderWidth = 1 - layer.borderColor = UIColor.grey500.cgColor + layer.borderColor = UIColor.grey500.cgColor // FIXME: 컬러 추가 필요 clipsToBounds = true sortTitleLabel.font = Fonts.body2S - sortTitleLabel.textColor = .white + sortTitleLabel.textColor = Color.Text.default arrowImageView.contentMode = .scaleAspectFit } diff --git a/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryStatView.swift b/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryStatView.swift index 1168c8dc..f2670455 100644 --- a/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryStatView.swift +++ b/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryStatView.swift @@ -22,7 +22,7 @@ final class CertificationSummaryStatView: BaseView { private let countLabel = UILabel() override func configureView() { - backgroundColor = .grey700 + backgroundColor = Color.Background.surface layer.cornerRadius = 12 clipsToBounds = true @@ -31,11 +31,11 @@ final class CertificationSummaryStatView: BaseView { titleLabel.text = type.text titleLabel.font = Fonts.body2S - titleLabel.textColor = .grey200 + titleLabel.textColor = Color.Text.subtle titleLabel.textAlignment = .center countLabel.font = Fonts.head2B - countLabel.textColor = .grey0 + countLabel.textColor = Color.Text.default countLabel.textAlignment = .center } diff --git a/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryView.swift b/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryView.swift index f0da9f1d..6be0d100 100644 --- a/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryView.swift +++ b/dogether/Presentation/Features/CertificationList/Components/CertificationSummaryView.swift @@ -10,8 +10,8 @@ import UIKit final class CertificationSummaryView: BaseView { private let stackView = UIStackView() private let achievedView = CertificationSummaryStatView(type: .achievement) - private let certifiedView = CertificationSummaryStatView(type: .approve) - private let notCertifiedView = CertificationSummaryStatView(type: .reject) + private let certifiedView = CertificationSummaryStatView(type: .review(.approve)) + private let notCertifiedView = CertificationSummaryStatView(type: .review(.reject)) override func configureView() { stackView.axis = .horizontal diff --git a/dogether/Presentation/Features/Complete/Components/CompletePage.swift b/dogether/Presentation/Features/Complete/Components/CompletePage.swift index 53cfacb6..dab112ca 100644 --- a/dogether/Presentation/Features/Complete/Components/CompletePage.swift +++ b/dogether/Presentation/Features/Complete/Components/CompletePage.swift @@ -36,11 +36,11 @@ final class CompletePage: BasePage { private let noticeView = { let imageView = UIImageView(image: .notice.withRenderingMode(.alwaysTemplate)) - imageView.tintColor = .grey400 + imageView.tintColor = Color.Icon.secondary let label = UILabel() label.text = "카카오톡, 문자 등을 통해 공유해보세요 !" - label.textColor = .grey400 + label.textColor = Color.Text.disabled label.font = Fonts.body2R let stackView = UIStackView(arrangedSubviews: [imageView, label]) @@ -53,7 +53,7 @@ final class CompletePage: BasePage { }() override func configureView() { - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.textAlignment = .center titleLabel.numberOfLines = 0 } diff --git a/dogether/Presentation/Features/Error/Components/ErrorPage.swift b/dogether/Presentation/Features/Error/Components/ErrorPage.swift index 79b67b66..945c221a 100644 --- a/dogether/Presentation/Features/Error/Components/ErrorPage.swift +++ b/dogether/Presentation/Features/Error/Components/ErrorPage.swift @@ -27,11 +27,11 @@ final class ErrorPage: BasePage { override func configureView() { titleLabel.text = "서비스 이용이 원활하지 않아요" - titleLabel.textColor = .grey200 + titleLabel.textColor = Color.Text.subtle titleLabel.font = Fonts.head2B descriptionLabel.text = "잠시 후 다시 접속해주세요." - descriptionLabel.textColor = .grey400 + descriptionLabel.textColor = Color.Text.disabled descriptionLabel.font = Fonts.body2R stackView.axis = .vertical diff --git a/dogether/Presentation/Features/GroupCreate/Components/CounterView.swift b/dogether/Presentation/Features/GroupCreate/Components/CounterView.swift index 7e129b5d..4a2431f8 100644 --- a/dogether/Presentation/Features/GroupCreate/Components/CounterView.swift +++ b/dogether/Presentation/Features/GroupCreate/Components/CounterView.swift @@ -39,34 +39,34 @@ final class CounterView: BaseView { private var currentCount: Int? override func configureView() { - dogetherCountView.backgroundColor = .grey800 + dogetherCountView.backgroundColor = Color.Background.elavated dogetherCountView.layer.cornerRadius = 12 minusButton.tag = Directions.minus.tag - minusButton.backgroundColor = .grey700 + minusButton.backgroundColor = Color.Background.surface minusButton.layer.cornerRadius = 8 minusImageView.image = .minus.withRenderingMode(.alwaysTemplate) - minusImageView.tintColor = .grey0 + minusImageView.tintColor = Color.Icon.default minusImageView.isUserInteractionEnabled = false plusButton.tag = Directions.plus.tag - plusButton.backgroundColor = .grey700 + plusButton.backgroundColor = Color.Background.surface plusButton.layer.cornerRadius = 8 plusImageView.image = .plus.withRenderingMode(.alwaysTemplate) - plusImageView.tintColor = .grey0 + plusImageView.tintColor = Color.Icon.default plusImageView.isUserInteractionEnabled = false - currentLabel.textColor = .grey0 + currentLabel.textColor = Color.Text.default currentLabel.font = Fonts.body1S minLabel.text = "\(min)\(unit)" - minLabel.textColor = .grey300 + minLabel.textColor = Color.Text.secondary minLabel.font = Fonts.body2S maxLabel.text = "\(max)\(unit)" - maxLabel.textColor = .grey300 + maxLabel.textColor = Color.Text.secondary maxLabel.font = Fonts.body2S } diff --git a/dogether/Presentation/Features/GroupCreate/Components/DurationButton.swift b/dogether/Presentation/Features/GroupCreate/Components/DurationButton.swift index 089debcb..a6704bd2 100644 --- a/dogether/Presentation/Features/GroupCreate/Components/DurationButton.swift +++ b/dogether/Presentation/Features/GroupCreate/Components/DurationButton.swift @@ -33,7 +33,7 @@ final class DurationButton: BaseButton { private var currentDuration: GroupChallengeDurations? override func configureView() { - backgroundColor = .grey800 + backgroundColor = Color.Background.elavated layer.cornerRadius = 12 layer.borderWidth = 1.5 @@ -60,9 +60,9 @@ final class DurationButton: BaseButton { currentDuration = datas let isColorful = duration == datas - layer.borderColor = isColorful ? UIColor.blue300.cgColor : UIColor.grey800.cgColor + layer.borderColor = isColorful ? Color.Border.primary.cgColor : UIColor.grey800.cgColor // FIXME: 컬러 추가 필요 - label.textColor = isColorful ? .blue300 : .grey0 + label.textColor = isColorful ? Color.Text.primary : Color.Text.default label.font = isColorful ? Fonts.body1B : Fonts.body1S } } diff --git a/dogether/Presentation/Features/GroupCreate/Components/StartAtButton.swift b/dogether/Presentation/Features/GroupCreate/Components/StartAtButton.swift index 0d704dae..08ede6bd 100644 --- a/dogether/Presentation/Features/GroupCreate/Components/StartAtButton.swift +++ b/dogether/Presentation/Features/GroupCreate/Components/StartAtButton.swift @@ -35,7 +35,7 @@ final class StartAtButton: BaseButton { private var currentStartAt: GroupStartAts? override func configureView() { - backgroundColor = .grey800 + backgroundColor = Color.Background.elavated layer.cornerRadius = 12 layer.borderWidth = 1.5 @@ -84,10 +84,10 @@ final class StartAtButton: BaseButton { currentStartAt = datas let isColorful = startAt == datas - layer.borderColor = isColorful ? UIColor.blue300.cgColor : UIColor.grey800.cgColor - icon.tintColor = isColorful ? .blue300 : .grey0 - label.textColor = isColorful ? .blue300 : .grey0 - descriptionLabel.textColor = isColorful ? .blue300 : .grey0 + layer.borderColor = isColorful ? Color.Border.primary.cgColor : UIColor.grey800.cgColor // FIXME: 컬러 추가 필요 + icon.tintColor = isColorful ? Color.Icon.primary : Color.Icon.default + label.textColor = isColorful ? Color.Text.primary : Color.Text.default + descriptionLabel.textColor = isColorful ? Color.Text.primary : Color.Text.default } } } diff --git a/dogether/Presentation/Features/GroupCreate/Components/StepButtonStackView.swift b/dogether/Presentation/Features/GroupCreate/Components/StepButtonStackView.swift index 02bdf311..fb43ca0b 100644 --- a/dogether/Presentation/Features/GroupCreate/Components/StepButtonStackView.swift +++ b/dogether/Presentation/Features/GroupCreate/Components/StepButtonStackView.swift @@ -41,8 +41,8 @@ final class StepButtonStackView: BaseStackView { distribution = .fillEqually prevButton.setTitle("이전", for: .normal) - prevButton.setTitleColor(.grey200, for: .normal) - prevButton.backgroundColor = .grey500 + prevButton.setTitleColor(Color.Text.subtle, for: .normal) + prevButton.backgroundColor = Color.Background.disabled prevButton.titleLabel?.font = Fonts.body1B prevButton.layer.cornerRadius = 8 prevButton.tag = Directions.prev.tag diff --git a/dogether/Presentation/Features/GroupCreate/Components/StepInfoStackView.swift b/dogether/Presentation/Features/GroupCreate/Components/StepInfoStackView.swift index 37aeaed8..61d638a5 100644 --- a/dogether/Presentation/Features/GroupCreate/Components/StepInfoStackView.swift +++ b/dogether/Presentation/Features/GroupCreate/Components/StepInfoStackView.swift @@ -18,17 +18,17 @@ final class StepInfoStackView: BaseStackView { spacing = 8 alignment = .leading - currentStepLabel.textColor = .blue300 + currentStepLabel.textColor = Color.Text.primary currentStepLabel.font = Fonts.body1S maxStepLabel.text = "/\(CreateGroupSteps.allCases.count)" - maxStepLabel.textColor = .grey0 + maxStepLabel.textColor = Color.Text.default maxStepLabel.font = Fonts.body1S stepLabelStackView.axis = .horizontal stepLabelStackView.distribution = .fillProportionally - stepDescriptionLabel.textColor = .grey0 + stepDescriptionLabel.textColor = Color.Text.default stepDescriptionLabel.font = Fonts.head1B } diff --git a/dogether/Presentation/Features/GroupCreate/Components/StepOneView.swift b/dogether/Presentation/Features/GroupCreate/Components/StepOneView.swift index 08597c3c..bc1cc869 100644 --- a/dogether/Presentation/Features/GroupCreate/Components/StepOneView.swift +++ b/dogether/Presentation/Features/GroupCreate/Components/StepOneView.swift @@ -39,19 +39,19 @@ final class StepOneView: BaseView { override func configureView() { groupNameTitleLabel.text = "그룹명" - groupNameTitleLabel.textColor = .grey200 + groupNameTitleLabel.textColor = Color.Text.subtle groupNameTitleLabel.font = Fonts.body1B groupNameTextField.attributedPlaceholder = NSAttributedString( string: "멋진 그룹명으로 동기부여를 해보세요 !", - attributes: [NSAttributedString.Key.foregroundColor: UIColor.grey300] + attributes: [NSAttributedString.Key.foregroundColor: Color.Text.secondary] ) - groupNameTextField.textColor = .grey0 + groupNameTextField.textColor = Color.Text.default groupNameTextField.font = Fonts.body1S - groupNameTextField.tintColor = .blue300 + groupNameTextField.tintColor = Color.Icon.primary groupNameTextField.returnKeyType = .done groupNameTextField.borderStyle = .none - groupNameTextField.backgroundColor = .grey800 + groupNameTextField.backgroundColor = Color.Background.elavated groupNameTextField.layer.cornerRadius = 12 groupNameTextField.layer.borderWidth = 1 groupNameTextField.layer.borderColor = UIColor.clear.cgColor @@ -59,11 +59,11 @@ final class StepOneView: BaseView { groupNameTextField.leftView = leftPaddingView groupNameTextField.leftViewMode = .always - groupNameCountLabel.textColor = .grey300 + groupNameCountLabel.textColor = Color.Text.secondary groupNameCountLabel.font = Fonts.smallS groupNameMaxLengthLabel.text = "/\(groupNameMaxLength)" - groupNameMaxLengthLabel.textColor = .grey300 + groupNameMaxLengthLabel.textColor = Color.Text.secondary groupNameMaxLengthLabel.font = Fonts.smallS groupNameCountStackView.axis = .horizontal @@ -141,13 +141,13 @@ extension StepOneView: UITextFieldDelegate { } func textFieldDidBeginEditing(_ textField: UITextField) { - groupNameTextField.layer.borderColor = UIColor.blue300.cgColor - groupNameCountLabel.textColor = .blue300 + groupNameTextField.layer.borderColor = Color.Border.primary.cgColor + groupNameCountLabel.textColor = Color.Text.primary } func textFieldDidEndEditing(_ textField: UITextField) { groupNameTextField.layer.borderColor = UIColor.clear.cgColor - groupNameCountLabel.textColor = .grey300 + groupNameCountLabel.textColor = Color.Text.secondary } @objc private func dismissKeyboard() { endEditing(true) } diff --git a/dogether/Presentation/Features/GroupCreate/Components/StepTwoView.swift b/dogether/Presentation/Features/GroupCreate/Components/StepTwoView.swift index 80bf12e3..073af35b 100644 --- a/dogether/Presentation/Features/GroupCreate/Components/StepTwoView.swift +++ b/dogether/Presentation/Features/GroupCreate/Components/StepTwoView.swift @@ -48,7 +48,7 @@ final class StepTwoView: BaseView { override func configureView() { duration.text = "활동 기간" - duration.textColor = .grey200 + duration.textColor = Color.Text.subtle duration.font = Fonts.body1B durationRow1 = horizontalStackView(buttons: [threeDaysButton, oneWeekButton]) @@ -56,7 +56,7 @@ final class StepTwoView: BaseView { durationStack = verticalStackView(stacks: [durationRow1, durationRow2]) startAt.text = "시작일" - startAt.textColor = .grey200 + startAt.textColor = Color.Text.subtle startAt.font = Fonts.body1B startAtStack = horizontalStackView(buttons: [todayButton, tomorrowButton]) diff --git a/dogether/Presentation/Features/GroupJoin/Components/GroupJoinPage.swift b/dogether/Presentation/Features/GroupJoin/Components/GroupJoinPage.swift index 211cb6ec..15bdc163 100644 --- a/dogether/Presentation/Features/GroupJoin/Components/GroupJoinPage.swift +++ b/dogether/Presentation/Features/GroupJoin/Components/GroupJoinPage.swift @@ -45,25 +45,25 @@ final class GroupJoinPage: BasePage { override func configureView() { titleLabel.text = "초대코드 입력" - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.font = Fonts.emphasis2B subTitleLabel.text = "초대받은 링크에서 초대코드를 확인할 수 있어요" - subTitleLabel.textColor = .grey200 + subTitleLabel.textColor = Color.Text.subtle subTitleLabel.font = Fonts.body1R codeTextField.attributedPlaceholder = NSAttributedString( string: "코드입력 (8자리)", - attributes: [.foregroundColor: UIColor.grey300] + attributes: [.foregroundColor: Color.Text.secondary] ) codeTextField.font = Fonts.body1S - codeTextField.textColor = .grey0 - codeTextField.backgroundColor = .grey800 + codeTextField.textColor = Color.Text.default + codeTextField.backgroundColor = Color.Background.elavated codeTextField.layer.cornerRadius = 12 codeTextField.layer.masksToBounds = true codeTextField.keyboardType = .asciiCapable codeTextField.returnKeyType = .done - codeTextField.tintColor = .blue300 + codeTextField.tintColor = Color.Icon.primary codeTextField.autocorrectionType = .no let leftPaddingView = UIView(frame: CGRect(x: 0, y: 0, width: 16, height: codeTextField.frame.height)) codeTextField.leftView = leftPaddingView @@ -197,7 +197,7 @@ extension GroupJoinPage: UITextFieldDelegate { private func setTextFieldBorderColor() { if codeTextField.isFirstResponder { - codeTextField.layer.borderColor = UIColor.blue300.cgColor + codeTextField.layer.borderColor = Color.Border.primary.cgColor codeTextField.layer.borderWidth = 1.5 } else { codeTextField.layer.borderColor = UIColor.clear.cgColor diff --git a/dogether/Presentation/Features/GroupManagement/Components/GroupManagementCell.swift b/dogether/Presentation/Features/GroupManagement/Components/GroupManagementCell.swift index 690ec099..854e8914 100644 --- a/dogether/Presentation/Features/GroupManagement/Components/GroupManagementCell.swift +++ b/dogether/Presentation/Features/GroupManagement/Components/GroupManagementCell.swift @@ -38,11 +38,11 @@ final class GroupManagementCell: BaseTableViewCell { contentView.backgroundColor = .clear selectionStyle = .none - containerView.backgroundColor = .grey800 + containerView.backgroundColor = Color.Background.elavated containerView.layer.cornerRadius = 12 titleLabel.font = Fonts.head2B - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default memberTitleLabel.text = "그룹원" dateTitleLabel.text = "종료일" @@ -50,17 +50,17 @@ final class GroupManagementCell: BaseTableViewCell { [memberTitleLabel, dateTitleLabel, codeTitleLabel].forEach { titleLabel in titleLabel.font = Fonts.smallR - titleLabel.textColor = .grey200 + titleLabel.textColor = Color.Text.subtle } [memberValueLabel, dateValueLabel, codeValueLabel].forEach { valueLabel in valueLabel.font = Fonts.smallR - valueLabel.textColor = .grey0 + valueLabel.textColor = Color.Text.default } leaveButton.setTitle("탈퇴하기", for: .normal) - leaveButton.setTitleColor(.grey0, for: .normal) - leaveButton.backgroundColor = .grey700 + leaveButton.setTitleColor(Color.Text.default, for: .normal) + leaveButton.backgroundColor = Color.Background.surface leaveButton.titleLabel?.font = Fonts.body2S leaveButton.layer.cornerRadius = 6 } diff --git a/dogether/Presentation/Features/Loading/Components/LoadingPage.swift b/dogether/Presentation/Features/Loading/Components/LoadingPage.swift index b4d7da29..27e76138 100644 --- a/dogether/Presentation/Features/Loading/Components/LoadingPage.swift +++ b/dogether/Presentation/Features/Loading/Components/LoadingPage.swift @@ -19,7 +19,7 @@ final class LoadingPage: BasePage { isHidden = true isUserInteractionEnabled = true - backgroundView.backgroundColor = .grey900.withAlphaComponent(0.8) + backgroundView.backgroundColor = Color.Background.dim animationView.loopMode = .loop animationView.contentMode = .scaleAspectFit diff --git a/dogether/Presentation/Features/Main/Components/AdditionalAddTodoButton.swift b/dogether/Presentation/Features/Main/Components/AdditionalAddTodoButton.swift index 13d799ae..0bfe467d 100644 --- a/dogether/Presentation/Features/Main/Components/AdditionalAddTodoButton.swift +++ b/dogether/Presentation/Features/Main/Components/AdditionalAddTodoButton.swift @@ -16,10 +16,10 @@ final class AdditionalAddTodoButton: BaseButton { override func configureView() { iconImageView.contentMode = .scaleAspectFit - iconImageView.tintColor = .grey200 + iconImageView.tintColor = Color.Icon.elavated label.font = Fonts.body1S - label.textColor = .grey200 + label.textColor = Color.Text.subtle stackView.axis = .horizontal stackView.spacing = 8 diff --git a/dogether/Presentation/Features/Main/Components/DoneView.swift b/dogether/Presentation/Features/Main/Components/DoneView.swift index dba1789a..0bb8df9f 100644 --- a/dogether/Presentation/Features/Main/Components/DoneView.swift +++ b/dogether/Presentation/Features/Main/Components/DoneView.swift @@ -16,7 +16,7 @@ final class DoneView: BaseView { private let titleLabel = { let label = UILabel() label.text = "그룹 활동 기간이 모두 끝났어요 !" - label.textColor = .grey0 + label.textColor = Color.Text.default label.font = Fonts.head2B return label }() @@ -24,7 +24,7 @@ final class DoneView: BaseView { private let subTitleLabel = { let label = UILabel() label.text = "오늘이 지나면 이 페이지는 더 이상 열 수 없어요" - label.textColor = .grey300 + label.textColor = Color.Text.secondary label.font = Fonts.body2R return label }() diff --git a/dogether/Presentation/Features/Main/Components/DosikCommentButton.swift b/dogether/Presentation/Features/Main/Components/DosikCommentButton.swift index b953bb6d..ff175bb0 100644 --- a/dogether/Presentation/Features/Main/Components/DosikCommentButton.swift +++ b/dogether/Presentation/Features/Main/Components/DosikCommentButton.swift @@ -16,11 +16,11 @@ final class DosikCommentButton: BaseButton { override func configureView() { isHidden = true - backgroundColor = .grey50 + backgroundColor = Color.Background.inverse layer.cornerRadius = 8 layer.zPosition = 1 - commentLabel.textColor = .grey800 + commentLabel.textColor = Color.Text.inverse commentLabel.numberOfLines = 0 commentLabel.setContentHuggingPriority(.required, for: .vertical) commentLabel.setContentCompressionResistancePriority(.required, for: .vertical) diff --git a/dogether/Presentation/Features/Main/Components/GroupInfoView.swift b/dogether/Presentation/Features/Main/Components/GroupInfoView.swift index e188ea4a..d5be233d 100644 --- a/dogether/Presentation/Features/Main/Components/GroupInfoView.swift +++ b/dogether/Presentation/Features/Main/Components/GroupInfoView.swift @@ -94,7 +94,7 @@ final class GroupInfoView: BaseView { // FIXME: 임시 처리, 추후 수정 dosikImageView.isHidden = type == .stats - nameLabel.textColor = .blue300 + nameLabel.textColor = Color.Text.primary nameLabel.font = Fonts.head1B groupNameStackView.axis = .horizontal @@ -105,9 +105,9 @@ final class GroupInfoView: BaseView { joinCodeStackView = infoStackView(description: "초대코드") endDateStackView = infoStackView(description: "종료일") - memberInfoLabel.textColor = .grey0 - joinCodeInfoLabel.textColor = .grey0 - endDateInfoLabel.textColor = .grey0 + memberInfoLabel.textColor = Color.Text.default + joinCodeInfoLabel.textColor = Color.Text.default + endDateInfoLabel.textColor = Color.Text.default joinCodeInfoStackView.axis = .horizontal joinCodeInfoStackView.spacing = 2 @@ -117,11 +117,11 @@ final class GroupInfoView: BaseView { groupInfoStackView.spacing = 16 durationDescriptionLabel.text = "진행 현황" - durationDescriptionLabel.textColor = .grey300 + durationDescriptionLabel.textColor = Color.Text.secondary durationDescriptionLabel.font = Fonts.body2R durationInfoLabel.text = "(n일차)" - durationInfoLabel.textColor = .grey300 + durationInfoLabel.textColor = Color.Text.secondary durationInfoLabel.font = Fonts.smallR durationInfoStackView.axis = .horizontal @@ -134,8 +134,8 @@ final class GroupInfoView: BaseView { durationProgressView.layer.cornerRadius = 4 durationProgressView.clipsToBounds = true - durationProgressView.trackTintColor = .grey800 - durationProgressView.progressTintColor = .blue300 + durationProgressView.trackTintColor = .grey800 // FIXME: 컬러 추가 필요 + durationProgressView.progressTintColor = Color.Icon.primary if let durationProgressLayer = durationProgressView.subviews.last { durationProgressLayer.layer.cornerRadius = 4 @@ -266,7 +266,7 @@ extension GroupInfoView { string: description, attributes: Fonts.getAttributes(for: Fonts.body2R, textAlignment: .left) ) - label.textColor = .grey300 + label.textColor = Color.Text.secondary let stackView = UIStackView(arrangedSubviews: [label]) stackView.axis = .vertical diff --git a/dogether/Presentation/Features/Main/Components/MainPage.swift b/dogether/Presentation/Features/Main/Components/MainPage.swift index 1e78e84d..4e12be7a 100644 --- a/dogether/Presentation/Features/Main/Components/MainPage.swift +++ b/dogether/Presentation/Features/Main/Components/MainPage.swift @@ -46,7 +46,7 @@ final class MainPage: BasePage { private(set) var currentIsScrollOnTop: Bool? override func configureView() { - dogetherSheet.backgroundColor = .grey800 + dogetherSheet.backgroundColor = Color.Background.elavated dogetherSheet.layer.cornerRadius = 32 dogetherSheet.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] dogetherSheet.isUserInteractionEnabled = true diff --git a/dogether/Presentation/Features/Main/Components/PastEmptyView.swift b/dogether/Presentation/Features/Main/Components/PastEmptyView.swift index 38512aff..05df26f4 100644 --- a/dogether/Presentation/Features/Main/Components/PastEmptyView.swift +++ b/dogether/Presentation/Features/Main/Components/PastEmptyView.swift @@ -16,7 +16,7 @@ final class PastEmptyView: BaseView { private let titleLabel = { let label = UILabel() label.text = "해당 날짜에 작성된 투두가 없어요" - label.textColor = .grey200 + label.textColor = Color.Text.subtle label.font = Fonts.head2B return label }() @@ -24,7 +24,7 @@ final class PastEmptyView: BaseView { private let subTitleLabel = { let label = UILabel() label.text = "과거 날짜에서는 새로운 투두를 작성할 수 없어요" - label.textColor = .grey400 + label.textColor = Color.Text.disabled label.font = Fonts.body2R return label }() diff --git a/dogether/Presentation/Features/Main/Components/RankingButton.swift b/dogether/Presentation/Features/Main/Components/RankingButton.swift index 21c820a8..a382e272 100644 --- a/dogether/Presentation/Features/Main/Components/RankingButton.swift +++ b/dogether/Presentation/Features/Main/Components/RankingButton.swift @@ -26,18 +26,18 @@ final class RankingButton: BaseButton { private(set) var currentAlpha: CGFloat? override func configureView() { - backgroundColor = .grey700 + backgroundColor = Color.Background.surface layer.cornerRadius = 8 chartImageView.isUserInteractionEnabled = false label.text = "그룹 활동 한눈에 보기 !" - label.textColor = .grey200 + label.textColor = Color.Text.subtle label.font = Fonts.body1S label.isUserInteractionEnabled = false chevronImageView.image = .chevronRight.withRenderingMode(.alwaysTemplate) - chevronImageView.tintColor = .grey200 + chevronImageView.tintColor = Color.Icon.elavated chevronImageView.isUserInteractionEnabled = false } diff --git a/dogether/Presentation/Features/Main/Components/SheetHeaderView.swift b/dogether/Presentation/Features/Main/Components/SheetHeaderView.swift index 92f159a0..ce191cb9 100644 --- a/dogether/Presentation/Features/Main/Components/SheetHeaderView.swift +++ b/dogether/Presentation/Features/Main/Components/SheetHeaderView.swift @@ -38,7 +38,7 @@ final class SheetHeaderView: BaseView { override func configureView() { dateLabel.text = "2000.01.01" - dateLabel.textColor = .grey0 + dateLabel.textColor = Color.Text.default dateLabel.font = Fonts.head2B prevButton.setImage(.prevButton, for: .normal) diff --git a/dogether/Presentation/Features/Main/Components/TimerView.swift b/dogether/Presentation/Features/Main/Components/TimerView.swift index 1b69136f..329ae46d 100644 --- a/dogether/Presentation/Features/Main/Components/TimerView.swift +++ b/dogether/Presentation/Features/Main/Components/TimerView.swift @@ -10,12 +10,12 @@ import UIKit final class TimerView: BaseView { private let timerView = { let view = UIView() - view.backgroundColor = .grey700 + view.backgroundColor = Color.Background.surface view.layer.cornerRadius = 142 / 2 let imageView = UIImageView() imageView.image = .wait.withRenderingMode(.alwaysTemplate) - imageView.tintColor = .blue300 + imageView.tintColor = Color.Icon.primary [imageView].forEach { view.addSubview($0) } @@ -32,7 +32,7 @@ final class TimerView: BaseView { let view = UIView() let shapeLayer = CAShapeLayer() - shapeLayer.strokeColor = UIColor.blue300.cgColor + shapeLayer.strokeColor = Color.Background.primary.cgColor shapeLayer.fillColor = UIColor.clear.cgColor shapeLayer.lineWidth = 6 @@ -58,15 +58,15 @@ final class TimerView: BaseView { private let timerStackView = UIStackView() override func configureView() { - timerLabel.textColor = .grey0 + timerLabel.textColor = Color.Text.default timerLabel.font = Fonts.head1B titleLabel.text = "내일부터 투두를 시작할 수 있어요!" - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.font = Fonts.head2B subTitleLabel.text = "오늘은 계획을 세우고, 내일부터 실천해보세요!" - subTitleLabel.textColor = .grey300 + subTitleLabel.textColor = Color.Text.secondary subTitleLabel.font = Fonts.body2R timerStackView.axis = .vertical diff --git a/dogether/Presentation/Features/Main/Components/TodayEmptyView.swift b/dogether/Presentation/Features/Main/Components/TodayEmptyView.swift index 1bd5ee1a..bb9b88e2 100644 --- a/dogether/Presentation/Features/Main/Components/TodayEmptyView.swift +++ b/dogether/Presentation/Features/Main/Components/TodayEmptyView.swift @@ -27,11 +27,11 @@ final class TodayEmptyView: BaseView { override func configureView() { titleLabel.text = "오늘의 투두를 작성해보세요" - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.font = Fonts.head2B subTitleLabel.text = "매일 자정부터 새로운 투두를 입력해요" - subTitleLabel.textColor = .grey300 + subTitleLabel.textColor = Color.Text.secondary subTitleLabel.font = Fonts.body2R emptyStackView.axis = .vertical diff --git a/dogether/Presentation/Features/Main/Components/TodoListItemButton.swift b/dogether/Presentation/Features/Main/Components/TodoListItemButton.swift index 5e966d2f..a84fe689 100644 --- a/dogether/Presentation/Features/Main/Components/TodoListItemButton.swift +++ b/dogether/Presentation/Features/Main/Components/TodoListItemButton.swift @@ -35,7 +35,7 @@ final class TodoListItemButton: BaseButton { self.index = index self.todo = todo self.isToday = isToday - self.isUncertified = todo.status == .waitCertification + self.isUncertified = todo.status == .uncertified super.init(frame: .zero) } @@ -50,26 +50,26 @@ final class TodoListItemButton: BaseButton { private let checkImageView = UIImageView(image: .chevronRight.withRenderingMode(.alwaysTemplate)) override func configureView() { - backgroundColor = .grey700 + backgroundColor = Color.Background.surface layer.cornerRadius = 8 todoImageView.image = todo.status.image contentLabel.text = todo.content - contentLabel.textColor = isUncertified ? isToday ? .grey0 : .grey400 : .grey300 + contentLabel.textColor = isUncertified ? isToday ? Color.Text.default : Color.Text.disabled : Color.Text.secondary contentLabel.font = Fonts.body1S contentLabel.isUserInteractionEnabled = false certificationLabel.text = "인증하기" - certificationLabel.textColor = isToday ? .grey900 : .grey400 + certificationLabel.textColor = isToday ? .grey900 : Color.Text.disabled // FIXME: 색상 추가 필요 certificationLabel.textAlignment = .center certificationLabel.font = Fonts.body2S certificationLabel.layer.cornerRadius = 8 certificationLabel.clipsToBounds = true certificationLabel.isUserInteractionEnabled = false - certificationLabel.backgroundColor = isToday ? .blue300 : .grey500 + certificationLabel.backgroundColor = isToday ? Color.Background.primary : Color.Background.disabled - checkImageView.tintColor = .grey200 + checkImageView.tintColor = Color.Icon.elavated } override func configureAction() { } @@ -84,7 +84,7 @@ final class TodoListItemButton: BaseButton { $0.height.equalTo(64) } - if todo.status != .waitCertification { + if todo.status != .uncertified { todoImageView.snp.makeConstraints { $0.centerY.equalToSuperview() $0.left.equalToSuperview().offset(16) diff --git a/dogether/Presentation/Features/Main/Components/TodoListView.swift b/dogether/Presentation/Features/Main/Components/TodoListView.swift index 423ca54a..4ba3c849 100644 --- a/dogether/Presentation/Features/Main/Components/TodoListView.swift +++ b/dogether/Presentation/Features/Main/Components/TodoListView.swift @@ -43,10 +43,10 @@ final class TodoListView: BaseView { todoListStackView.spacing = 8 todoListStackView.distribution = .fillEqually - emptyListTitleLabel.textColor = .grey200 + emptyListTitleLabel.textColor = Color.Text.subtle emptyListTitleLabel.font = Fonts.head2B emptyListDescriptionLabel.text = "오늘 하루 이루고 싶은 목표를 입력해보세요!" - emptyListDescriptionLabel.textColor = .grey400 + emptyListDescriptionLabel.textColor = Color.Text.disabled emptyListDescriptionLabel.font = Fonts.body2R emptyListStackView.axis = .vertical @@ -120,7 +120,7 @@ final class TodoListView: BaseView { let isToday = datas.dateOffset == 0 let currentTodoList = datas.todoList.filter { - datas.filter == .all || datas.filter == FilterTypes(status: $0.status.rawValue) + datas.filter == .all || datas.filter.reviewStatus == $0.status.reviewStatus } todoListStackView.isHidden = currentTodoList.isEmpty emptyListStackView.isHidden = !currentTodoList.isEmpty diff --git a/dogether/Presentation/Features/Main/MainViewController.swift b/dogether/Presentation/Features/Main/MainViewController.swift index 3d76d713..8d05ba0c 100644 --- a/dogether/Presentation/Features/Main/MainViewController.swift +++ b/dogether/Presentation/Features/Main/MainViewController.swift @@ -240,7 +240,7 @@ extension MainViewController: MainDelegate { let certificationViewDatas = CertificationViewDatas( title: "내 인증 정보", todos: viewModel.sheetViewDatas.value.todoList.filter { - viewModel.sheetViewDatas.value.filter == .all || viewModel.sheetViewDatas.value.filter == FilterTypes(status: $0.status.rawValue) + viewModel.sheetViewDatas.value.filter == .all || viewModel.sheetViewDatas.value.filter.reviewStatus == $0.status.reviewStatus }, index: index ) diff --git a/dogether/Presentation/Features/Modality/Components/ExaminateButton.swift b/dogether/Presentation/Features/Modality/Components/ExaminateButton.swift index a5cf71b3..1950adcb 100644 --- a/dogether/Presentation/Features/Modality/Components/ExaminateButton.swift +++ b/dogether/Presentation/Features/Modality/Components/ExaminateButton.swift @@ -22,15 +22,15 @@ final class ExaminateButton: BaseButton { private let stackView = UIStackView() override func configureView() { - backgroundColor = .grey0 + backgroundColor = Color.Background.default layer.cornerRadius = 8 tag = type.tag icon.image = type.image?.withRenderingMode(.alwaysTemplate) - icon.tintColor = .grey700 + icon.tintColor = .grey700 // FIXME: 컬러 추가 필요 label.text = type.rawValue - label.textColor = .grey700 + label.textColor = .grey700 // FIXME: 컬러 추가 필요 label.font = Fonts.body1S stackView.axis = .horizontal diff --git a/dogether/Presentation/Features/Modality/Components/ExaminateDescriptionView.swift b/dogether/Presentation/Features/Modality/Components/ExaminateDescriptionView.swift index 27d477ea..78e518b5 100644 --- a/dogether/Presentation/Features/Modality/Components/ExaminateDescriptionView.swift +++ b/dogether/Presentation/Features/Modality/Components/ExaminateDescriptionView.swift @@ -14,7 +14,7 @@ final class ExaminateDescriptionView: BaseView { override func configureView() { label.text = "검사 결과는 선택하면 수정할 수 없어요" - label.textColor = .grey200 + label.textColor = Color.Text.subtle label.font = Fonts.body1R label.setContentHuggingPriority(.required, for: .horizontal) label.setContentCompressionResistancePriority(.required, for: .horizontal) diff --git a/dogether/Presentation/Features/Modality/Components/ExaminatePage.swift b/dogether/Presentation/Features/Modality/Components/ExaminatePage.swift index e00b720e..1fe7f526 100644 --- a/dogether/Presentation/Features/Modality/Components/ExaminatePage.swift +++ b/dogether/Presentation/Features/Modality/Components/ExaminatePage.swift @@ -36,25 +36,25 @@ final class ExaminatePage: BasePage { private let descriptionView = ExaminateDescriptionView() private let imageView = CertificationImageView(type: .logo) private let contentLabel = UILabel() - private let rejectButton = ExaminateButton(type: .reject) - private let approveButton = ExaminateButton(type: .approve) + private let rejectButton = ExaminateButton(type: .status(.reject)) + private let approveButton = ExaminateButton(type: .status(.approve)) private let examinationStackView = UIStackView() private let reviewFeedbackView = ReviewFeedbackView() private(set) var currentReview: ReviewEntity? private(set) var currentFeedback: String? - private(set) var currentResult: ReviewResults? + private(set) var currentResult: ReviewStatus? override func configureView() { contentStackView.axis = .vertical contentStackView.alignment = .fill titleLabel.text = "투두를 검사해주세요!" - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.font = Fonts.head1B titleLabel.textAlignment = .center - contentLabel.textColor = .grey0 + contentLabel.textColor = Color.Text.default contentLabel.numberOfLines = 0 examinationStackView.axis = .horizontal diff --git a/dogether/Presentation/Features/Modality/ModalityViewController.swift b/dogether/Presentation/Features/Modality/ModalityViewController.swift index 22513ca3..73a4ec2b 100644 --- a/dogether/Presentation/Features/Modality/ModalityViewController.swift +++ b/dogether/Presentation/Features/Modality/ModalityViewController.swift @@ -42,9 +42,9 @@ extension ModalityViewController: ExaminateDelegate { } func examinateAction(type: FilterTypes) { - viewModel.setResult(result: type.reviewResult) + viewModel.setResult(result: type.reviewStatus) viewModel.setFeedback() - viewModel.setButtonStatus(status: type == .approve ? .enabled : .disabled) + viewModel.setButtonStatus(status: type == .status(.approve) ? .enabled : .disabled) coordinator?.showPopup(type: .examinate) { [weak self] reviewFeedback in guard let self, let reviewFeedback = reviewFeedback as? String else { return } diff --git a/dogether/Presentation/Features/Modality/ModalityViewModel.swift b/dogether/Presentation/Features/Modality/ModalityViewModel.swift index 49c08f26..0aaf7a95 100644 --- a/dogether/Presentation/Features/Modality/ModalityViewModel.swift +++ b/dogether/Presentation/Features/Modality/ModalityViewModel.swift @@ -38,7 +38,7 @@ final class ModalityViewModel { } } - func setResult(result: ReviewResults? = nil) { + func setResult(result: ReviewStatus? = nil) { examinateViewDatas.update { $0.result = result } diff --git a/dogether/Presentation/Features/MyPage/Components/MyPageButton.swift b/dogether/Presentation/Features/MyPage/Components/MyPageButton.swift index 70315694..c44cd358 100644 --- a/dogether/Presentation/Features/MyPage/Components/MyPageButton.swift +++ b/dogether/Presentation/Features/MyPage/Components/MyPageButton.swift @@ -27,10 +27,9 @@ final class MyPageButton: BaseButton { iconImageView.image = icon buttonTitleLabel.text = title - buttonTitleLabel.textColor = .grey100 + buttonTitleLabel.textColor = Color.Text.subtle buttonTitleLabel.font = Fonts.body1R - - chevronImageView.tintColor = .grey200 + chevronImageView.tintColor = Color.Border.elavated } override func configureAction() { } diff --git a/dogether/Presentation/Features/MyPage/Components/MyPagePage.swift b/dogether/Presentation/Features/MyPage/Components/MyPagePage.swift index 126a5af1..d650cddc 100644 --- a/dogether/Presentation/Features/MyPage/Components/MyPagePage.swift +++ b/dogether/Presentation/Features/MyPage/Components/MyPagePage.swift @@ -50,8 +50,8 @@ final class MyPagePage: BasePage { private let statsLabel = UILabel() private let statsButton = DogetherButton("통계 보러가기") private let statsContainerView = UIView() - private let myTodosListButton = MyPageButton(icon: .timer, title: "인증목록") - private let groupManagementButton = MyPageButton(icon: .group, title: "그룹관리") + private let myTodosListButton = MyPageButton(icon: .timer, title: "인증 목록") + private let groupManagementButton = MyPageButton(icon: .group, title: "그룹 관리") private let settingButton = MyPageButton(icon: .setting, title: "설정") private let mypageButtonStackView = UIStackView() @@ -61,12 +61,12 @@ final class MyPagePage: BasePage { statsLabel.text = "그룹별 진행 상황을 모아봤어요!" statsLabel.font = Fonts.body1S - statsLabel.textColor = .grey0 + statsLabel.textColor = Color.Text.default statsLabel.textAlignment = .center statsContainerView.backgroundColor = .clear statsContainerView.layer.cornerRadius = 12 - statsContainerView.layer.borderColor = UIColor.grey800.cgColor + statsContainerView.layer.borderColor = Color.Border.disabled.cgColor statsContainerView.layer.borderWidth = 1.5 mypageButtonStackView.axis = .vertical diff --git a/dogether/Presentation/Features/MyPage/Components/ProfileView.swift b/dogether/Presentation/Features/MyPage/Components/ProfileView.swift index 9ff6a9c3..ffeaa7a3 100644 --- a/dogether/Presentation/Features/MyPage/Components/ProfileView.swift +++ b/dogether/Presentation/Features/MyPage/Components/ProfileView.swift @@ -21,7 +21,7 @@ final class ProfileView: BaseStackView { profileImageView.image = .profile profileImageView.contentMode = .scaleAspectFit - nameLabel.textColor = .grey0 + nameLabel.textColor = Color.Text.default nameLabel.font = Fonts.head2B } diff --git a/dogether/Presentation/Features/Onboarding/Components/OnboardingPage.swift b/dogether/Presentation/Features/Onboarding/Components/OnboardingPage.swift index 8168e9e9..e48fdfb8 100644 --- a/dogether/Presentation/Features/Onboarding/Components/OnboardingPage.swift +++ b/dogether/Presentation/Features/Onboarding/Components/OnboardingPage.swift @@ -99,7 +99,7 @@ extension OnboardingPage { string: step.title, attributes: Fonts.getAttributes(for: Fonts.head1B, textAlignment: .center) ) - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.numberOfLines = 0 let subTitleLabel = UILabel() @@ -107,7 +107,7 @@ extension OnboardingPage { string: step.subTitle, attributes: Fonts.getAttributes(for: Fonts.body1R, textAlignment: .center) ) - subTitleLabel.textColor = .grey200 + subTitleLabel.textColor = Color.Text.subtle subTitleLabel.numberOfLines = 0 let animationView = LottieAnimationView(name: step.lottieFileName) diff --git a/dogether/Presentation/Features/Popup/Components/AlertStackView.swift b/dogether/Presentation/Features/Popup/Components/AlertStackView.swift index 1097d9dc..40708971 100644 --- a/dogether/Presentation/Features/Popup/Components/AlertStackView.swift +++ b/dogether/Presentation/Features/Popup/Components/AlertStackView.swift @@ -42,18 +42,18 @@ final class AlertStackView: BaseStackView { imageView.contentMode = .scaleAspectFit - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.numberOfLines = 0 - messageLabel.textColor = .grey200 + messageLabel.textColor = Color.Text.subtle messageLabel.numberOfLines = 0 - cancelButton.setTitleColor(.grey200, for: .normal) + cancelButton.setTitleColor(Color.Text.subtle, for: .normal) cancelButton.titleLabel?.font = Fonts.body1B cancelButton.layer.cornerRadius = 8 - cancelButton.backgroundColor = .grey500 + cancelButton.backgroundColor = Color.Background.disabled - confirmButton.setTitleColor(.grey800, for: .normal) + confirmButton.setTitleColor(Color.Text.inverse, for: .normal) confirmButton.titleLabel?.font = Fonts.body1B confirmButton.layer.cornerRadius = 8 diff --git a/dogether/Presentation/Features/Popup/Components/ExaminateStackView.swift b/dogether/Presentation/Features/Popup/Components/ExaminateStackView.swift index be7d9d42..87ca2a28 100644 --- a/dogether/Presentation/Features/Popup/Components/ExaminateStackView.swift +++ b/dogether/Presentation/Features/Popup/Components/ExaminateStackView.swift @@ -33,15 +33,15 @@ final class ExaminateStackView: BaseStackView { private let descriptionView = { let view = UIView() view.layer.cornerRadius = 8 - view.layer.borderColor = UIColor.grey600.cgColor + view.layer.borderColor = Color.Border.disabled.cgColor view.layer.borderWidth = 1 let imageView = UIImageView(image: .notice.withRenderingMode(.alwaysTemplate)) - imageView.tintColor = .grey400 + imageView.tintColor = Color.Icon.secondary let label = UILabel() label.text = "검사가 완료된 피드백은 바꿀 수 없어요" - label.textColor = .grey400 + label.textColor = Color.Text.disabled label.font = Fonts.body2S let stackView = UIStackView(arrangedSubviews: [imageView, label]) @@ -69,10 +69,10 @@ final class ExaminateStackView: BaseStackView { axis = .vertical closeButton.setImage(.close.withRenderingMode(.alwaysTemplate), for: .normal) - closeButton.tintColor = .grey0 + closeButton.tintColor = Color.Icon.default titleLabel.text = "이유를 들려주세요 !" - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.textAlignment = .center titleLabel.font = Fonts.head1B } diff --git a/dogether/Presentation/Features/Popup/Components/PopupPage.swift b/dogether/Presentation/Features/Popup/Components/PopupPage.swift index 7cdb4374..c9483196 100644 --- a/dogether/Presentation/Features/Popup/Components/PopupPage.swift +++ b/dogether/Presentation/Features/Popup/Components/PopupPage.swift @@ -19,7 +19,7 @@ final class PopupPage: BasePage { private let examinateStackView = ExaminateStackView() override func configureView() { - backgroundColor = .grey700 + backgroundColor = Color.Background.surface layer.cornerRadius = 12 } diff --git a/dogether/Presentation/Features/Popup/PopupViewController.swift b/dogether/Presentation/Features/Popup/PopupViewController.swift index 7007d975..40cee3e6 100644 --- a/dogether/Presentation/Features/Popup/PopupViewController.swift +++ b/dogether/Presentation/Features/Popup/PopupViewController.swift @@ -48,7 +48,7 @@ extension PopupViewController { private func onAppear() { // MARK: - setup for popup ui // FIXME: 추후 수정 - view.backgroundColor = .grey900.withAlphaComponent(0.8) + view.backgroundColor = Color.Background.dim view.addTapAction { [weak self] _ in guard let self else { return } hidePopup() diff --git a/dogether/Presentation/Features/Ranking/Components/RankingPage.swift b/dogether/Presentation/Features/Ranking/Components/RankingPage.swift index affee085..58149533 100644 --- a/dogether/Presentation/Features/Ranking/Components/RankingPage.swift +++ b/dogether/Presentation/Features/Ranking/Components/RankingPage.swift @@ -15,15 +15,15 @@ final class RankingPage: BasePage { private let descriptionView = { let view = UIView() view.layer.cornerRadius = 8 - view.layer.borderColor = UIColor.grey600.cgColor + view.layer.borderColor = Color.Border.disabled.cgColor view.layer.borderWidth = 1 let imageView = UIImageView(image: .notice.withRenderingMode(.alwaysTemplate)) - imageView.tintColor = .grey400 + imageView.tintColor = Color.Icon.secondary let label = UILabel() label.text = "달성률은 인증, 인정, 참여 기간을 기준으로 계산돼요." - label.textColor = .grey400 + label.textColor = Color.Text.disabled label.font = Fonts.body2S let stackView = UIStackView(arrangedSubviews: [imageView, label]) diff --git a/dogether/Presentation/Features/Ranking/Components/RankingTopView.swift b/dogether/Presentation/Features/Ranking/Components/RankingTopView.swift index 0616239f..7ba9653a 100644 --- a/dogether/Presentation/Features/Ranking/Components/RankingTopView.swift +++ b/dogether/Presentation/Features/Ranking/Components/RankingTopView.swift @@ -22,7 +22,7 @@ final class RankingTopView: BaseView { private let rankingView = { let view = UIView() - view.backgroundColor = .grey700 + view.backgroundColor = Color.Background.surface view.layer.cornerRadius = 12 return view }() @@ -32,14 +32,14 @@ final class RankingTopView: BaseView { private let nameLabel = { let label = UILabel() - label.textColor = .grey0 + label.textColor = Color.Text.default label.font = Fonts.body1B return label }() private let certificationLabel = { let label = UILabel() - label.textColor = .blue300 + label.textColor = Color.Text.primary label.font = Fonts.body2S return label }() @@ -47,7 +47,7 @@ final class RankingTopView: BaseView { private let emptyProfileView = { let view = UIView() view.layer.cornerRadius = 26 - view.layer.borderColor = UIColor.grey600.cgColor + view.layer.borderColor = Color.Border.disabled.cgColor view.layer.borderWidth = 1 return view }() @@ -55,7 +55,7 @@ final class RankingTopView: BaseView { private let emptyNameLabel = { let label = UILabel() label.text = "-" - label.textColor = .grey400 + label.textColor = Color.Text.disabled label.font = Fonts.body1B return label }() @@ -63,7 +63,7 @@ final class RankingTopView: BaseView { private let emptyCertificationLabel = { let label = UILabel() label.text = "-" - label.textColor = .grey400 + label.textColor = Color.Text.disabled label.font = Fonts.body2S return label }() diff --git a/dogether/Presentation/Features/Ranking/Components/RankingView.swift b/dogether/Presentation/Features/Ranking/Components/RankingView.swift index 0f590e90..dac75d76 100644 --- a/dogether/Presentation/Features/Ranking/Components/RankingView.swift +++ b/dogether/Presentation/Features/Ranking/Components/RankingView.swift @@ -10,7 +10,7 @@ import UIKit final class RankingView: BaseView { private let rankingLabel = { let label = UILabel() - label.textColor = .grey0 + label.textColor = Color.Text.default label.font = Fonts.body2S return label }() @@ -19,7 +19,7 @@ final class RankingView: BaseView { private let nameLabel = { let label = UILabel() - label.textColor = .grey0 + label.textColor = Color.Text.default label.font = Fonts.body1S return label }() @@ -28,7 +28,7 @@ final class RankingView: BaseView { private let certificationLabel = { let label = UILabel() - label.textColor = .blue300 + label.textColor = Color.Text.primary label.font = Fonts.body1S return label }() diff --git a/dogether/Presentation/Features/Setting/Components/SettingButton.swift b/dogether/Presentation/Features/Setting/Components/SettingButton.swift index 0a17e502..5b83e464 100644 --- a/dogether/Presentation/Features/Setting/Components/SettingButton.swift +++ b/dogether/Presentation/Features/Setting/Components/SettingButton.swift @@ -25,15 +25,15 @@ final class SettingButton: BaseButton { override func configureView() { buttonTitleLabel.text = title - buttonTitleLabel.textColor = .grey0 + buttonTitleLabel.textColor = Color.Text.default buttonTitleLabel.font = Fonts.body1B textLabel.text = text - textLabel.textColor = .grey0 + textLabel.textColor = Color.Text.default textLabel.font = Fonts.body1R textLabel.isHidden = text == nil - chevronImageView.tintColor = .grey200 + chevronImageView.tintColor = Color.Icon.primary chevronImageView.isHidden = text != nil } diff --git a/dogether/Presentation/Features/Start/Components/StartPage.swift b/dogether/Presentation/Features/Start/Components/StartPage.swift index 1d7c3098..35a99861 100644 --- a/dogether/Presentation/Features/Start/Components/StartPage.swift +++ b/dogether/Presentation/Features/Start/Components/StartPage.swift @@ -28,7 +28,7 @@ final class StartPage: BasePage { string: "소속된 그룹이 없어요.\n그룹을 만들거나 참여하세요!", attributes: Fonts.getAttributes(for: Fonts.head1B, textAlignment: .left) ) - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.numberOfLines = 0 buttonStackView.axis = .vertical @@ -97,7 +97,7 @@ final class StartPage: BasePage { extension StartPage { private func startButton(groupType: GroupTypes) -> UIButton { let button = UIButton() - button.backgroundColor = .grey800 + button.backgroundColor = Color.Background.elavated button.layer.cornerRadius = 12 button.tag = groupType.rawValue button.addAction( @@ -112,19 +112,19 @@ extension StartPage { let titleLabel = UILabel() titleLabel.text = groupType.startTitleText - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.font = Fonts.head2B titleLabel.isUserInteractionEnabled = false let subTitleLabel = UILabel() subTitleLabel.text = groupType.startSubTitleText - subTitleLabel.textColor = .grey300 + subTitleLabel.textColor = Color.Text.secondary subTitleLabel.font = Fonts.body2R subTitleLabel.isUserInteractionEnabled = false let chevronImageView = UIImageView() chevronImageView.image = .chevronRight.withRenderingMode(.alwaysTemplate) - chevronImageView.tintColor = .grey200 + chevronImageView.tintColor = Color.Text.subtle chevronImageView.isUserInteractionEnabled = false [imageView, titleLabel, subTitleLabel, chevronImageView].forEach { button.addSubview($0) } diff --git a/dogether/Presentation/Features/Stats/Components/AchievementView.swift b/dogether/Presentation/Features/Stats/Components/AchievementView.swift index ed8e3047..99f487ad 100644 --- a/dogether/Presentation/Features/Stats/Components/AchievementView.swift +++ b/dogether/Presentation/Features/Stats/Components/AchievementView.swift @@ -19,16 +19,16 @@ final class AchievementView: BaseView { private let barMaxHeight: CGFloat = 187 override func configureView() { - backgroundColor = .grey800 + backgroundColor = Color.Background.elavated layer.cornerRadius = 12 clipsToBounds = true - titleIconImageView.tintColor = .grey0 + titleIconImageView.tintColor = Color.Icon.default titleIconImageView.contentMode = .scaleAspectFit titleLabel.text = "인증한 기간" titleLabel.font = Fonts.body1S - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleStackView.axis = .horizontal titleStackView.spacing = 8 @@ -57,7 +57,7 @@ final class AchievementView: BaseView { let label = UILabel() label.text = "\($0)" label.font = Fonts.body2S - label.textColor = .grey400 + label.textColor = Color.Text.disabled return label }.forEach { yAxisStackView.addArrangedSubview($0) } @@ -128,7 +128,7 @@ final class AchievementView: BaseView { backgroundImageView.snp.makeConstraints { $0.edges.equalToSuperview() } let filledBar = UIView() - filledBar.backgroundColor = (index == data.count - 1) ? .blue300 : .blue200 + filledBar.backgroundColor = (index == data.count - 1) ? Color.Background.primary : .blue200 // FIXME: 컬러 추가 필요 filledBar.layer.cornerRadius = 4 filledBar.clipsToBounds = true backgroundBar.addSubview(filledBar) @@ -147,7 +147,7 @@ final class AchievementView: BaseView { let dayLabel = UILabel() dayLabel.text = "\(achievement.day)일차" dayLabel.font = Fonts.body2S - dayLabel.textColor = .grey0 + dayLabel.textColor = Color.Text.default dayLabel.textAlignment = .center dayLabel.snp.makeConstraints { $0.width.equalTo(50) @@ -160,14 +160,14 @@ final class AchievementView: BaseView { extension AchievementView { private func addSpeechBubble(to container: UIView, ratio: CGFloat) { let bubbleContainer = UIView() - bubbleContainer.backgroundColor = .blue300 + bubbleContainer.backgroundColor = Color.Background.primary bubbleContainer.clipsToBounds = true container.addSubview(bubbleContainer) let bubbleLabel = UILabel() bubbleLabel.text = "\(Int(ratio * 100))% 달성중" bubbleLabel.font = Fonts.body2S - bubbleLabel.textColor = .grey0 + bubbleLabel.textColor = Color.Text.default bubbleLabel.textAlignment = .center bubbleContainer.addSubview(bubbleLabel) @@ -185,7 +185,7 @@ extension AchievementView { bubbleContainer.layer.cornerRadius = 15 let tailImageView = UIImageView(image: .blueTail) - tailImageView.tintColor = .blue300 + tailImageView.tintColor = Color.Icon.primary tailImageView.contentMode = .scaleAspectFit container.addSubview(tailImageView) diff --git a/dogether/Presentation/Features/Stats/Components/StatsRankView.swift b/dogether/Presentation/Features/Stats/Components/StatsRankView.swift index 8a95e441..304e3c88 100644 --- a/dogether/Presentation/Features/Stats/Components/StatsRankView.swift +++ b/dogether/Presentation/Features/Stats/Components/StatsRankView.swift @@ -16,28 +16,28 @@ final class StatsRankView: BaseView { private let rankLabel = UILabel() override func configureView() { - backgroundColor = .grey800 + backgroundColor = Color.Background.elavated layer.cornerRadius = 12 layer.masksToBounds = true iconImageView.image = .chart.withRenderingMode(.alwaysTemplate) - iconImageView.tintColor = .grey0 + iconImageView.tintColor = Color.Icon.default iconImageView.contentMode = .scaleAspectFit titleLabel.text = "내 순위" titleLabel.font = Fonts.body1S - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleStackView.axis = .horizontal titleStackView.spacing = 8 titleStackView.alignment = .center rankBaseLabel.font = Fonts.body1S - rankBaseLabel.textColor = .grey200 + rankBaseLabel.textColor = Color.Text.subtle rankBaseLabel.textAlignment = .center rankLabel.font = Fonts.emphasis2B - rankLabel.textColor = .blue300 + rankLabel.textColor = Color.Text.primary rankLabel.textAlignment = .center } diff --git a/dogether/Presentation/Features/Stats/Components/StatsSummaryStackView.swift b/dogether/Presentation/Features/Stats/Components/StatsSummaryStackView.swift index 6c26b7e7..d3ba4f19 100644 --- a/dogether/Presentation/Features/Stats/Components/StatsSummaryStackView.swift +++ b/dogether/Presentation/Features/Stats/Components/StatsSummaryStackView.swift @@ -31,10 +31,10 @@ final class StatsSummaryStackView: BaseStackView { titleLabel.text = type.text titleLabel.font = Fonts.body2S - titleLabel.textColor = .grey200 + titleLabel.textColor = Color.Text.subtle countLabel.font = Fonts.body2S - countLabel.textColor = .grey0 + countLabel.textColor = Color.Text.default } override func configureAction() { } diff --git a/dogether/Presentation/Features/Stats/Components/StatsSummaryView.swift b/dogether/Presentation/Features/Stats/Components/StatsSummaryView.swift index 7451f236..174af78c 100644 --- a/dogether/Presentation/Features/Stats/Components/StatsSummaryView.swift +++ b/dogether/Presentation/Features/Stats/Components/StatsSummaryView.swift @@ -14,13 +14,13 @@ final class StatsSummaryView: BaseView { private let titleStackView = UIStackView() private let achievedStackView = StatsSummaryStackView(type: .achievement) - private let approveStackView = StatsSummaryStackView(type: .approve) - private let rejectStackView = StatsSummaryStackView(type: .reject) + private let approveStackView = StatsSummaryStackView(type: .review(.approve)) + private let rejectStackView = StatsSummaryStackView(type: .review(.reject)) private let summaryStackView = UIStackView() override func configureView() { - backgroundColor = .grey800 + backgroundColor = Color.Background.elavated layer.cornerRadius = 12 layer.masksToBounds = true @@ -29,7 +29,7 @@ final class StatsSummaryView: BaseView { titleLabel.text = "요약" titleLabel.font = Fonts.body1S - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleStackView.axis = .horizontal titleStackView.spacing = 4 diff --git a/dogether/Presentation/Features/Stats/Mock/en.lproj/CertificationStatsMock.json b/dogether/Presentation/Features/Stats/Mock/en.lproj/CertificationStatsMock.json deleted file mode 100644 index 58409eb7..00000000 --- a/dogether/Presentation/Features/Stats/Mock/en.lproj/CertificationStatsMock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "certificatedCount": 10, - "approvedCount": 7, - "rejectedCount": 3 -} diff --git a/dogether/Presentation/Features/TodoWrite/Components/TodoWritePage.swift b/dogether/Presentation/Features/TodoWrite/Components/TodoWritePage.swift index 15f7a9cc..11fbe987 100644 --- a/dogether/Presentation/Features/TodoWrite/Components/TodoWritePage.swift +++ b/dogether/Presentation/Features/TodoWrite/Components/TodoWritePage.swift @@ -56,14 +56,14 @@ final class TodoWritePage: BasePage { string: "아직 작성된 투두가 없어요", attributes: Fonts.getAttributes(for: Fonts.head2B, textAlignment: .center) ) - titleLabel.textColor = .grey400 + titleLabel.textColor = Color.Text.disabled let subTitleLabel = UILabel() subTitleLabel.attributedText = NSAttributedString( string: "오늘 하루 이루고 싶은 목표를 입력해보세요!", attributes: Fonts.getAttributes(for: Fonts.body2R, textAlignment: .center) ) - subTitleLabel.textColor = .grey400 + subTitleLabel.textColor = Color.Text.disabled let stackView = UIStackView(arrangedSubviews: [imageView, titleLabel, subTitleLabel]) stackView.axis = .vertical @@ -95,18 +95,18 @@ final class TodoWritePage: BasePage { string: DateFormatterManager.formattedDate(format: .MdE), attributes: Fonts.getAttributes(for: Fonts.body1S, textAlignment: .left) ) - dateLabel.textColor = .grey300 - todoLimitLabel.textColor = .grey0 + dateLabel.textColor = Color.Text.secondary + todoLimitLabel.textColor = Color.Text.default todoTextField.font = Fonts.body1S - todoTextField.tintColor = .blue300 - todoTextField.textColor = .grey0 + todoTextField.tintColor = Color.Icon.primary + todoTextField.textColor = Color.Text.default todoTextField.returnKeyType = .done todoTextField.borderStyle = .none - todoTextField.backgroundColor = .grey800 + todoTextField.backgroundColor = Color.Background.elavated todoTextField.layer.cornerRadius = 12 todoTextField.layer.borderWidth = 0 - todoTextField.layer.borderColor = UIColor.blue300.cgColor + todoTextField.layer.borderColor = Color.Border.primary.cgColor let leftPaddingView = UIView(frame: CGRect(x: 0, y: 0, width: 16, height: todoTextField.frame.height)) todoTextField.leftView = leftPaddingView @@ -116,12 +116,12 @@ final class TodoWritePage: BasePage { todoTextField.rightView = rightPaddingView todoTextField.rightViewMode = .always - todoLimitTextCount.textColor = .grey500 + todoLimitTextCount.textColor = .grey500 // FIXME: 컬러 추가 필요 todoLimitTextCount.font = Fonts.smallS - addButton.backgroundColor = .grey600 + addButton.backgroundColor = .grey600 // FIXME: 컬러 추가 필요 addButton.layer.cornerRadius = 8 - addButton.tintColor = .grey400 + addButton.tintColor = Color.Icon.secondary addButtonImageView.image = .plus.withRenderingMode(.alwaysTemplate) addButtonImageView.isUserInteractionEnabled = false @@ -261,24 +261,24 @@ extension TodoWritePage { todoTextField.isEnabled = canAddTodo todoTextField.attributedPlaceholder = NSAttributedString( string: canAddTodo ? "예) 30분 걷기, 책 20페이지 읽기" : "모든 투두를 작성했어요!", - attributes: [.foregroundColor: canAddTodo ? UIColor.grey300 : UIColor.grey400] + attributes: [.foregroundColor: canAddTodo ? Color.Text.secondary : Color.Text.disabled] ) - todoTextField.backgroundColor = canAddTodo ? .grey800 : .grey500 + todoTextField.backgroundColor = canAddTodo ? Color.Background.elavated : Color.Background.disabled todoLimitTextCount.isHidden = !canAddTodo todoLimitTextCount.attributedText = makeAttributedText( current: "\((currentTodo ?? "").count)", maximum: "/\(todoMaxLength)", - currentColor: .blue300, - maximumColor: .grey400 + currentColor: Color.Text.primary, + maximumColor: Color.Text.disabled ) } private func updateAddButtonStatus() { let trimmed = (currentTodo ?? "").trimmingCharacters(in: .whitespacesAndNewlines) addButton.isEnabled = !trimmed.isEmpty - addButton.backgroundColor = trimmed.isEmpty ? .grey600 : .blue300 - addButton.tintColor = trimmed.isEmpty ? .grey400 : .grey900 + addButton.backgroundColor = trimmed.isEmpty ? .grey600 : Color.Background.primary // FIXME: 컬러 추가 필요 + addButton.tintColor = trimmed.isEmpty ? Color.Icon.secondary : .grey900 // FIXME: 컬러 추가 필요 } private func updateTodoLimitLabel() { @@ -288,8 +288,8 @@ extension TodoWritePage { prefix: "추가 가능 투두 ", current: current, maximum: "/\(todoMaxCount)", - currentColor: .blue300, - maximumColor: .grey600, + currentColor: Color.Text.primary, + maximumColor: .grey600, // FIXME: 컬러 추가 필요 baseAttributes: Fonts.getAttributes(for: Fonts.head1B, textAlignment: .left) ) } diff --git a/dogether/Presentation/Features/TodoWrite/Components/TodoWriteTableViewCell.swift b/dogether/Presentation/Features/TodoWrite/Components/TodoWriteTableViewCell.swift index f44fc978..f8a2b195 100644 --- a/dogether/Presentation/Features/TodoWrite/Components/TodoWriteTableViewCell.swift +++ b/dogether/Presentation/Features/TodoWrite/Components/TodoWriteTableViewCell.swift @@ -15,7 +15,7 @@ final class TodoWriteTableViewCell: BaseTableViewCell { private let tableViewCell = { let view = UIView() - view.backgroundColor = .grey800 + view.backgroundColor = Color.Background.elavated view.layer.cornerRadius = 8 return view }() @@ -29,7 +29,7 @@ final class TodoWriteTableViewCell: BaseTableViewCell { private let deleteButton = { let button = UIButton() button.setImage(.close.withRenderingMode(.alwaysTemplate), for: .normal) - button.tintColor = .grey300 + button.tintColor = .grey300 // FIXME: 컬러 추가 필요 return button }() @@ -69,7 +69,7 @@ final class TodoWriteTableViewCell: BaseTableViewCell { extension TodoWriteTableViewCell { func setExtraInfo(todo: WriteTodoEntity, index: Int, deleteAction: @escaping (Int) -> Void) { todoLabel.text = todo.content - todoLabel.textColor = todo.enabled ? .grey0 : .grey400 + todoLabel.textColor = todo.enabled ? Color.Text.default : Color.Text.disabled deleteButton.tag = index deleteButton.removeTarget(nil, action: nil, for: .touchUpInside) deleteButton.isHidden = !todo.enabled diff --git a/dogether/Presentation/Features/Update/Components/UpdatePage.swift b/dogether/Presentation/Features/Update/Components/UpdatePage.swift index 70946a76..3e6d6526 100644 --- a/dogether/Presentation/Features/Update/Components/UpdatePage.swift +++ b/dogether/Presentation/Features/Update/Components/UpdatePage.swift @@ -33,14 +33,14 @@ final class UpdatePage: BasePage { typoImageView.contentMode = .scaleAspectFit titleLabel.text = "두게더가 새로워졌어요!" - titleLabel.textColor = .grey0 + titleLabel.textColor = Color.Text.default titleLabel.font = Fonts.head1B descriptionLabel.attributedText = NSAttributedString( string: "두게더가 유저분들의 의견을 반영하여\n더 편하게 사용하도록 사용성을 개선했어요.\n지금 바로 업데이트하고 인증하러 가요!", attributes: Fonts.getAttributes(for: Fonts.body1R, textAlignment: .center) ) - descriptionLabel.textColor = .grey200 + descriptionLabel.textColor = Color.Text.subtle descriptionLabel.numberOfLines = 0 updateImageView.image = .partyDosik diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDefault.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDefault.colorset/Contents.json new file mode 100644 index 00000000..01216aa9 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDefault.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x10", + "green" : "0x10", + "red" : "0x10" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x10", + "green" : "0x10", + "red" : "0x10" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDim.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDim.colorset/Contents.json new file mode 100644 index 00000000..04bdfe78 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDim.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.800", + "blue" : "0x10", + "green" : "0x10", + "red" : "0x10" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.800", + "blue" : "0x10", + "green" : "0x10", + "red" : "0x10" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDisabled.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDisabled.colorset/Contents.json new file mode 100644 index 00000000..782c1fcd --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgDisabled.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x51", + "green" : "0x51", + "red" : "0x51" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x51", + "green" : "0x51", + "red" : "0x51" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgElavated.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgElavated.colorset/Contents.json new file mode 100644 index 00000000..487772f9 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgElavated.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1F", + "green" : "0x1F", + "red" : "0x1F" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1F", + "green" : "0x1F", + "red" : "0x1F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgInverse.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgInverse.colorset/Contents.json new file mode 100644 index 00000000..b7bf401d --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgInverse.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xF7", + "red" : "0xF7" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFC", + "green" : "0xF7", + "red" : "0xF7" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgPrimary.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgPrimary.colorset/Contents.json new file mode 100644 index 00000000..6ef033ab --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgPrimary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgSurface.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgSurface.colorset/Contents.json new file mode 100644 index 00000000..18c09570 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Background/colorBgSurface.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2B", + "green" : "0x2B", + "red" : "0x2B" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2B", + "green" : "0x2B", + "red" : "0x2B" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderDefault.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderDefault.colorset/Contents.json new file mode 100644 index 00000000..2536dc2d --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderDefault.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderDisabled.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderDisabled.colorset/Contents.json new file mode 100644 index 00000000..ffb2ad1a --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderDisabled.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3B", + "green" : "0x3B", + "red" : "0x3B" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3B", + "green" : "0x3B", + "red" : "0x3B" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderElavated.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderElavated.colorset/Contents.json new file mode 100644 index 00000000..44b82e47 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderElavated.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBC", + "green" : "0xB5", + "red" : "0xB3" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBC", + "green" : "0xB5", + "red" : "0xB3" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderError.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderError.colorset/Contents.json new file mode 100644 index 00000000..49757cdd --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderError.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x71", + "green" : "0x51", + "red" : "0xFB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x71", + "green" : "0x51", + "red" : "0xFB" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderPrimary.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderPrimary.colorset/Contents.json new file mode 100644 index 00000000..6ef033ab --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderPrimary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderSecondary.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderSecondary.colorset/Contents.json new file mode 100644 index 00000000..e30b5605 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Border/colorBorderSecondary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x86", + "green" : "0x79", + "red" : "0x77" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x86", + "green" : "0x79", + "red" : "0x77" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconDefault.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconDefault.colorset/Contents.json new file mode 100644 index 00000000..2536dc2d --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconDefault.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconDisabled.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconDisabled.colorset/Contents.json new file mode 100644 index 00000000..ffb2ad1a --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconDisabled.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3B", + "green" : "0x3B", + "red" : "0x3B" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3B", + "green" : "0x3B", + "red" : "0x3B" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconElavated.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconElavated.colorset/Contents.json new file mode 100644 index 00000000..44b82e47 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconElavated.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBC", + "green" : "0xB5", + "red" : "0xB3" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBC", + "green" : "0xB5", + "red" : "0xB3" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconError.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconError.colorset/Contents.json new file mode 100644 index 00000000..49757cdd --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconError.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x71", + "green" : "0x51", + "red" : "0xFB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x71", + "green" : "0x51", + "red" : "0xFB" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconPrimary.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconPrimary.colorset/Contents.json new file mode 100644 index 00000000..6ef033ab --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconPrimary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconSecondary.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconSecondary.colorset/Contents.json new file mode 100644 index 00000000..e30b5605 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Icon/colorIconSecondary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x86", + "green" : "0x79", + "red" : "0x77" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x86", + "green" : "0x79", + "red" : "0x77" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Shadow/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Shadow/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Shadow/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Shadow/colorShadowDefault.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Shadow/colorShadowDefault.colorset/Contents.json new file mode 100644 index 00000000..db90b0a5 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Shadow/colorShadowDefault.colorset/Contents.json @@ -0,0 +1,41 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.300", + "blue" : "0x10", + "green" : "0x10", + "red" : "0x10" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.300", + "blue" : "0x10", + "green" : "0x10", + "red" : "0x10" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "localizable" : true + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextDefault.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextDefault.colorset/Contents.json new file mode 100644 index 00000000..2536dc2d --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextDefault.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextDisabled.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextDisabled.colorset/Contents.json new file mode 100644 index 00000000..e30b5605 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextDisabled.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x86", + "green" : "0x79", + "red" : "0x77" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x86", + "green" : "0x79", + "red" : "0x77" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextError.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextError.colorset/Contents.json new file mode 100644 index 00000000..49757cdd --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextError.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x71", + "green" : "0x51", + "red" : "0xFB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x71", + "green" : "0x51", + "red" : "0xFB" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextInverse.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextInverse.colorset/Contents.json new file mode 100644 index 00000000..487772f9 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextInverse.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1F", + "green" : "0x1F", + "red" : "0x1F" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1F", + "green" : "0x1F", + "red" : "0x1F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextPrimary.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextPrimary.colorset/Contents.json new file mode 100644 index 00000000..6ef033ab --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextPrimary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xA5", + "red" : "0x56" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextSecondary.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextSecondary.colorset/Contents.json new file mode 100644 index 00000000..b82b6507 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextSecondary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xA2", + "green" : "0x96", + "red" : "0x94" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xA2", + "green" : "0x96", + "red" : "0x94" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextSubtle.colorset/Contents.json b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextSubtle.colorset/Contents.json new file mode 100644 index 00000000..44b82e47 --- /dev/null +++ b/dogether/Resource/Asset/Assets.xcassets/Color/Semantic/Text/colorTextSubtle.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBC", + "green" : "0xB5", + "red" : "0xB3" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xBC", + "green" : "0xB5", + "red" : "0xB3" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dogether/Resource/Color.swift b/dogether/Resource/Color.swift new file mode 100644 index 00000000..9813818b --- /dev/null +++ b/dogether/Resource/Color.swift @@ -0,0 +1,52 @@ +// +// Color.swift +// dogether +// +// Created by yujaehong on 1/26/26. +// + +import UIKit + +enum Color { + enum Background { + static let `default` = UIColor(named: "colorBgDefault")! + static let elavated = UIColor(named: "colorBgElavated")! + static let surface = UIColor(named: "colorBgSurface")! + static let disabled = UIColor(named: "colorBgDisabled")! + static let primary = UIColor(named: "colorBgPrimary")! + static let inverse = UIColor(named: "colorBgInverse")! + static let dim = UIColor(named: "colorBgDim")! + } + + enum Icon { + static let `default` = UIColor(named: "colorIconDefault")! + static let disabled = UIColor(named: "colorIconDisabled")! + static let elavated = UIColor(named: "colorIconElavated")! + static let error = UIColor(named: "colorIconError")! + static let primary = UIColor(named: "colorIconPrimary")! + static let secondary = UIColor(named: "colorIconSecondary")! + } + + enum Border { + static let `default` = UIColor(named: "colorBorderDefault")! + static let disabled = UIColor(named: "colorBorderDisabled")! + static let elavated = UIColor(named: "colorBorderElavated")! + static let error = UIColor(named: "colorBorderError")! + static let primary = UIColor(named: "colorBorderPrimary")! + static let secondary = UIColor(named: "colorBorderSecondary")! + } + + enum Text { + static let `default` = UIColor(named: "colorTextDefault")! + static let subtle = UIColor(named: "colorTextSubtle")! + static let secondary = UIColor(named: "colorTextSecondary")! + static let disabled = UIColor(named: "colorTextDisabled")! + static let primary = UIColor(named: "colorTextPrimary")! + static let error = UIColor(named: "colorTextError")! + static let inverse = UIColor(named: "colorTextInverse")! + } + + enum Shadow { + static let `default` = UIColor(named: "colorShadowDefault")! + } +}