Add explicit edit actions for existing pipeline cards
Build and Push Docker Image / build (push) Successful in 10m16s
Details
Build and Push Docker Image / build (push) Successful in 10m16s
Details
This commit is contained in:
parent
c88f540633
commit
2a374195c4
|
|
@ -18,6 +18,8 @@ import {
|
||||||
GitBranch,
|
GitBranch,
|
||||||
Calendar,
|
Calendar,
|
||||||
Workflow,
|
Workflow,
|
||||||
|
Pencil,
|
||||||
|
Settings2,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import { formatDistanceToNow } from 'date-fns'
|
import { formatDistanceToNow } from 'date-fns'
|
||||||
|
|
@ -148,17 +150,14 @@ export default function PipelineListPage() {
|
||||||
const description = (pipeline.settingsJson as Record<string, unknown> | null)?.description as string | undefined
|
const description = (pipeline.settingsJson as Record<string, unknown> | null)?.description as string | undefined
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Card key={pipeline.id} className="group hover:shadow-md transition-shadow h-full flex flex-col">
|
||||||
key={pipeline.id}
|
|
||||||
href={`/admin/rounds/pipeline/${pipeline.id}` as Route}
|
|
||||||
className="block"
|
|
||||||
>
|
|
||||||
<Card className="group hover:shadow-md transition-shadow cursor-pointer h-full flex flex-col">
|
|
||||||
<CardHeader className="pb-3">
|
<CardHeader className="pb-3">
|
||||||
<div className="flex items-start justify-between gap-3">
|
<div className="flex items-start justify-between gap-3">
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<CardTitle className="text-base leading-tight mb-1">
|
<CardTitle className="text-base leading-tight mb-1">
|
||||||
|
<Link href={`/admin/rounds/pipeline/${pipeline.id}` as Route} className="hover:underline">
|
||||||
{pipeline.name}
|
{pipeline.name}
|
||||||
|
</Link>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<p className="font-mono text-xs text-muted-foreground truncate">
|
<p className="font-mono text-xs text-muted-foreground truncate">
|
||||||
{pipeline.slug}
|
{pipeline.slug}
|
||||||
|
|
@ -232,9 +231,23 @@ export default function PipelineListPage() {
|
||||||
<span>Updated {formatDistanceToNow(new Date(pipeline.updatedAt))} ago</span>
|
<span>Updated {formatDistanceToNow(new Date(pipeline.updatedAt))} ago</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-3 flex items-center gap-2">
|
||||||
|
<Link href={`/admin/rounds/pipeline/${pipeline.id}/edit` as Route} className="flex-1">
|
||||||
|
<Button size="sm" variant="outline" className="w-full">
|
||||||
|
<Pencil className="h-3.5 w-3.5 mr-1.5" />
|
||||||
|
Edit
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
<Link href={`/admin/rounds/pipeline/${pipeline.id}/advanced` as Route} className="flex-1">
|
||||||
|
<Button size="sm" variant="outline" className="w-full">
|
||||||
|
<Settings2 className="h-3.5 w-3.5 mr-1.5" />
|
||||||
|
Advanced
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</Link>
|
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue