File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
routes/[pid=pid]/[org]/[repo]/[id=number] Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import type { Snippet } from " svelte" ;
3+ import type { ClassValue } from " svelte/elements" ;
34 import type { Icon } from " @lucide/svelte" ;
45 import { cn } from " $lib/utils" ;
56
67 type Props = {
7- class? : string | undefined | null ;
8+ class? : ClassValue ;
89 icon? : typeof Icon ;
910 children? : Snippet ;
1011 };
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 import type { Snippet } from " svelte" ;
3+ import type { ClassValue } from " svelte/elements" ;
34 import { cn } from " $lib/utils" ;
45
56 type Props = {
6- class? : string | undefined | null ;
7+ class? : ClassValue ;
78 children? : Snippet ;
89 [key : string ]: unknown ;
910 };
Original file line number Diff line number Diff line change 4444 ChevronLeft ,
4545 FileDiff ,
4646 GitCommitVertical ,
47+ GitMerge ,
48+ GitPullRequestClosed ,
49+ GitPullRequestCreateArrow ,
4750 Lock ,
4851 MessagesSquare ,
4952 Tag
609612 secondaryLabel =" {commits .length } commit {commits .length > 1 ? ' s' : ' ' }"
610613 >
611614 <Steps class =" my-4" >
615+ <Step icon ={GitPullRequestCreateArrow } class =" text-base [& >span>svg]:text-green-500" >
616+ <div class =" flex flex-col" >
617+ <span >Pull request open</span >
618+ <span class ="text-muted-foreground" >{formatToDateTime (info .created_at )}</span >
619+ </div >
620+ </Step >
612621 {#each commits as commit (commit .sha )}
613622 {@const [commitMessage , ... commitDescriptions ] = commit .commit .message .split (" \n " )}
614623 {@const commitDescription = commitDescriptions .join (" \n " ).trim ()}
682691 </div >
683692 </Step >
684693 {/each }
694+ {#if " merged" in info && info .closed_at }
695+ <Step
696+ icon ={info .merged ? GitMerge : GitPullRequestClosed }
697+ class ={[
698+ " text-base" ,
699+ info .merged ? " [&>span>svg]:text-purple-400" : " [&>span>svg]:text-red-400"
700+ ]}
701+ >
702+ <!-- hide the bottom tip of the steps line -->
703+ <div class =" absolute bottom-0 -left-8 h-4 outline outline-background" ></div >
704+ <div class =" flex flex-col" >
705+ <span >Pull request {info .merged ? " merged" : " closed" }</span >
706+ <span class ="text-muted-foreground" >{formatToDateTime (info .closed_at )}</span >
707+ </div >
708+ </Step >
709+ {/if }
685710 </Steps >
686711 </BottomCollapsible >
687712 {/if }
You can’t perform that action at this time.
0 commit comments