refactor: centreer sprint-switcher en verwijder badges uit dropdown items
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
af0ed8bf32
commit
81b3efc400
2 changed files with 6 additions and 16 deletions
|
|
@ -127,9 +127,10 @@ export default async function ProductBacklogPage({ params, searchParams }: Props
|
|||
|
||||
return (
|
||||
<div className="flex flex-col h-full">
|
||||
{/* Product header — sprint-switcher links, actions rechts */}
|
||||
<div className="px-4 py-3 border-b border-border bg-surface-container-low shrink-0 flex items-center justify-between gap-3">
|
||||
<div className="flex items-center gap-3">
|
||||
{/* Product header — sprint-switcher gecentreerd, actions rechts */}
|
||||
<div className="px-4 py-3 border-b border-border bg-surface-container-low shrink-0 flex items-center gap-3">
|
||||
<div className="flex-1" />
|
||||
<div className="flex items-center justify-center">
|
||||
{isActiveProduct && (
|
||||
<SprintSwitcher
|
||||
productId={id}
|
||||
|
|
@ -139,7 +140,7 @@ export default async function ProductBacklogPage({ params, searchParams }: Props
|
|||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex-1 flex items-center gap-3 justify-end">
|
||||
{!isActiveProduct && (
|
||||
<ActivateProductButton productId={id} isDemo={isDemo} redirectTo={`/products/${id}`} />
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -105,27 +105,16 @@ export function SprintSwitcher({
|
|||
)}
|
||||
<ChevronDown className="w-3 h-3 shrink-0 text-muted-foreground" />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start" className="w-64">
|
||||
<DropdownMenuContent align="center" className="w-64">
|
||||
{sprints.map(s => (
|
||||
<DropdownMenuItem
|
||||
key={s.id}
|
||||
onClick={() => handleSwitchSprint(s.id)}
|
||||
className={cn(
|
||||
'flex items-center justify-between gap-2',
|
||||
s.id === activeSprint?.id && 'bg-primary-container text-primary-container-foreground font-medium',
|
||||
)}
|
||||
>
|
||||
<span className="truncate">{s.code}</span>
|
||||
<Badge
|
||||
className={cn(
|
||||
'text-[10px] px-1.5 py-0 shrink-0',
|
||||
buildingSet.has(s.id)
|
||||
? 'bg-warning text-warning-foreground'
|
||||
: SPRINT_STATUS_BADGE[s.status],
|
||||
)}
|
||||
>
|
||||
{buildingSet.has(s.id) ? 'BUILDING' : SPRINT_STATUS_LABEL[s.status]}
|
||||
</Badge>
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuContent>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue