Skip to content

Commit 4367661

Browse files
committed
fix(FR-2420): add missing identicon for mount folders in VFolderTable
1 parent 927fe1b commit 4367661

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

react/src/components/VFolderTable.tsx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import {
1919
ReloadOutlined,
2020
UserOutlined,
2121
} from '@ant-design/icons';
22+
import { shapes } from '@dicebear/collection';
23+
import { createAvatar } from '@dicebear/core';
2224
import {
2325
Button,
2426
Descriptions,
@@ -417,9 +419,29 @@ const VFolderTable: React.FC<VFolderTableProps> = ({
417419
}
418420
}
419421
>
420-
<BAILink type="hover" to={generateFolderPath(record.id)}>
421-
<TextHighlighter keyword={searchKey}>{value}</TextHighlighter>
422-
</BAILink>
422+
<BAIFlex direction="row" align="center" gap="xxs">
423+
<img
424+
draggable={false}
425+
onDragStart={(e) => e.preventDefault()}
426+
style={{
427+
borderRadius: '0.25em',
428+
width: '1em',
429+
height: '1em',
430+
borderWidth: 0.5,
431+
borderStyle: 'solid',
432+
borderColor: token.colorBorder,
433+
userSelect: 'none',
434+
}}
435+
src={createAvatar(shapes, {
436+
seed: record.id,
437+
shape3: [],
438+
})?.toDataUri()}
439+
alt="VFolder Identicon"
440+
/>
441+
<BAILink type="hover" to={generateFolderPath(record.id)}>
442+
<TextHighlighter keyword={searchKey}>{value}</TextHighlighter>
443+
</BAILink>
444+
</BAIFlex>
423445
{showAliasInput && isCurrentRowSelected && (
424446
<Form.Item
425447
noStyle

0 commit comments

Comments
 (0)