Skip to content

Commit

Permalink
Release브랜치에서 수정한 버그 -> develop에 머지 (#398)
Browse files Browse the repository at this point in the history
* 0.1버전 배포 추가!~

* [GWL- 393 (HotFix)] 온보딩 화면 텍스트 희미한 문제 해결 (#394)

* feat: Main03 Color수정

* feat: Onboarding Background Color 수정

* feat: 다시 색 수정

* feat: 글자 색 수정

* bug: 버그 수정

* chore: 수정했던 파일 복구

* fix: 카메라로 사진올릴 때, 다운샘플링 안되는 현상 픽스 (#395)

* [GWL-396] 시간대 15시간 차이나는 버그 수정 (#397)

* fix: Date가 15시간 차이나는 버그 수정

* chore: km를 m로 수정

* chore: Timezone설정해서 올바른 시간대로 들어오도록 설정

---------

Co-authored-by: Vardy <[email protected]>
Co-authored-by: MaraMincho <[email protected]>
Co-authored-by: jongpyo Ahn <[email protected]>
  • Loading branch information
4 people authored Dec 12, 2023
1 parent a334974 commit af5940b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 52 deletions.
1 change: 1 addition & 0 deletions BackEnd/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ <h1>We-Tri: 트라이 애슬론을 우리와 함께해요</h1>
<a href="itms-services://?action=download-manifest&amp;url=https://kr.object.ncloudstorage.com/wetri-ios-ipa/iOSweek4/manifest.plist" class="download-button week-4">Download Week 4 App</a>
<a href="itms-services://?action=download-manifest&amp;url=https://kr.object.ncloudstorage.com/wetri-ios-ipa/iOSweek5/manifest.plist" class="download-button week-5">Download Week 5 App</a>
<a href="itms-services://?action=download-manifest&amp;url=https://kr.object.ncloudstorage.com/wetri-ios-ipa/iOSweek6_Dev1/manifest.plist" class="download-button week-6">Download Week 6 Dev App</a>
<a href="itms-services://?action=download-manifest&amp;url=https://kr.object.ncloudstorage.com/wetri-ios-ipa/iOSweek7/manifest.plist" class="download-button week-7">Download Week 7 Production App</a>
</section>
</main>
<footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private extension OnboardingViewController {
}

func setupStyles() {
view.backgroundColor = .white
view.backgroundColor = DesignSystemColor.primaryBackground
}

func bind() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,48 +45,16 @@ extension Record {
}

private static func timeToTime(createdAt: Date, workoutTime: Int) -> (startTime: String, endTime: String)? {
let dateComponents = Calendar.current.dateComponents([.hour, .minute, .second], from: createdAt)
let endDate = createdAt
let startDate = endDate - Double(workoutTime)
let formatter = DateFormatter()
formatter.dateFormat = "HH:mm:ss"
formatter.timeZone = .init(abbreviation: "UTC")

guard
let hour = dateComponents.hour,
let minute = dateComponents.minute,
let second = dateComponents.second
else {
return nil
}

let startSeconds = Time(hour: hour, minute: minute, second: second).toSeconds()
let endSeconds = startSeconds + workoutTime
let start = prettyStyle(time: timeToHourMinuteSecond(seconds: startSeconds))
let end = prettyStyle(time: timeToHourMinuteSecond(seconds: endSeconds))
return (start, end)
}

private static func timeToHourMinuteSecond(seconds: Int) -> Time {
var seconds = seconds
let hour = seconds / 3600
seconds %= 3600
let minute = seconds / 60
seconds %= 60
return Time(hour: hour, minute: minute, second: seconds)
}

private static func prettyStyle(time: Time) -> String {
let formattedHour = String(format: "%02d", time.hour)
let formattedMinute = String(format: "%02d", time.minute)
let formattedSecond = String(format: "%02d", time.second)
return "\(formattedHour):\(formattedMinute):\(formattedSecond)"
}
}

// MARK: - Time

private struct Time {
let hour: Int
let minute: Int
let second: Int
// 날짜를 문자열로 변환
let startDateString = formatter.string(from: startDate)
let endDateString = formatter.string(from: endDate)

func toSeconds() -> Int {
return hour * 3600 + minute * 60 + second
return (startDateString, endDateString)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private extension RecordListViewController {
sport: $0.mode.description,
startTime: $0.startTime,
endTime: $0.endTime,
distance: "\($0.distance)km"
distance: "\($0.distance)m"
)
}
configureSnapShot(items: workoutInformationItems)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,11 @@ extension SignUpProfileViewController: UIImagePickerControllerDelegate {
imageSetSubject.send(downsampledData)
} else {
// 카메라에서 사진 선택할 때
guard let image = info[.originalImage] as? UIImage else {
return
if let image = try (info[.originalImage] as? UIImage)?.downsampling(size: profileImageButton.profileSize, scale: .x3),
let imageData = image.pngData() {
profileImageButton.image = image
imageSetSubject.send(imageData)
}
profileImageButton.image = try image.downsampling(size: profileImageButton.profileSize, scale: .x3)
guard let downsampledData = image.pngData() else {
return
}
imageSetSubject.send(downsampledData)
}
dismiss(animated: true)
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public extension UIButton.Configuration {
plainConfiguration.background = backgroundConfiguration

plainConfiguration.titleAlignment = .center
plainConfiguration.baseForegroundColor = DesignSystemColor.secondaryBackground
plainConfiguration.baseForegroundColor = .white
plainConfiguration.title = title

return plainConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public extension UIButton.Configuration {

plainConfiguration.titleAlignment = .center
plainConfiguration.cornerStyle = .capsule
plainConfiguration.baseForegroundColor = DesignSystemColor.secondaryBackground
plainConfiguration.baseForegroundColor = .white
plainConfiguration.title = title

return plainConfiguration
Expand Down

0 comments on commit af5940b

Please sign in to comment.