2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 05:30:56 +00:00

Replace the url with a clickable icon for link columns in tables (#9922)

This commit is contained in:
gunstr
2025-07-01 13:28:32 +02:00
committed by GitHub
parent a38f1803a9
commit 0f407f7dbb

View File

@ -3,7 +3,12 @@
*/ */
import { t } from '@lingui/core/macro'; import { t } from '@lingui/core/macro';
import { Anchor, Group, Skeleton, Text, Tooltip } from '@mantine/core'; import { Anchor, Group, Skeleton, Text, Tooltip } from '@mantine/core';
import { IconBell, IconExclamationCircle, IconLock } from '@tabler/icons-react'; import {
IconBell,
IconExclamationCircle,
IconLink,
IconLock
} from '@tabler/icons-react';
import type { ModelType } from '@lib/enums/ModelType'; import type { ModelType } from '@lib/enums/ModelType';
import { cancelEvent } from '@lib/functions/Events'; import { cancelEvent } from '@lib/functions/Events';
@ -144,8 +149,9 @@ export function LinkColumn(props: TableColumnProps): TableColumn {
window.open(url, '_blank', 'noopener,noreferrer'); window.open(url, '_blank', 'noopener,noreferrer');
}} }}
title={url}
> >
{url} <IconLink size={18} />
</Anchor> </Anchor>
); );
}, },