Skip to content
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

Release브랜치에서 수정한 버그 -> develop에 머지 #398

Merged
merged 4 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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