Skip to content

Commit d14e351

Browse files
committed
fix(FR-869): fix session launcher to display appropriate type for folders
1 parent 7628526 commit d14e351

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

react/src/components/VFolderTable.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useSuspenseTanQuery } from '../hooks/reactQueryAlias';
55
import useControllableState from '../hooks/useControllableState';
66
import { useCurrentProjectValue } from '../hooks/useCurrentProject';
77
import { useEventNotStable } from '../hooks/useEventNotStable';
8+
import UserUnionIcon from './BAIIcons/UserUnionIcon';
89
import BAILink from './BAILink';
910
import Flex from './Flex';
1011
import FolderCreateModal from './FolderCreateModal';
@@ -26,6 +27,7 @@ import {
2627
Table,
2728
TableProps,
2829
Tag,
30+
theme,
2931
Tooltip,
3032
Typography,
3133
} from 'antd';
@@ -147,6 +149,7 @@ const VFolderTable: React.FC<VFolderTableProps> = ({
147149
}, [aliasMap, internalForm, aliasBasePath]);
148150

149151
const { t } = useTranslation();
152+
const { token } = theme.useToken();
150153
const baiRequestWithPromise = useBaiSignedRequestWithPromise();
151154
const currentProject = useCurrentProjectValue();
152155
const [fetchKey, updateFetchKey] = useUpdatableState('first');
@@ -447,15 +450,21 @@ const VFolderTable: React.FC<VFolderTableProps> = ({
447450
title: t('data.Type'),
448451
dataIndex: 'type',
449452
sorter: (a, b) => a.type.localeCompare(b.type),
450-
render: (value, record) => {
453+
render: (_, record) => {
454+
console.log(record.ownership_type);
451455
return (
452456
<Flex direction="column">
453-
{record.type === 'user' ? (
454-
<UserOutlined title="User" />
457+
{record.ownership_type === 'user' ? (
458+
<Flex gap={'xs'}>
459+
<Typography.Text>{t('data.User')}</Typography.Text>
460+
<UserOutlined style={{ color: token.colorTextTertiary }} />
461+
</Flex>
455462
) : (
456-
<div>Group</div>
463+
<Flex gap={'xs'}>
464+
<Typography.Text>{t('data.Project')}</Typography.Text>
465+
<UserUnionIcon style={{ color: token.colorTextTertiary }} />
466+
</Flex>
457467
)}
458-
{record.type === 'group' && `(${record.group_name})`}
459468
</Flex>
460469
);
461470
},

0 commit comments

Comments
 (0)