Extend NDS patterns and migrate shared UI surfaces
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s

This commit is contained in:
Shinuwa 2026-09-02 15:50:04 +02:00
parent fef7735a1d
commit 9aa98c892d
41 changed files with 1035 additions and 405 deletions

View file

@ -2,7 +2,7 @@
import { Icon } from "./Icon.jsx";
import { ImportButton } from "./ImportButton.jsx";
export function Shell({ route, content, games, toolboxes, links, actions, children }) {
export function Shell({ route, content, games, toolboxes, links, drawerGameId = "", actions, children }) {
const gameId = route.split("/")[1] === "games" ? route.split("/")[2] || "" : "";
const game = games.find((item) => item.id === gameId);
const linkedToolbox = game ? toolboxes.find((item) => item.id === links[game.id]) : null;
@ -45,7 +45,15 @@ export function Shell({ route, content, games, toolboxes, links, actions, childr
<div><strong>{topbarLabel}</strong></div>
{game && (
<div className="topbar-actions">
<button className="drawer-button toolbox-icon-button nds-icon-button" data-size="sm" data-variant="primary" onClick={() => actions.setDrawerGameId(game.id)} aria-label={toolboxLabel} title={toolboxLabel}>
<button
className={`drawer-button toolbox-icon-button nds-icon-button ${drawerGameId === game.id ? "active" : ""}`}
data-size="sm"
data-variant="primary"
onClick={() => actions.setDrawerGameId(drawerGameId === game.id ? "" : game.id)}
aria-label={toolboxLabel}
aria-pressed={drawerGameId === game.id}
title={toolboxLabel}
>
<img src="/static/icons/toolbox.svg" alt="" aria-hidden="true" />
</button>
</div>