mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-04-24 13:54:59 +00:00
- Implement core components: CLI argument parsing, environment loading, GitHub service creation, and logging configuration. - Add support for OpenAI client setup and model resolution. - Develop SDLC context loader from GitHub and repository files. - Implement workflow context and engine builders. - Introduce major workflow packages: `game_tick_loop` and `contextual_iterative_loop`. - Update localization files with new package descriptions and labels. - Streamline web navigation by loading items from a dedicated JSON file.
32 lines
884 B
TypeScript
32 lines
884 B
TypeScript
import { NavigationItem } from "../../lib/types";
|
|
|
|
type SidebarProps = {
|
|
items: NavigationItem[];
|
|
selected: string;
|
|
onSelect: (section: string) => void;
|
|
t: (key: string, fallback?: string) => string;
|
|
};
|
|
|
|
export default function Sidebar({ items, selected, onSelect, t }: SidebarProps) {
|
|
return (
|
|
<aside className="sidebar">
|
|
<div className="sidebar__brand">
|
|
<span>{t("ui.app.name", "AutoMetabuilder")}</span>
|
|
</div>
|
|
<nav>
|
|
{items.map((item) => (
|
|
<button
|
|
key={item.section}
|
|
type="button"
|
|
className={`sidebar__item ${selected === item.section ? "active" : ""}`}
|
|
onClick={() => onSelect(item.section)}
|
|
data-section={item.section}
|
|
>
|
|
<span>{t(item.label_key, item.default_label)}</span>
|
|
</button>
|
|
))}
|
|
</nav>
|
|
</aside>
|
|
);
|
|
}
|