Add followup, habits and introduction section in insights (#291)

This commit is contained in:
Simon Lecoq
2021-05-11 13:57:34 +02:00
committed by GitHub
parent 605b3801e8
commit 3727e8f71a
4 changed files with 156 additions and 5 deletions

View File

@@ -98,6 +98,15 @@
achievements() {
return this.metrics?.rendered.plugins.achievements.list?.filter(({ leaderboard }) => !leaderboard).filter(({ title }) => !/(?:automater|octonaut|infographile)/i.test(title)) ?? []
},
introduction() {
return this.metrics?.rendered.plugins.introduction?.text ?? ""
},
followup() {
return this.metrics?.rendered.plugins.followup ?? null
},
habits() {
return this.metrics?.rendered.plugins.habits.commits.hours ?? null
},
isocalendar() {
return (this.metrics?.rendered.plugins.isocalendar.svg ?? "")
.replace(/#ebedf0/gi, "var(--color-calendar-graph-day-bg)")