Components: Enhanced Commit List Display

Updated the Remote Branch Preview component to display commits with proper styling and highlighting of first and last commit in a list.
This commit is contained in:
Caleb Owens 2024-05-30 18:43:54 +02:00
parent 0f93cf6772
commit 8c887c73cc

View File

@ -63,9 +63,15 @@
{/if}
{#await getRemoteBranchData(project.id, branch.name) then branchData}
{#if branchData.commits && branchData.commits.length > 0}
<div class="branch-preview__commits-list">
{#each branchData.commits as commit (commit.id)}
<CommitCard {commit} commitUrl={$baseBranch?.commitUrl(commit.id)} type="remote" />
<div>
{#each branchData.commits as commit, index (commit.id)}
<CommitCard
first={index == 0}
last={index == branchData.commits.length - 1}
{commit}
commitUrl={$baseBranch?.commitUrl(commit.id)}
type="remote"
/>
{/each}
</div>
{/if}