Skip to content

Commit d7ddff6

Browse files
committed
chore(activity): show total time and focus percentage in top of dashboard
1 parent 9c1e248 commit d7ddff6

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

lua/codeme/ui/tabs/activity.lua

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ function M.render(stats)
7979

8080
table.insert(story_parts, { ".", "commentfg" })
8181
table.insert(lines, story_parts)
82+
table.insert(lines, {
83+
{ " 📊 ", "exgreen" },
84+
{ util.format_duration(total_time), "exgreen" },
85+
{ " total • ", "commentfg" },
86+
{ string.format("Focus %d%%", focus_score), focus_score >= 70 and "exgreen" or "exyellow" },
87+
})
8288
table.insert(lines, {})
8389

8490
local focus_insight = { { " ", "commentfg" } }
@@ -172,15 +178,6 @@ function M.render(stats)
172178
table.insert(lines, {})
173179
end
174180

175-
-- Quick Stats
176-
table.insert(lines, {
177-
{ " 📊 ", "exgreen" },
178-
{ util.format_duration(total_time), "exgreen" },
179-
{ " total • ", "commentfg" },
180-
{ string.format("Focus %d%%", focus_score), focus_score >= 70 and "exgreen" or "exyellow" },
181-
})
182-
table.insert(lines, {})
183-
184181
-- Peak Hours
185182
local hourly_activity = {}
186183
for _, item in ipairs(today.hourly_activity or {}) do

0 commit comments

Comments
 (0)