From 582cff7a8e0bd2bc76ce34dd6758d009e95e15f1 Mon Sep 17 00:00:00 2001 From: Damian Myrda Date: Fri, 20 Sep 2024 21:56:01 -0500 Subject: [PATCH] Show total activity --- web/static/js/wakatime.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/static/js/wakatime.js b/web/static/js/wakatime.js index d1b02bd..881281f 100644 --- a/web/static/js/wakatime.js +++ b/web/static/js/wakatime.js @@ -31,6 +31,10 @@ function createChart(data) { table.forEach((row) => { chart += createRow(row, max_length, total_hours); }); + var total_minutes = total_hours % 1; + total_hours -= total_minutes; + total_minutes = Math.ceil(total_minutes * 60); + chart += `total: ${total_hours} hours and ${total_minutes} minutes`; return chart; } -- 2.43.4