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
const renderContent = () => {
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">
🏠 SiteMente Site
</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>
</aside>
@@ -309,6 +315,13 @@ export default function MissionControlDashboard() {
<main className="flex-1 p-6 overflow-y-auto">
{/* Header */}
<header className="flex items-center justify-between mb-6 pb-4 border-b border-white/10">
<div className="flex items-center gap-4">
<button
onClick={() => { setSelectedItem("sitemente"); setExpandedCategories(["projects"]); }}
className="w-10 h-10 rounded-xl bg-brand-pink flex items-center justify-center text-xl hover:bg-[#ff7bc0] transition"
>
👁
</button>
<div>
<h2 className="text-xl font-bold flex items-center gap-2">
<span>{currentItem?.icon}</span>
@@ -318,6 +331,7 @@ export default function MissionControlDashboard() {
{currentItem?.category === "projects" ? `${progress}% complete` : `${tasks.length} total tasks`}
</p>
</div>
</div>
{currentItem?.category === "projects" && (
<div className="h-12 w-12 rounded-full border-4 border-brand-pink bg-white/10">
<svg className="h-full w-full -rotate-90" viewBox="0 0 36 36">
+1 -1
View File
@@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "next dev",
"dev": "next dev -p 1284",
"build": "next build",
"start": "next start"
},