added diff info and hover for commits
This commit is contained in:
@@ -162,35 +162,53 @@
|
||||
</svg>
|
||||
|
||||
<div bind:this={listElement} class=" mr-3 grid grid-flow-row auto-rows-min">
|
||||
{#each visibleItems as item, index (item.hash)}
|
||||
{#each visibleItems as commit, index (commit.hash)}
|
||||
<div class="relative z-10 grid grid-cols-[1.25rem_minmax(0,1fr)] gap-x-3.5 gap-y-2 pb-2">
|
||||
<!-- Timeline space -->
|
||||
<div></div>
|
||||
|
||||
<div class="min-w-0">
|
||||
<a href={item.link} class="group block">
|
||||
{#if visibleItems[index - 1]?.parentRepo != item.parentRepo}
|
||||
<p class="flex flex-row pt-2">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
height="20px"
|
||||
width="20px"
|
||||
class="pt-1"
|
||||
fill="#e3e3e3"
|
||||
><path d="M16.18,13H4V11H16.18l-5.6-5.6L12,4l8,8l-8,8l-1.42-1.4l5.6-5.6Z" /></svg
|
||||
<div class="block">
|
||||
{#if visibleItems[index - 1]?.parentRepo != commit.parentRepo}
|
||||
<p>
|
||||
<span class="text-ctp-red">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
height="20px"
|
||||
width="20px"
|
||||
class="mr-1 inline-flex items-center whitespace-nowrap"
|
||||
fill="var(--ctp-peach)"
|
||||
><path
|
||||
d="M16.18,13H4V11H16.18l-5.6-5.6L12,4l8,8l-8,8l-1.42-1.4l5.6-5.6Z"
|
||||
/></svg
|
||||
><a
|
||||
class="hover:font-medium hover:underline"
|
||||
href={'https://git.voidarc.co.uk/' + commit.user}>{commit.user}</a
|
||||
></span
|
||||
>
|
||||
<span class="mx-[1ch] text-ctp-red">{item.user}</span> on
|
||||
<span class="ml-[1ch] text-ctp-mauve">{item.parentRepo}</span><span
|
||||
class="text-ctp-yellow">@</span
|
||||
><span class="text-ctp-green">{item.parentBranch}</span>
|
||||
on
|
||||
<a href={'https://git.voidarc.co.uk/' + commit.parentRepo} class="group">
|
||||
<span class="text-ctp-mauve group-hover:font-medium group-hover:underline"
|
||||
>{commit.parentRepo}</span
|
||||
><span class="text-ctp-yellow group-hover:font-medium group-hover:underline"
|
||||
>@</span
|
||||
><span class="text-ctp-green group-hover:font-medium group-hover:underline"
|
||||
>{commit.parentBranch}</span
|
||||
>
|
||||
</a>
|
||||
</p>
|
||||
{/if}
|
||||
<div class="flex">
|
||||
<p class="rounded-md bg-ctp-surface2 px-1">{item.shortHash}</p>
|
||||
<p class="ml-2 line-clamp-1">{item.message}</p>
|
||||
</div>
|
||||
</a>
|
||||
<a href={commit.url} style="cursor: pointer;" class="group flex justify-items-stretch">
|
||||
<p
|
||||
class="rounded-md bg-ctp-surface2 px-1 group-hover:font-bold group-hover:text-ctp-mauve group-hover:underline"
|
||||
>
|
||||
{commit.shortHash}
|
||||
</p>
|
||||
<p class="ml-2 line-clamp-1 group-hover:font-semibold">{commit.message}</p>
|
||||
<div class="justify-content-end flex text-align-right flex-1"><div>some</div></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user