mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Fixed type icons.
This commit is contained in:
parent
67874a6282
commit
840c1c02bf
2 changed files with 20 additions and 4 deletions
|
|
@ -31,11 +31,25 @@ export function SessionsTable({ data = [] }: { data: any[]; showDomain?: boolean
|
|||
</GridColumn>
|
||||
<GridColumn name="city" label={formatMessage(labels.city)} />
|
||||
<GridColumn name="browser" label={formatMessage(labels.browser)}>
|
||||
{row => formatValue(row.browser, 'browser')}
|
||||
{row => (
|
||||
<TypeIcon type="browser" value={row.browser}>
|
||||
{formatValue(row.browser, 'browser')}
|
||||
</TypeIcon>
|
||||
)}
|
||||
</GridColumn>
|
||||
<GridColumn name="os" label={formatMessage(labels.os)}>
|
||||
{row => (
|
||||
<TypeIcon type="os" value={row.os}>
|
||||
{formatValue(row.os, 'os')}
|
||||
</TypeIcon>
|
||||
)}
|
||||
</GridColumn>
|
||||
<GridColumn name="os" label={formatMessage(labels.os)} />
|
||||
<GridColumn name="device" label={formatMessage(labels.device)}>
|
||||
{row => formatValue(row.device, 'device')}
|
||||
{row => (
|
||||
<TypeIcon type="device" value={row.device}>
|
||||
{formatValue(row.device, 'device')}
|
||||
</TypeIcon>
|
||||
)}
|
||||
</GridColumn>
|
||||
<GridColumn name="lastAt" label={formatMessage(labels.lastSeen)}>
|
||||
{row => formatDate(new Date(row.lastAt), 'PPPpp', locale)}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ export function TypeIcon({
|
|||
return (
|
||||
<>
|
||||
<img
|
||||
src={`${process.env.basePath || ''}/images/${type}/${value || 'unknown'}.png`}
|
||||
src={`${process.env.basePath || ''}/images/${type}/${
|
||||
value.replaceAll(' ', '-').toLowerCase() || 'unknown'
|
||||
}.png`}
|
||||
alt={value}
|
||||
width={type === 'country' ? undefined : 16}
|
||||
height={type === 'country' ? undefined : 16}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue