Put BranchFilesHeader into BranchFilesList

- removed it when refactoring file selection
- realized it is necessary even without tree view
This commit is contained in:
Mattias Granlund 2024-04-03 13:51:16 +02:00
parent 55ed8dc45a
commit 1cf360c1ff

View File

@ -1,4 +1,5 @@
<script lang="ts">
import BranchFilesHeader from './BranchFilesHeader.svelte';
import FileListItem from './FileListItem.svelte';
import { maybeMoveSelection } from '$lib/utils/selection';
import { getCommitStore, getSelectedFileIds } from '$lib/vbranches/contexts';
@ -18,6 +19,9 @@
$: sortedFiles = sortLikeFileTree(files);
</script>
<div class="branch-files__header">
<BranchFilesHeader {files} {showCheckboxes} />
</div>
{#each sortedFiles as file (file.id)}
<FileListItem
{file}
@ -44,3 +48,12 @@
}}
/>
{/each}
<style lang="postcss">
.branch-files__header {
padding-top: var(--size-14);
padding-bottom: var(--size-12);
padding-left: var(--size-14);
padding-right: var(--size-14);
}
</style>