-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat-T3-201] 제보 히스토리 화면 구현 및 화면 연결 (완료) #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // | ||
| // ReportProgress+.swift | ||
| // Presentation | ||
| // | ||
| // Created by 이동현 on 11/20/25. | ||
| // | ||
|
|
||
| import Domain | ||
| import UIKit | ||
|
|
||
| extension ReportProgress { | ||
| var backgroundColor: UIColor? { | ||
| switch self { | ||
| case .received: | ||
| BitnagilColor.green10 | ||
| case .inProgress: | ||
| BitnagilColor.skyblue10 | ||
| case .completed: | ||
| BitnagilColor.gray95 | ||
| case .entire: | ||
| nil | ||
| } | ||
| } | ||
|
|
||
| var titleColor: UIColor? { | ||
| switch self { | ||
| case .received: | ||
| BitnagilColor.green500 | ||
| case .inProgress: | ||
| BitnagilColor.blue300 | ||
| case .completed: | ||
| BitnagilColor.gray40 | ||
| case .entire: | ||
| nil | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // | ||
| // ReportProgressView.swift | ||
| // Presentation | ||
| // | ||
| // Created by 이동현 on 11/20/25. | ||
| // | ||
|
|
||
| import Domain | ||
| import SnapKit | ||
| import UIKit | ||
|
|
||
| final class ReportProgressView: UIView { | ||
|
|
||
| private enum Layout { | ||
| static let progressViewHeight: CGFloat = 26 | ||
| static let progressLabelHeight: CGFloat = 18 | ||
| static let progressLabelHorizontalSpacing: CGFloat = 10 | ||
| static let progressLabelVerticalSpacing: CGFloat = 4 | ||
| } | ||
|
|
||
| private let progressLabel = UILabel() | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
| configureAttribute() | ||
| configureLayout() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
|
|
||
| private func configureAttribute() { | ||
| layer.cornerRadius = 6 | ||
| layer.masksToBounds = true | ||
|
|
||
| progressLabel.font = BitnagilFont.init(style: .caption1, weight: .semiBold).font | ||
| } | ||
|
|
||
| private func configureLayout() { | ||
| addSubview(progressLabel) | ||
|
|
||
| self.snp.makeConstraints { make in | ||
| make.height.equalTo(Layout.progressViewHeight) | ||
| } | ||
|
|
||
| progressLabel.snp.makeConstraints { make in | ||
| make.height.equalTo(Layout.progressLabelHeight) | ||
|
|
||
| make.verticalEdges | ||
| .equalToSuperview() | ||
| .inset(Layout.progressLabelVerticalSpacing) | ||
|
|
||
| make.horizontalEdges | ||
| .equalToSuperview() | ||
| .inset(Layout.progressLabelHorizontalSpacing) | ||
| } | ||
| } | ||
|
Comment on lines
+40
to
+58
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ReportProgressView !!!!!!!! 나이쓰 따봉 ~~~ 일케 하면 나중에 ReportProgressView 사용하는 곳에서 ReportProgressView의 레이아웃 사이즈 따로 안정해줘도 ReportProgress에 맞게 저절로 정해지나유 ??
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 일단은 그렇게 해두긴했는데, 호옥시 안되면 말씀해주세요!! |
||
|
|
||
| func configure(with progress: ReportProgress) { | ||
| backgroundColor = progress.backgroundColor | ||
|
|
||
| progressLabel.textColor = progress.titleColor | ||
| progressLabel.text = progress.description | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| // | ||
| // ReportHistoryEmptyView.swift | ||
| // Presentation | ||
| // | ||
| // Created by 이동현 on 11/20/25. | ||
| // | ||
|
|
||
| import SnapKit | ||
| import UIKit | ||
|
|
||
| final class ReportHistoryEmptyView: UIView { | ||
| private enum Layout { | ||
| static let semiBoldLabelHeight: CGFloat = 28 | ||
| static let regularLabelHeight: CGFloat = 20 | ||
| static let stackViewSpacing: CGFloat = 2 | ||
| static let stackViewHeight: CGFloat = 50 | ||
| static let stackViewWidth: CGFloat = 269 | ||
| } | ||
|
|
||
| private let labelStackView = UIStackView() | ||
| private let semiBoldLabel = UILabel() | ||
| private let regularLabel = UILabel() | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
|
|
||
| configureAttribute() | ||
| configureLayout() | ||
| } | ||
|
|
||
| required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
|
|
||
| private func configureAttribute() { | ||
| backgroundColor = BitnagilColor.gray99 | ||
|
|
||
| labelStackView.axis = .vertical | ||
| labelStackView.alignment = .center | ||
|
|
||
| semiBoldLabel.font = BitnagilFont.init(style: .subtitle1, weight: .semiBold).font | ||
| semiBoldLabel.textColor = BitnagilColor.gray30 | ||
| semiBoldLabel.text = "제보한 내역이 없어요." | ||
|
|
||
| regularLabel.font = BitnagilFont.init(style: .body2, weight: .regular).font | ||
| regularLabel.textColor = BitnagilColor.gray70 | ||
| regularLabel.text = "원하는 카테고리로 제보를 시작해보세요." | ||
| } | ||
|
|
||
| private func configureLayout() { | ||
| addSubview(labelStackView) | ||
| labelStackView.addArrangedSubview(semiBoldLabel) | ||
| labelStackView.addArrangedSubview(regularLabel) | ||
|
|
||
| labelStackView.snp.makeConstraints { make in | ||
| make.center.equalToSuperview() | ||
| make.height.equalTo(Layout.stackViewHeight) | ||
| make.width.equalTo(Layout.stackViewWidth) | ||
| } | ||
|
|
||
| semiBoldLabel.snp.makeConstraints { make in | ||
| make.height.equalTo(Layout.semiBoldLabelHeight) | ||
| } | ||
|
|
||
| regularLabel.snp.makeConstraints { make in | ||
| make.height.equalTo(Layout.regularLabelHeight) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사실 지금 크게 노메러이긴 하지만 .resetGoal과 케이스 합쳐두 될 것 같아유
글구
// 임시url 주석도 이젠 없어두 될 것 같숨당 ~~