mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
feat: implement dashboard view and enhance sidebar navigation
- Added a new DashboardView component for improved project management. - Updated sidebar navigation to redirect to the dashboard instead of the home page. - Removed ProjectActions from the sidebar for a cleaner interface. - Enhanced BoardView to conditionally render the WorktreePanel based on visibility settings. - Introduced worktree panel visibility management per project in the app store. - Updated project settings to include worktree panel visibility and favorite status. - Adjusted navigation logic to ensure users are directed to the appropriate view based on project state.
This commit is contained in:
@@ -84,6 +84,7 @@ function RootLayoutContent() {
|
||||
const isSetupRoute = location.pathname === '/setup';
|
||||
const isLoginRoute = location.pathname === '/login';
|
||||
const isLoggedOutRoute = location.pathname === '/logged-out';
|
||||
const isDashboardRoute = location.pathname === '/dashboard';
|
||||
|
||||
// Sandbox environment check state
|
||||
type SandboxStatus = 'pending' | 'containerized' | 'needs-confirmation' | 'denied' | 'confirmed';
|
||||
@@ -389,9 +390,9 @@ function RootLayoutContent() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Setup complete but user is still on /setup -> go to app
|
||||
// Setup complete but user is still on /setup -> go to dashboard
|
||||
if (setupComplete && location.pathname === '/setup') {
|
||||
navigate({ to: '/' });
|
||||
navigate({ to: '/dashboard' });
|
||||
}
|
||||
}, [authChecked, isAuthenticated, setupComplete, location.pathname, navigate]);
|
||||
|
||||
@@ -425,10 +426,16 @@ function RootLayoutContent() {
|
||||
testConnection();
|
||||
}, [setIpcConnected]);
|
||||
|
||||
// Restore to board view if a project was previously open
|
||||
// Redirect from welcome page based on project state
|
||||
useEffect(() => {
|
||||
if (isMounted && currentProject && location.pathname === '/') {
|
||||
navigate({ to: '/board' });
|
||||
if (isMounted && location.pathname === '/') {
|
||||
if (currentProject) {
|
||||
// Project is selected, go to board
|
||||
navigate({ to: '/board' });
|
||||
} else {
|
||||
// No project selected, go to dashboard
|
||||
navigate({ to: '/dashboard' });
|
||||
}
|
||||
}
|
||||
}, [isMounted, currentProject, location.pathname, navigate]);
|
||||
|
||||
@@ -514,6 +521,23 @@ function RootLayoutContent() {
|
||||
);
|
||||
}
|
||||
|
||||
// Show dashboard page (full screen, no sidebar) - authenticated only
|
||||
if (isDashboardRoute) {
|
||||
return (
|
||||
<>
|
||||
<main className="h-screen overflow-hidden" data-testid="app-container">
|
||||
<Outlet />
|
||||
<Toaster richColors position="bottom-right" />
|
||||
</main>
|
||||
<SandboxRiskDialog
|
||||
open={showSandboxDialog}
|
||||
onConfirm={handleSandboxConfirm}
|
||||
onDeny={handleSandboxDeny}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<main className="flex h-screen overflow-hidden" data-testid="app-container">
|
||||
|
||||
Reference in New Issue
Block a user