Skip to content

Commit ed3a7c8

Browse files
committed
Enhance Git status display in project session detail page by separating added and removed file indicators into distinct badges. Update UI for clearer visual feedback on changes, improving user experience during directory browsing.
1 parent 83b14c6 commit ed3a7c8

File tree

1 file changed

+12
-3
lines changed
  • components/frontend/src/app/projects/[name]/sessions/[sessionName]

1 file changed

+12
-3
lines changed

components/frontend/src/app/projects/[name]/sessions/[sessionName]/page.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,9 +1401,18 @@ export default function ProjectSessionDetailPage({
14011401
<Folder className="h-4 w-4" />
14021402
<span>Directory Browser</span>
14031403
{gitStatus?.hasChanges && (
1404-
<Badge variant="outline" className="bg-yellow-50 text-yellow-700 border-yellow-200 ml-auto mr-2">
1405-
+{gitStatus.totalAdded} -{gitStatus.totalRemoved}
1406-
</Badge>
1404+
<div className="flex gap-1 ml-auto mr-2">
1405+
{gitStatus.totalAdded > 0 && (
1406+
<Badge variant="outline" className="bg-green-50 text-green-700 border-green-200">
1407+
+{gitStatus.totalAdded}
1408+
</Badge>
1409+
)}
1410+
{gitStatus.totalRemoved > 0 && (
1411+
<Badge variant="outline" className="bg-red-50 text-red-700 border-red-200">
1412+
-{gitStatus.totalRemoved}
1413+
</Badge>
1414+
)}
1415+
</div>
14071416
)}
14081417
</div>
14091418
</AccordionTrigger>

0 commit comments

Comments
 (0)