Skip to content

Commit 99ee730

Browse files
Merge branch 'make-tab-selection-consistent-gpvf'
2 parents b0dcf06 + 0fa8fbd commit 99ee730

3 files changed

Lines changed: 42 additions & 28 deletions

File tree

src/components/layout/header.tsx

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
More03Icon,
2424
} from '@hugeicons/core-free-icons'
2525
import { CreateTaskModal } from '@/components/kanban/create-task-modal'
26+
import { cn } from '@/lib/utils'
2627

2728
interface HeaderProps {
2829
onNewTaskRef?: (openModal: () => void) => void
@@ -86,20 +87,25 @@ export function Header({ onNewTaskRef, onOpenCommandPalette }: HeaderProps) {
8687
{NAV_ITEMS.map((item) => {
8788
const active = isActive(item.to, item.matchPrefix)
8889
return (
89-
<Link key={item.to} to={item.to}>
90-
<Button
91-
variant={active ? 'secondary' : 'ghost'}
92-
size="sm"
93-
className={active ? 'dark:bg-transparent text-destructive' : undefined}
94-
>
95-
<HugeiconsIcon
96-
icon={item.icon}
97-
size={16}
98-
strokeWidth={2}
99-
data-slot="icon"
100-
/>
101-
{t(item.labelKey)}
102-
</Button>
90+
<Link
91+
key={item.to}
92+
to={item.to}
93+
className={cn(
94+
'relative flex items-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium transition-colors',
95+
active
96+
? 'bg-background text-foreground'
97+
: 'text-foreground/60 hover:text-foreground',
98+
'after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-foreground after:transition-opacity',
99+
active ? 'after:opacity-100' : 'after:opacity-0'
100+
)}
101+
>
102+
<HugeiconsIcon
103+
icon={item.icon}
104+
size={16}
105+
strokeWidth={2}
106+
data-slot="icon"
107+
/>
108+
{t(item.labelKey)}
103109
</Link>
104110
)
105111
})}
@@ -116,14 +122,18 @@ export function Header({ onNewTaskRef, onOpenCommandPalette }: HeaderProps) {
116122
>
117123
<HugeiconsIcon icon={BrowserIcon} size={16} strokeWidth={2} />
118124
</Button>
119-
<Link to="/settings">
120-
<Button
121-
variant={pathname === '/settings' ? 'secondary' : 'ghost'}
122-
size="icon-sm"
123-
className={pathname === '/settings' ? 'dark:bg-transparent text-destructive' : undefined}
124-
>
125-
<HugeiconsIcon icon={Settings01Icon} size={16} strokeWidth={2} />
126-
</Button>
125+
<Link
126+
to="/settings"
127+
className={cn(
128+
'relative flex items-center justify-center rounded-md p-1.5 transition-colors',
129+
pathname === '/settings'
130+
? 'bg-background text-foreground'
131+
: 'text-foreground/60 hover:text-foreground',
132+
'after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-foreground after:transition-opacity',
133+
pathname === '/settings' ? 'after:opacity-100' : 'after:opacity-0'
134+
)}
135+
>
136+
<HugeiconsIcon icon={Settings01Icon} size={16} strokeWidth={2} />
127137
</Link>
128138
</div>
129139
</header>

src/components/terminal/terminal-tab-bar.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ export function TerminalTabBar({
6262
onClick={() => onTabSelect(tab.id)}
6363
onDoubleClick={() => handleDoubleClick(tab)}
6464
className={cn(
65-
'group relative flex items-center gap-1.5 rounded-t-md border-x border-t px-3 py-1.5 text-xs transition-colors max-sm:px-2 max-sm:py-1',
65+
'group relative flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs transition-colors max-sm:px-2 max-sm:py-1',
6666
tab.id === activeTabId
67-
? 'border-accent bg-background text-foreground'
68-
: 'border-transparent text-muted-foreground hover:text-foreground'
67+
? 'bg-background text-foreground'
68+
: 'text-muted-foreground hover:text-foreground',
69+
'after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-foreground after:transition-opacity',
70+
tab.id === activeTabId ? 'after:opacity-100' : 'after:opacity-0'
6971
)}
7072
>
7173
{editingTabId === tab.id ? (

src/routes/terminals/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,12 @@ function TerminalsView() {
458458
<button
459459
onClick={() => setActiveTab(ALL_TASKS_TAB_ID)}
460460
className={cn(
461-
'flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs transition-colors max-sm:px-2',
461+
'relative flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs transition-colors max-sm:px-2',
462462
activeTabId === ALL_TASKS_TAB_ID
463-
? 'bg-destructive text-white'
464-
: 'text-destructive hover:bg-destructive/10'
463+
? 'bg-background text-foreground'
464+
: 'text-muted-foreground hover:text-foreground',
465+
'after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-foreground after:transition-opacity',
466+
activeTabId === ALL_TASKS_TAB_ID ? 'after:opacity-100' : 'after:opacity-0'
465467
)}
466468
>
467469
<HugeiconsIcon icon={GridViewIcon} size={12} strokeWidth={2} />

0 commit comments

Comments
 (0)