Skip to content

Commit

Permalink
feat: #81 Add CompletionGreenFlag
Browse files Browse the repository at this point in the history
- ์™„๋… ์‹œ ์ดˆ๋ก ๊นƒ๋ฐœ๋กœ ๋ณ€๊ฒฝํ•˜๋Š” ๋กœ์ง ๊ตฌํ˜„
- ํ”ผ๊ทธ๋งˆ ์ฐธ์กฐํ•ด ํ…์ŠคํŠธ ํŒจ๋”ฉ ๋ฐ ์‚ฌ์ด์ฆˆ ์กฐ์ •
  • Loading branch information
hyeyeonie committed Nov 18, 2024
1 parent 6d36b5f commit 8d1b79e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "completionGreenFlag.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 15@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 15@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions FiveGuyes/FiveGuyes/Sources/Views/Screen/TotalCalendarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,19 @@ struct TotalCalendarView: View {
if let currentReadingBook = currentReadingBook,
let readingRecord = currentReadingBook.readingRecords[dateKey] {

let isTodayCompletionDate = Calendar.current.isDate(todayDate, inSameDayAs: currentReadingBook.book.targetEndDate)

if Calendar.current.isDate(date, inSameDayAs: currentReadingBook.book.targetEndDate) {
// TODO: ์ด๋ฏธ์ง€ ๊ต์ฒดํ•˜๊ธฐ (๋งˆ์ง€๋ง‰๋‚ , ์•„๋‹Œ ๋‚ )
// `targetEndDate` ๋‚ ์งœ์ธ ๊ฒฝ์šฐ - ํŠน์ • ์ด๋ฏธ์ง€๋ฅผ ๋ฐฐ๊ฒฝ์œผ๋กœ ํ‘œ์‹œ
Image("completionFlag") // ๋„ฃ๊ณ ์ž ํ•˜๋Š” ์ด๋ฏธ์ง€ ์ด๋ฆ„์œผ๋กœ ๋Œ€์ฒด
Image(isTodayCompletionDate ? "completionFlagToday" : "completionFlag")
.resizable()
.scaledToFit()
.frame(width: 50, height: 50)
.overlay(
Text("์™„๋…")
.font(.system(size: 13, weight: .semibold))
.foregroundColor(Color(red: 0.03, green: 0.68, blue: 0.41))
.font(.system(size: 14, weight: .semibold))
.foregroundColor(isTodayCompletionDate ? Color.white : Color(red: 0.03, green: 0.68, blue: 0.41))
.padding(.bottom, 1)
.padding(.leading, 2)
)
} else if Calendar.current.isDate(date, inSameDayAs: todayDate) {
// ์˜ค๋Š˜ ๋‚ ์งœ์ธ ๊ฒฝ์šฐ - ์ดˆ๋ก์ƒ‰ ๋ฐฐ๊ฒฝ์— ๋ชฉํ‘œ ํŽ˜์ด์ง€ ์ˆ˜ ํ‘œ์‹œ
Expand Down

0 comments on commit 8d1b79e

Please sign in to comment.