mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Merge pull request #3749 from Maxime-J/os-formatting
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
Restore OS formatting in tables
This commit is contained in:
commit
81bedec6d5
1 changed files with 5 additions and 13 deletions
|
|
@ -25,16 +25,16 @@ export function MetricLabel({ type, data }: MetricLabelProps) {
|
||||||
const { getRegionName } = useRegionNames(locale);
|
const { getRegionName } = useRegionNames(locale);
|
||||||
|
|
||||||
const { label, country, domain } = data;
|
const { label, country, domain } = data;
|
||||||
const isType = ['browser', 'country', 'device', 'os'].includes(type);
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'browser':
|
case 'browser':
|
||||||
|
case 'os':
|
||||||
return (
|
return (
|
||||||
<FilterLink
|
<FilterLink
|
||||||
type="browser"
|
type={type}
|
||||||
value={label}
|
value={label}
|
||||||
label={formatValue(label, 'browser')}
|
label={formatValue(label, type)}
|
||||||
icon={<TypeIcon type="browser" value={label} />}
|
icon={<TypeIcon type={type} value={label} />}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -100,7 +100,7 @@ export function MetricLabel({ type, data }: MetricLabelProps) {
|
||||||
type="device"
|
type="device"
|
||||||
value={labels[label] && label}
|
value={labels[label] && label}
|
||||||
label={formatValue(label, 'device')}
|
label={formatValue(label, 'device')}
|
||||||
icon={<TypeIcon type="device" value={label?.toLowerCase()} />}
|
icon={<TypeIcon type="device" value={label} />}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -141,14 +141,6 @@ export function MetricLabel({ type, data }: MetricLabelProps) {
|
||||||
<FilterLink
|
<FilterLink
|
||||||
type={type}
|
type={type}
|
||||||
value={label}
|
value={label}
|
||||||
icon={
|
|
||||||
isType && (
|
|
||||||
<TypeIcon
|
|
||||||
type={type as 'browser' | 'country' | 'device' | 'os'}
|
|
||||||
value={label?.toLowerCase()?.replaceAll(/\W/g, '-')}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue