adding bloat + use the copilot page this time

This commit is contained in:
lda
2025-08-24 20:50:47 +07:00 Unverified
parent 93bb04bbab
commit 811116715c
5 changed files with 42 additions and 19 deletions
+3 -3
View File
@@ -30,7 +30,7 @@ function saveName(name) {
function loadName() {
return qs.get("name") || localStorage.getItem("wakey:name") || "";
}
/** @param {String} s NUD state */
function rankState(s) {
return (
{
@@ -43,12 +43,12 @@ function rankState(s) {
Noarp: 2,
None: 1,
Failed: 0,
}[s] ?? 0
}[s.toUpperCase()] ?? 0
);
}
/** @param {{ name: String, table: Array<{ ip, dev, mac, state }>} | { name: String, error }} data from /api/status */
function renderStatus(data) {
// data: { name: string, table: Array<{ ip, dev, mac, state }>} | { name, error }
const tbl = document.createElement("table");
tbl.innerHTML = `<tr><th>IP</th><th>MAC</th><th>State</th><th>IF</th></tr>`;
for (const row of data.table || []) {