From: Damian Myrda Date: Sat, 21 Sep 2024 02:56:01 +0000 (-0500) Subject: Show total activity X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=582cff7a8e0bd2bc76ce34dd6758d009e95e15f1;p=p8d.git Show total activity --- 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; }