mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 14:31:30 +03:00
show extra snapshot details in ui
This commit is contained in:
parent
b1bb9bf51c
commit
42d8e6fd5d
@ -27,6 +27,9 @@
|
||||
};
|
||||
type Snapshot = {
|
||||
id: string;
|
||||
linesAdded: number;
|
||||
linesRemoved: number;
|
||||
filesChanged: string[];
|
||||
details: SnapshotDetails | undefined;
|
||||
createdAt: number;
|
||||
};
|
||||
@ -79,17 +82,23 @@
|
||||
</div>
|
||||
<div style="padding-left: 16px; hidden;">
|
||||
{#if entry.details?.operation === 'RestoreFromSnapshot'}
|
||||
from: {entry.details?.trailers
|
||||
restored_from: {entry.details?.trailers
|
||||
.find((t) => t.key === 'restored_from')
|
||||
?.value?.slice(0, 7)}
|
||||
{:else if entry.details?.operation === 'FileChanges'}
|
||||
{#each entry.details?.trailers
|
||||
.find((t) => t.key === 'files')
|
||||
?.value?.split(',') || [] as file}
|
||||
<div>{file}</div>
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
<div>
|
||||
lines added: {entry.linesAdded}
|
||||
</div>
|
||||
<div>
|
||||
lines removed: {entry.linesRemoved}
|
||||
</div>
|
||||
<div>
|
||||
<div>files changed:</div>
|
||||
{#each entry.filesChanged as filePath}
|
||||
<div style="padding-left: 16px;">{filePath}</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
|
Loading…
Reference in New Issue
Block a user