feat: Collapse all button + home button in header

This commit is contained in:
root
2026-02-16 12:59:56 +00:00
parent 582a4c619b
commit 2ae7c232f3
2 changed files with 23 additions and 9 deletions
@@ -102,6 +102,9 @@ export default function MissionControlDashboard() {
); );
}; };
const collapseAll = () => setExpandedCategories([]);
const expandAll = () => setExpandedCategories(sidebarCategories.map(c => c.id));
// Render content based on selection // Render content based on selection
const renderContent = () => { const renderContent = () => {
const category = currentItem?.category; const category = currentItem?.category;
@@ -302,6 +305,9 @@ export default function MissionControlDashboard() {
<a href="/" className="flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-white/60 hover:bg-white/5 hover:text-white transition"> <a href="/" className="flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-white/60 hover:bg-white/5 hover:text-white transition">
🏠 SiteMente Site 🏠 SiteMente Site
</a> </a>
<button onClick={collapseAll} className="w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-white/60 hover:bg-white/5 hover:text-white transition">
Collapse All
</button>
</div> </div>
</aside> </aside>
@@ -309,14 +315,22 @@ export default function MissionControlDashboard() {
<main className="flex-1 p-6 overflow-y-auto"> <main className="flex-1 p-6 overflow-y-auto">
{/* Header */} {/* Header */}
<header className="flex items-center justify-between mb-6 pb-4 border-b border-white/10"> <header className="flex items-center justify-between mb-6 pb-4 border-b border-white/10">
<div> <div className="flex items-center gap-4">
<h2 className="text-xl font-bold flex items-center gap-2"> <button
<span>{currentItem?.icon}</span> onClick={() => { setSelectedItem("sitemente"); setExpandedCategories(["projects"]); }}
<span>{currentItem?.name}</span> className="w-10 h-10 rounded-xl bg-brand-pink flex items-center justify-center text-xl hover:bg-[#ff7bc0] transition"
</h2> >
<p className="text-sm text-white/50"> 👁
{currentItem?.category === "projects" ? `${progress}% complete` : `${tasks.length} total tasks`} </button>
</p> <div>
<h2 className="text-xl font-bold flex items-center gap-2">
<span>{currentItem?.icon}</span>
<span>{currentItem?.name}</span>
</h2>
<p className="text-sm text-white/50">
{currentItem?.category === "projects" ? `${progress}% complete` : `${tasks.length} total tasks`}
</p>
</div>
</div> </div>
{currentItem?.category === "projects" && ( {currentItem?.category === "projects" && (
<div className="h-12 w-12 rounded-full border-4 border-brand-pink bg-white/10"> <div className="h-12 w-12 rounded-full border-4 border-brand-pink bg-white/10">
+1 -1
View File
@@ -4,7 +4,7 @@
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev -p 1284",
"build": "next build", "build": "next build",
"start": "next start" "start": "next start"
}, },