From fbdbb84b3ec6ee82d50d56df36a4745d78a91b21 Mon Sep 17 00:00:00 2001 From: Ivan Velev Date: Tue, 21 Sep 2021 06:44:25 -0700 Subject: [PATCH] vueui: added notes to calendar year computed props --- pywb/vueui/src/components/CalendarYear.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pywb/vueui/src/components/CalendarYear.vue b/pywb/vueui/src/components/CalendarYear.vue index cef7fb81..882ddc17 100644 --- a/pywb/vueui/src/components/CalendarYear.vue +++ b/pywb/vueui/src/components/CalendarYear.vue @@ -65,9 +65,10 @@ export default { document.querySelector('body').addEventListener('click', this.resetCurrentTimeline); }, computed: { - year() { + year() { // the year that the timeline period is in let year = null; if (this.period.type === PywbPeriod.Type.all) { + // if timeline is showing all year => pick the LAST YEAR year = this.period.children[this.period.children.length-1]; } else if (this.period.type === PywbPeriod.Type.year) { year = this.period; @@ -79,7 +80,7 @@ export default { } return year; }, - currentMonth() { + currentMonth() { // the month that the timeline period is in let month = null; if (this.period.type === PywbPeriod.Type.month) { month = this.period;