From 5e62e09d6fe2a03c7fdcda63c879d8fdd1dfb7b1 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 3 Nov 2026 00:07:58 +0100 Subject: dashboard: add console clear button --- src/api/dashboard/dashboard.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/api/dashboard') diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index 8b62181..9b23d46 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -94,6 +94,8 @@ section h2 .following { font-size: 12px; text-transform: none; letter-spacing: 0; margin-left: 1em; font-style: italic; } section.collapsed h2 .following { display: none; } + /* A button within a title's line, where it comes (not at its end, as toggles are). */ + section h2 button.inline { float: none; margin-left: 1em; line-height: 1em; } /* The right column dragged off to the side: the map takes the width. */ @media (min-width: 901px) { main.right-hidden > section:not(#map) { display: none; } @@ -277,7 +279,7 @@
Drag the space left of these boxes to the right to hide the column.
-

Console following…

+

Console following…

@@ -2168,6 +2170,16 @@ function showFollowing() { scroll.scrollTop + scroll.clientHeight < scroll.scrollHeight - 4; } consoleScroll.addEventListener("scroll", showFollowing, { passive: true }); +// `clear`: the console emptied; it fills again with what comes from now on. +document.getElementById("console-clear").addEventListener("click", () => { + consoleMessages.length = 0; + pointedMessage = null; + if (shownMessage !== null) showMessage(null); + markRelated(null); + document.getElementById("console").replaceChildren(); + filterConsole(); + showFollowing(); +}); function showConsole() { document.getElementById("console").replaceChildren(...consoleMessages.map(consoleLine)); filterConsole(); -- cgit v1.3.1