Revert "flatten this shit"

This reverts commit 62543e7688.
This commit is contained in:
Kiril Videlov 2023-06-06 14:45:10 +02:00 committed by Kiril Videlov
parent c720c4f85c
commit eb12543e49
2 changed files with 7 additions and 16 deletions

View File

@ -27,7 +27,7 @@
on:consider={handleDndConsiderColumns}
on:finalize={handleDndFinalizeColumns}
>
{#each columns as { id, name, hunks }, idx (id)}
{#each columns as { id, name, items, hunks }, idx (id)}
<div
class="float-left m-2 flex h-full w-64 border border-zinc-700 bg-zinc-900/50 p-2"
animate:flip={{ duration: flipDurationMs }}

View File

@ -14,7 +14,6 @@
function handleDndFinalizeCards(e: { detail: { items: Hunk[] } }) {
onDrop(e.detail.items);
}
$: filePaths = [...new Set(hunks.map((hunk) => hunk.filePath))];
</script>
<div class="h-full w-full overflow-y-hidden">
@ -28,13 +27,7 @@
on:consider={handleDndConsiderCards}
on:finalize={handleDndFinalizeCards}
>
{#each filePaths as filePath}
<div class="font-bold">
{filePath}
</div>
<div>
{#each hunks.filter((hunk) => hunk.filePath === filePath) as hunk (hunk.id)}
{#each hunks as hunk (hunk.id)}
<div
animate:flip={{ duration: flipDurationMs }}
class="my-2 flex h-14 w-full items-center justify-center rounded border border-zinc-600 bg-zinc-700"
@ -43,6 +36,4 @@
</div>
{/each}
</div>
{/each}
</div>
</div>