Construction: keep the building site card above the tabs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
400d8a2657
commit
f2e4ea39de
1 changed files with 3 additions and 0 deletions
|
|
@ -355,6 +355,9 @@ function skillPage(id) {
|
||||||
let current = tabs[id] || remember(`tab.${id}`);
|
let current = tabs[id] || remember(`tab.${id}`);
|
||||||
if (!groups.includes(current)) current = [...groups].reverse().find(open) || groups[0];
|
if (!groups.includes(current)) current = [...groups].reverse().find(open) || groups[0];
|
||||||
const bar = groups.map((g) => `<button class="tab ${g === current ? "on" : ""} ${open(g) ? "" : "dim"}" data-tab="${id}" data-group="${esc(g)}">${esc(g)}</button>`).join("");
|
const bar = groups.map((g) => `<button class="tab ${g === current ? "on" : ""} ${open(g) ? "" : "dim"}" data-tab="${id}" data-group="${esc(g)}">${esc(g)}</button>`).join("");
|
||||||
|
// Ungrouped actions (the building site) stay above the tabs.
|
||||||
|
const loose = actions.filter((a) => !a.group);
|
||||||
|
if (loose.length) html += `<div class="grid" style="margin-bottom:14px">${loose.map(actionCard).join("")}</div>`;
|
||||||
return html + `<div class="tabs">${bar}</div><div class="grid">${actions.filter((a) => a.group === current).map(actionCard).join("")}</div>`;
|
return html + `<div class="tabs">${bar}</div><div class="grid">${actions.filter((a) => a.group === current).map(actionCard).join("")}</div>`;
|
||||||
}
|
}
|
||||||
// A few groups: each under its own heading, in the order they first appear.
|
// A few groups: each under its own heading, in the order they first appear.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue