diff --git a/client/assets/app.css b/client/assets/app.css index 9a406d09..c323a37b 100644 --- a/client/assets/app.css +++ b/client/assets/app.css @@ -127,6 +127,14 @@ input[type=number] { border-top: 6px solid white; } +.arrow-down-small { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid currentColor; +} + .triangle-right { width: 0; height: 0; diff --git a/client/components/stats/Heatmap.vue b/client/components/stats/Heatmap.vue new file mode 100644 index 00000000..8699d93c --- /dev/null +++ b/client/components/stats/Heatmap.vue @@ -0,0 +1,273 @@ + + + + {{ Object.values(daysListening).length }} listening sessions in the last year + + + {{ dayLabel.label }} + + {{ monthLabel.label }} + + + + + + Less + + More + + + + + + + + \ No newline at end of file diff --git a/client/pages/config.vue b/client/pages/config.vue index 55f7b0ea..39d99874 100644 --- a/client/pages/config.vue +++ b/client/pages/config.vue @@ -1,5 +1,5 @@ - + diff --git a/client/pages/config/stats.vue b/client/pages/config/stats.vue index 867944b4..ea8fa32e 100644 --- a/client/pages/config/stats.vue +++ b/client/pages/config/stats.vue @@ -2,7 +2,7 @@ - + - event + + event + {{ totalDaysListened }} Days Listened @@ -23,15 +25,17 @@ - watch_later + + watch_later + {{ totalMinutesListening }} Minutes Listening - - + + Recent Listening Sessions No Listening Sessions @@ -52,6 +56,8 @@ + + @@ -59,7 +65,8 @@ export default { data() { return { - listeningStats: null + listeningStats: null, + windowWidth: 0 } }, watch: { diff --git a/client/plugins/init.client.js b/client/plugins/init.client.js index 71585580..4a5dc643 100644 --- a/client/plugins/init.client.js +++ b/client/plugins/init.client.js @@ -23,6 +23,11 @@ Vue.prototype.$addDaysToToday = (daysToAdd) => { if (!date || !isDate(date)) return null return date } +Vue.prototype.$addDaysToDate = (jsdate, daysToAdd) => { + var date = addDays(jsdate, daysToAdd) + if (!date || !isDate(date)) return null + return date +} Vue.prototype.$bytesPretty = (bytes, decimals = 2) => { if (isNaN(bytes) || bytes == 0) {
{{ Object.values(daysListening).length }} listening sessions in the last year
Less
More
{{ totalDaysListened }}
Days Listened
{{ totalMinutesListening }}
Minutes Listening
No Listening Sessions