Implement dashboard UI improvements

This commit is contained in:
2026-05-19 02:16:24 +02:00
parent bf09782f68
commit cc21c5869e
9 changed files with 342 additions and 25 deletions

View File

@@ -401,12 +401,18 @@ export function buildEntityTable(rows, columns, onRowClick) {
for (const col of columns) {
const td = document.createElement("td");
const raw = col.key ? row[col.key] : null;
const text = col.render ? col.render(row) : (raw ?? "—");
const textStr = String(text ?? "—");
td.textContent = textStr;
const rendered = col.render ? col.render(row) : (raw ?? "—");
let textStr = "";
if (rendered instanceof Node) {
td.append(rendered);
textStr = td.textContent ?? "";
} else {
textStr = String(rendered ?? "—");
td.textContent = textStr;
}
if (col.cls) td.className = col.cls;
// Native tooltip so full value shows on hover (skip placeholder "—")
if (textStr && textStr !== "—") td.title = textStr;
if (!(rendered instanceof Node) && textStr && textStr !== "—") td.title = textStr;
tr.append(td);
}
tbody.append(tr);