+
{!isCollapsed && (
- Project {project?.name ?? 'Loading...'}
+ Project {project?.name ?? 'Loading...'}
)}
-
{!isCollapsed && (
diff --git a/components/sidebars/project-sidebar.tsx b/components/sidebars/project-sidebar.tsx
deleted file mode 100644
index 8796246..0000000
--- a/components/sidebars/project-sidebar.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-'use client';
-
-import { useState } from 'react';
-import { Environment, Project, Sandbox } from '@prisma/client';
-import {
- ChevronDown,
- ChevronLeft,
- ChevronRight,
- CreditCard,
- Database,
- Key,
- Package,
- Settings,
- Shield,
- Terminal,
-} from 'lucide-react';
-import { usePathname } from 'next/navigation';
-
-import { cn } from '@/lib/utils';
-
-interface ProjectSidebarProps {
- project: Project;
- sandboxes: Sandbox[];
- envVars: Environment[];
-}
-
-export default function ProjectSidebar({ project }: ProjectSidebarProps) {
- const [isCollapsed, setIsCollapsed] = useState(false);
- const [isConfigExpanded, setIsConfigExpanded] = useState(true);
- const pathname = usePathname();
-
- const topSections = [
- {
- id: 'terminal',
- label: 'Web Terminal',
- icon: Terminal,
- href: `/projects/${project.id}/terminal`,
- },
- { id: 'database', label: 'Database', icon: Database, href: `/projects/${project.id}/database` },
- ];
-
- const configSections = [
- {
- id: 'environment',
- label: 'Environment Variables',
- icon: Package,
- href: `/projects/${project.id}/environment`,
- },
- {
- id: 'secrets',
- label: 'Secret Configuration',
- icon: Key,
- href: `/projects/${project.id}/secrets`,
- },
- { id: 'auth', label: 'Auth Configuration', icon: Shield, href: `/projects/${project.id}/auth` },
- {
- id: 'payment',
- label: 'Payment Configuration',
- icon: CreditCard,
- href: `/projects/${project.id}/payment`,
- },
- ];
-
- // Check if any config section is active
- const isConfigActive = configSections.some((section) => pathname === section.href);
-
- return (
-
- {/* Header */}
-
- {!isCollapsed && (
- Project {project.name}
- )}
-
-
-
- {!isCollapsed && (
-
- {/* Top sections */}
- {topSections.map((section) => {
- const Icon = section.icon;
- const isActive = pathname === section.href;
-
- return (
-
-
- {section.label}
-
- );
- })}
-
- {/* Configuration Group */}
-
-
-
- {isConfigExpanded && (
-
- {configSections.map((section) => {
- const Icon = section.icon;
- const isActive = pathname === section.href;
-
- return (
-
-
- {section.label}
-
- );
- })}
-
- )}
-
-
- )}
-
- );
-}
diff --git a/components/terminal/terminal-toolbar.tsx b/components/terminal/terminal-toolbar.tsx
index 1967441..2f532a6 100644
--- a/components/terminal/terminal-toolbar.tsx
+++ b/components/terminal/terminal-toolbar.tsx
@@ -101,41 +101,49 @@ export function TerminalToolbar({
return (
<>
-
+
{/* Terminal Tabs */}
-
+
{tabs.map((tab) => (
onTabSelect(tab.id)}
>
-
-
{tab.name}
+ {/* Top Accent Line for Active Tab */}
+ {activeTabId === tab.id && (
+
+ )}
+
+
+
{tab.name}
{tabs.length > 1 && (
)}
))}