fix(ui-workspace): restore active folder styling

This commit is contained in:
_Kerman
2026-08-11 19:17:15 +08:00
parent 5bb70d7cf2
commit e35513e4dc
2 changed files with 8 additions and 3 deletions

View File

@@ -140,6 +140,10 @@
white-space: nowrap; white-space: nowrap;
} }
.folderActive {
color: var(--dsw-alias-state-business-primary);
}
/* Project leading slot: folder by default, expand arrow on row hover. */ /* Project leading slot: folder by default, expand arrow on row hover. */
.projectRow .chevron { display: none; } .projectRow .chevron { display: none; }

View File

@@ -9,7 +9,7 @@ import { useState } from 'react'
import clsx from 'clsx' import clsx from 'clsx'
import { import {
HoverCard, IconArchiveOutline20, IconBranchOutline16, IconEditOutline16, HoverCard, IconArchiveOutline20, IconBranchOutline16, IconEditOutline16,
IconEllipsisOutline16, IconFolderClose16, IconFolderOpenOutline16, IconPlusOutline16, IconEllipsisOutline16, IconFolderClose16, IconFolderOpen16, IconPlusOutline16,
IconTrashOutline16, IconTriangleRightFill14, Menu, StateDot, IconTrashOutline16, IconTriangleRightFill14, Menu, StateDot,
} from '@deepseek-ai/dsh-client-ui-primitives' } from '@deepseek-ai/dsh-client-ui-primitives'
import type { StateDotState } from '@deepseek-ai/dsh-client-ui-primitives' import type { StateDotState } from '@deepseek-ai/dsh-client-ui-primitives'
@@ -120,6 +120,7 @@ export function ProjectRowItem({ group, onToggle, onCreate, actions, drag, t }:
const row = group const row = group
// The ungrouped bucket has no workspace title: its label is dictionary copy. // The ungrouped bucket has no workspace title: its label is dictionary copy.
const label = row.workspaceId === undefined ? t('group.ungrouped') : row.label const label = row.workspaceId === undefined ? t('group.ungrouped') : row.label
const active = group.expanded && group.containsCurrent
const [menuOpen, setMenuOpen] = useState(false) const [menuOpen, setMenuOpen] = useState(false)
const workspaceMenuItems = [ const workspaceMenuItems = [
{ id: 'rename', label: t('rename'), icon: <IconEditOutline16 /> }, { id: 'rename', label: t('rename'), icon: <IconEditOutline16 /> },
@@ -141,8 +142,8 @@ export function ProjectRowItem({ group, onToggle, onCreate, actions, drag, t }:
}} }}
onDragEnd={drag?.end} onDragEnd={drag?.end}
> >
<span className={clsx(css.slot, css.folder)}> <span className={clsx(css.slot, css.folder, active && css.folderActive)}>
{row.expanded ? <IconFolderOpenOutline16 /> : <IconFolderClose16 />} {row.expanded ? <IconFolderOpen16 /> : <IconFolderClose16 />}
</span> </span>
<span className={clsx(css.slot, css.chevron)}> <span className={clsx(css.slot, css.chevron)}>
<IconTriangleRightFill14 className={clsx(css.arrow, row.expanded && css.arrowOpen)} /> <IconTriangleRightFill14 className={clsx(css.arrow, row.expanded && css.arrowOpen)} />