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

View File

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