feat: tool icons drive left nav section, remove inner pills
Made-with: Cursor
This commit is contained in:
@@ -978,39 +978,15 @@ function BuildHubInner() {
|
||||
router.push(`/${workspace}/project/${projectId}/build?${sp.toString()}`, { scroll: false });
|
||||
};
|
||||
|
||||
const setSection = (s: string) => router.push(`/${workspace}/project/${projectId}/build?section=${s}`, { scroll: false });
|
||||
|
||||
return (
|
||||
<div style={{ display: "flex", height: "100%", fontFamily: "Outfit, sans-serif", overflow: "hidden" }}>
|
||||
|
||||
{/* ── Build content ── */}
|
||||
<div style={{ flex: 1, display: "flex", overflow: "hidden", minWidth: 0 }}>
|
||||
|
||||
{/* Inner nav — Build section switcher + contextual items */}
|
||||
{/* Inner nav — contextual items driven by top-bar tool icon */}
|
||||
<div style={{ width: 200, flexShrink: 0, borderRight: "1px solid #e8e4dc", background: "#faf8f5", display: "flex", flexDirection: "column", overflow: "hidden" }}>
|
||||
|
||||
{/* Build pills */}
|
||||
<div style={{ padding: "10px 12px 9px", flexShrink: 0, borderBottom: "1px solid #f0ece4" }}>
|
||||
<div style={{ fontSize: "0.57rem", fontWeight: 700, color: "#b5b0a6", letterSpacing: "0.1em", textTransform: "uppercase", marginBottom: 7, fontFamily: "Outfit, sans-serif" }}>Build</div>
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: 3 }}>
|
||||
{(["code", "layouts", "infrastructure"] as const).map(s => (
|
||||
<button key={s} onClick={() => setSection(s)} style={{
|
||||
display: "flex", alignItems: "center", gap: 8,
|
||||
padding: "6px 10px", border: "none", borderRadius: 7,
|
||||
fontSize: "0.76rem", fontWeight: section === s ? 600 : 440,
|
||||
cursor: "pointer", fontFamily: "Outfit, sans-serif", textAlign: "left",
|
||||
background: section === s ? "#f0ece4" : "transparent",
|
||||
color: section === s ? "#1a1a1a" : "#5a5550",
|
||||
}}>
|
||||
<span style={{ fontSize: "0.65rem", opacity: 0.6 }}>
|
||||
{s === "code" ? "<>" : s === "layouts" ? "▢" : "⬡"}
|
||||
</span>
|
||||
{s === "code" ? "Code" : s === "layouts" ? "Layouts" : "Infrastructure"}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Code: app list + file tree */}
|
||||
{section === "code" && (
|
||||
<div style={{ flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }}>
|
||||
|
||||
Reference in New Issue
Block a user