diff --git a/src/page/workspace/repo/branches.tsx b/src/page/workspace/repo/branches.tsx index 872e76f..da755f5 100644 --- a/src/page/workspace/repo/branches.tsx +++ b/src/page/workspace/repo/branches.tsx @@ -94,9 +94,19 @@ export default function BranchesTab() { {otherBranches.map((b) => )} ) : ( -
- -

No branches yet

+
+
+ +
+

No branches yet

+

+ {search ? `No branches matching "${search}"` : "Create a branch to start working on your project."} +

+ {!search && ( + + )}
)}
diff --git a/src/page/workspace/repo/code.tsx b/src/page/workspace/repo/code.tsx index 1c1db72..220965b 100644 --- a/src/page/workspace/repo/code.tsx +++ b/src/page/workspace/repo/code.tsx @@ -445,7 +445,7 @@ export default function CodeTab() { {latestCommit.author?.time_secs ? formatTimeAgo(latestCommit.author.time_secs) : ""} - {latestCommit.oid.slice(0, 7)} + {latestCommit.oid.slice(0, 7)} )} @@ -571,17 +571,36 @@ export default function CodeTab() { ))} ) : currentTreeOid ? ( -
- -

Empty directory

+
+
+ +
+

Empty directory

+

This directory contains no files.

) : ( -
- -

No content

-

- Push a commit to get started +

+
+ +
+

No content yet

+

+ This repository is empty. Push your first commit to get started.

+
+ git push -u origin {selectedBranch} + +
)}
diff --git a/src/page/workspace/repo/commits.tsx b/src/page/workspace/repo/commits.tsx index 6f5006d..07bcd14 100644 --- a/src/page/workspace/repo/commits.tsx +++ b/src/page/workspace/repo/commits.tsx @@ -121,7 +121,7 @@ export default function CommitsTab() { {commit.author?.name} {commit.author?.time_secs ? formatTimeAgo(commit.author.time_secs) : ""} - {commit.oid.slice(0, 7)} + {commit.oid.slice(0, 7)}
))} @@ -129,9 +129,16 @@ export default function CommitsTab() { = LIMIT} onPrev={() => setOffset(Math.max(0, offset - LIMIT))} onNext={() => setOffset(offset + LIMIT)} /> ) : ( -
- -

No commits found

+
+
+ +
+

+ {search ? "No matching commits" : "No commits yet"} +

+

+ {search ? `No commits match "${search}"` : "Push your first commit to this branch to get started."} +

)}
diff --git a/src/page/workspace/repo/layout.tsx b/src/page/workspace/repo/layout.tsx index 828aaba..e02056d 100644 --- a/src/page/workspace/repo/layout.tsx +++ b/src/page/workspace/repo/layout.tsx @@ -6,6 +6,7 @@ import { Lock, Globe, Archive, GitFork, Star, Eye, EyeOff } from "lucide-react"; import { cn } from "@/lib/utils"; function formatSize(bytes: number) { + if (bytes === 0) return "Empty"; if (bytes < 1024) return `${bytes} B`; if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; return `${(bytes / (1024 * 1024)).toFixed(1)} MB`; @@ -112,9 +113,14 @@ export default function RepoLayout() { if (!repo) { return ( -
- -

Repository not found

+
+
+ +
+

Repository not found

+

+ This repository doesn't exist or you don't have permission to view it. +

); } @@ -155,7 +161,7 @@ export default function RepoLayout() { | {formatSize(repo.size_bytes)} | - created {formatDate(repo.created_at)} by {repo.created_by} + created {formatDate(repo.created_at)}