From ecd51a3987bcf2a2fa48f3972387dd686390a0ad Mon Sep 17 00:00:00 2001 From: mawkone Date: Sun, 14 Jun 2026 13:50:07 -0700 Subject: [PATCH] fix(codebase): add top bar header frame to file viewer loading states --- .../components/project/gitea-file-viewer.tsx | 60 +++++++++++++++---- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/vibn-frontend/components/project/gitea-file-viewer.tsx b/vibn-frontend/components/project/gitea-file-viewer.tsx index 941cc720..7f659055 100644 --- a/vibn-frontend/components/project/gitea-file-viewer.tsx +++ b/vibn-frontend/components/project/gitea-file-viewer.tsx @@ -80,7 +80,7 @@ export function GiteaFileViewer({ projectId, path }: GiteaFileViewerProps) { if (!path) { return ( - + Pick a file from the codebase to preview it here. @@ -89,7 +89,7 @@ export function GiteaFileViewer({ projectId, path }: GiteaFileViewerProps) { if (loading) { return ( - + + {error} @@ -245,22 +245,58 @@ function basename(p: string) { return p.split("/").pop() || p; } -function Centered({ children }: { children: React.ReactNode }) { +function Centered({ + children, + path, +}: { + children: React.ReactNode; + path: string | null; +}) { return (
- {children} +
+
+ {path || "Select a file"} +
+
+
+ {children} +
); }