refactor: Remove redundant activity log display code from dashboard

This commit is contained in:
MayaTheShy
2026-02-19 23:31:34 -05:00
parent c0573a62aa
commit a3ca1aae1c

View File

@@ -185,36 +185,6 @@ local function drawDashboard()
logY = logY + 1
end
end
monitor.write("╔═══ ACTIVITY LOG ═══╗")
-- Calculate how many log lines we can show (huge vertical space!)
local maxLines = h - logY - 4
for i = 1, math.min(#activityLog, maxLines) do
local entry = activityLog[i]
monitor.setCursorPos(4, logY + 2 + i)
monitor.setBackgroundColor(colors.black)
monitor.setTextColor(colors.gray)
local time = os.date("%H:%M:%S", entry.time / 1000)
monitor.write("[" .. time .. "] ")
monitor.setTextColor(entry.color)
-- Truncate long messages to fit width
local maxTextWidth = w - 18
local text = entry.text
if #text > maxTextWidth then
text = text:sub(1, maxTextWidth - 3) .. "..."
end
monitor.write(text)
end
-- Footer
monitor.setBackgroundColor(colors.gray)
monitor.setCursorPos(1, h)
monitor.clearLine()
centerText(h, "Ctrl+T to terminate | Monitoring " .. STATUS_CHANNEL .. " & " .. COMMAND_CHANNEL, colors.white, colors.gray)
end
local function addLog(text, color)
table.insert(activityLog, 1, {text = text, color = color or colors.white, time = os.epoch("utc")})