Skip to content

Commit 8c9d669

Browse files
committed
feat(api-profile-ux): implement tabbed profile editor and fix disclaimer visibility
1 parent 8357005 commit 8c9d669

File tree

5 files changed

+348
-315
lines changed

5 files changed

+348
-315
lines changed

ui/src/App.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,18 @@ function Layout() {
4343
return (
4444
<SidebarProvider>
4545
<AppSidebar />
46-
<main className="flex-1 overflow-auto">
47-
<header className="flex h-12 items-center justify-end px-4 border-b">
46+
<main className="flex-1 flex flex-col min-h-0 overflow-hidden">
47+
<header className="flex h-12 items-center justify-end px-4 border-b shrink-0">
4848
<div className="flex items-center gap-4">
4949
<ConnectionIndicator />
5050
<ThemeToggle />
5151
</div>
5252
</header>
53-
<Suspense fallback={<PageLoader />}>
54-
<Outlet />
55-
</Suspense>
53+
<div className="flex-1 overflow-auto pb-12">
54+
<Suspense fallback={<PageLoader />}>
55+
<Outlet />
56+
</Suspense>
57+
</div>
5658
<LocalhostDisclaimer />
5759
</main>
5860
</SidebarProvider>

ui/src/components/localhost-disclaimer.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
11
import { Shield, X } from 'lucide-react';
22
import { useState } from 'react';
3-
import { useSidebar } from '@/hooks/use-sidebar';
43

54
export function LocalhostDisclaimer() {
65
const [dismissed, setDismissed] = useState(false);
7-
const { state, isMobile } = useSidebar();
86

97
if (dismissed) return null;
108

11-
// Calculate the left margin based on sidebar state
12-
// When expanded: sidebar width is 16rem
13-
// When collapsed: sidebar width is 3rem
14-
// On mobile: sidebar is overlay, no margin needed
15-
const getLeftMargin = () => {
16-
if (isMobile) return '0';
17-
return state === 'expanded' ? '16rem' : '3rem';
18-
};
19-
209
return (
21-
<div
22-
className="fixed bottom-0 bg-yellow-50 dark:bg-yellow-900/20 border-t border-yellow-200 dark:border-yellow-800 px-4 py-2 transition-all duration-200 ease-linear z-50"
23-
style={{
24-
left: getLeftMargin(),
25-
right: '0',
26-
}}
27-
>
10+
<div className="fixed bottom-0 left-0 right-0 bg-yellow-50 dark:bg-yellow-900/20 border-t border-yellow-200 dark:border-yellow-800 px-4 py-2 z-50 md:pl-[var(--sidebar-width)] transition-[padding] duration-200">
2811
<div className="flex items-center justify-center gap-4">
2912
<div className="flex items-center gap-2 text-sm text-yellow-800 dark:text-yellow-200">
3013
<Shield className="w-4 h-4 flex-shrink-0" />

0 commit comments

Comments
 (0)