File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 interface Props {
66 days: DayStats []
77 detectedLanguages: string []
8+ repoSizeBytes? : number | null
89 onHighlightDate? : (date : string | null ) => void
910 }
1011
11- let { days, onHighlightDate }: Props = $props ()
12+ let { days, repoSizeBytes, onHighlightDate }: Props = $props ()
13+
14+ const formattedRepoSize = $derived .by (() => {
15+ if (repoSizeBytes == null || repoSizeBytes <= 0 ) return null
16+ return ` ${(repoSizeBytes / (1024 * 1024 )).toFixed (1 )} MB `
17+ })
1218
1319 // --- Total size ---
1420 const totalLines = $derived (days .length > 0 ? days [days .length - 1 ].total : 0 )
278284 class =" mt-2 text-foreground"
279285 style =" font-family: var(--font-mono); font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em;"
280286 >
281- LoC: {formattedTotal }
282- </p >
283- <p class =" mt-1 text-foreground-secondary" style =" font-family: var(--font-mono); font-size: 0.75rem;" >
284- {totalCommits === 1 ? ' commit' : ' commits' }: {formattedCommits }
287+ LoC: {formattedTotal }, {totalCommits === 1 ? ' commit' : ' commits' }: {formattedCommits }
285288 </p >
289+ {#if formattedRepoSize }
290+ <p
291+ class =" mt-1 text-foreground-secondary"
292+ style =" font-family: var(--font-mono); font-size: 0.75rem;"
293+ title =" It includes history"
294+ >
295+ Repo size: {formattedRepoSize }
296+ </p >
297+ {/if }
286298 </div >
287299
288300 <!-- Prod / test split -->
Original file line number Diff line number Diff line change 759759 <ResultsSummary
760760 days ={displayDays }
761761 detectedLanguages ={displayLanguages }
762+ {repoSizeBytes }
762763 onHighlightDate ={(d ) => (chartHighlightDate = d )}
763764 />
764765
You can’t perform that action at this time.
0 commit comments