Fix opacity display issue on iOS and add support for cakeday (#25)

* Test no opacity

* Fix opacity display issue on iOS and add support for cakeday
This commit is contained in:
Simon Lecoq
2020-12-21 14:02:17 +01:00
committed by GitHub
parent e50e65d25d
commit f29d8ad155
7 changed files with 40 additions and 15 deletions

View File

@@ -47,6 +47,7 @@
const years = Math.floor(diff)
const months = Math.ceil((diff-years)*12)
computed.registration = years ? `${years} year${s(years)} ago` : `${months} month${s(months)} ago`
computed.cakeday = [new Date(), new Date(data.user.createdAt)].map(date => date.toISOString().match(/(?<mmdd>\d{2}-\d{2})(?=T)/)?.groups?.mmdd).every((v, _, a) => v === a[0])
//Compute calendar
computed.calendar = data.user.calendar.contributionCalendar.weeks.flatMap(({contributionDays}) => contributionDays).slice(0, 14).reverse()