mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-27 09:47:34 +03:00
calculate session files based on deltas
This commit is contained in:
parent
14bcfaa94d
commit
fb41de695c
@ -286,6 +286,7 @@
|
|||||||
>
|
>
|
||||||
{#each $richSessions as session}
|
{#each $richSessions as session}
|
||||||
{@const isCurrent = session.id === $currentSessionId}
|
{@const isCurrent = session.id === $currentSessionId}
|
||||||
|
{@const filesChagned = new Set(session.deltas.map(([path]) => path)).size}
|
||||||
<li
|
<li
|
||||||
id={isCurrent ? 'current-session' : ''}
|
id={isCurrent ? 'current-session' : ''}
|
||||||
class:bg-card-active={isCurrent}
|
class:bg-card-active={isCurrent}
|
||||||
@ -305,8 +306,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="flex flex-row justify-between px-3 pb-3">
|
<span class="flex flex-row justify-between px-3 pb-3">
|
||||||
{Object.keys(session.files).length}
|
{filesChagned}
|
||||||
{Object.keys(session.files).length > 1 ? 'files' : 'file'}
|
{filesChagned !== 1 ? 'files' : 'file'}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{#if isCurrent}
|
{#if isCurrent}
|
||||||
|
Loading…
Reference in New Issue
Block a user