Skip to content

Commit 38b2c73

Browse files
committed
chore(style): tree view
1 parent 94af17f commit 38b2c73

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release on Tag Push
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- 'v*'
77

88
permissions:
99
contents: write

packages/ui/src/components/file-tree.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,10 @@ function TreeNodeView({
355355
<TooltipContent side="top">Clone to other repos</TooltipContent>
356356
</Tooltip>
357357
)}
358-
{dirSize > 0 && (
359-
<SizeLabel
360-
bytes={dirSize}
361-
className={`shrink-0 ${onClone ? '' : !dirStatus ? 'ml-auto' : ''}`}
362-
/>
363-
)}
364-
{dirStatus && (
365-
<span className={`shrink-0 ${onClone || dirSize > 0 ? '' : 'ml-auto'}`}>
366-
{folderSuffix?.(dirStatus)}
358+
{(dirSize > 0 || dirStatus) && (
359+
<span className={`shrink-0 flex items-center gap-1.5 ${onClone ? '' : 'ml-auto'}`}>
360+
{dirSize > 0 && <SizeLabel bytes={dirSize} className="shrink-0" />}
361+
{dirStatus && <span className="shrink-0">{folderSuffix?.(dirStatus)}</span>}
367362
</span>
368363
)}
369364
</button>

packages/ui/src/components/size-label.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface SizeLabelProps {
66
}
77

88
export function SizeLabel({ bytes, className }: SizeLabelProps) {
9-
if (bytes <= 0) return null;
9+
if (bytes < 0) return null;
1010

1111
return (
1212
<span

packages/ui/src/pages/repo-detail.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,7 @@ function DetailPage({ type }: { type: 'repo' | 'service' }) {
300300
storeSize: f.storeSize,
301301
suffix: (
302302
<>
303-
{f.storeSize != null && f.storeSize > 0 && (
304-
<SizeLabel bytes={f.storeSize} className="mr-1" />
305-
)}
303+
{f.storeSize != null && <SizeLabel bytes={f.storeSize} className="mr-1" />}
306304
<SyncStatusBadge status={f.syncStatus} size="sm" />
307305
</>
308306
),

0 commit comments

Comments
 (0)