mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Merge pull request #1304 from thueske/feature/screensize
Feature: Add screensize to UI
This commit is contained in:
commit
d95b53143e
15
components/metrics/ScreenTable.js
Normal file
15
components/metrics/ScreenTable.js
Normal file
@ -0,0 +1,15 @@
|
||||
import React from 'react';
|
||||
import MetricsTable from './MetricsTable';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
export default function ScreenTable({ websiteId, ...props }) {
|
||||
return (
|
||||
<MetricsTable
|
||||
{...props}
|
||||
title={<FormattedMessage id="metrics.screens" defaultMessage="Screen" />}
|
||||
type="screen"
|
||||
metric={<FormattedMessage id="metrics.visitors" defaultMessage="Visitors" />}
|
||||
websiteId={websiteId}
|
||||
/>
|
||||
);
|
||||
}
|
@ -22,6 +22,7 @@ import useFetch from 'hooks/useFetch';
|
||||
import usePageQuery from 'hooks/usePageQuery';
|
||||
import { DEFAULT_ANIMATION_DURATION } from 'lib/constants';
|
||||
import styles from './WebsiteDetails.module.css';
|
||||
import ScreenTable from 'components/metrics/ScreenTable';
|
||||
|
||||
const views = {
|
||||
url: PagesTable,
|
||||
@ -29,6 +30,7 @@ const views = {
|
||||
browser: BrowsersTable,
|
||||
os: OSTable,
|
||||
device: DevicesTable,
|
||||
screen: ScreenTable,
|
||||
country: CountriesTable,
|
||||
language: LanguagesTable,
|
||||
event: EventsTable,
|
||||
@ -64,6 +66,10 @@ export default function WebsiteDetails({ websiteId }) {
|
||||
label: <FormattedMessage id="metrics.referrers" defaultMessage="Referrers" />,
|
||||
value: resolve({ view: 'referrer' }),
|
||||
},
|
||||
{
|
||||
label: <FormattedMessage id="metrics.screens" defaultMessage="Screens" />,
|
||||
value: resolve({ view: 'screen' }),
|
||||
},
|
||||
{
|
||||
label: <FormattedMessage id="metrics.browsers" defaultMessage="Browsers" />,
|
||||
value: resolve({ view: 'browser' }),
|
||||
|
@ -106,5 +106,6 @@
|
||||
"metrics.referrers": "Referrer",
|
||||
"metrics.unique-visitors": "Eindeutige Besucher",
|
||||
"metrics.views": "Aufrufe",
|
||||
"metrics.visitors": "Besucher"
|
||||
"metrics.visitors": "Besucher",
|
||||
"metrics.screens": "Bildschirmauflösungen"
|
||||
}
|
||||
|
@ -106,5 +106,6 @@
|
||||
"metrics.referrers": "Referrers",
|
||||
"metrics.unique-visitors": "Unique visitors",
|
||||
"metrics.views": "Views",
|
||||
"metrics.visitors": "Visitors"
|
||||
"metrics.visitors": "Visitors",
|
||||
"metrics.screens": "Screens"
|
||||
}
|
||||
|
@ -106,5 +106,6 @@
|
||||
"metrics.referrers": "Referrers",
|
||||
"metrics.unique-visitors": "Unique visitors",
|
||||
"metrics.views": "Views",
|
||||
"metrics.visitors": "Visitors"
|
||||
"metrics.visitors": "Visitors",
|
||||
"metrics.screens": "Screens"
|
||||
}
|
||||
|
@ -106,5 +106,6 @@
|
||||
"metrics.referrers": "Yönlendirenler",
|
||||
"metrics.unique-visitors": "Tekil kullanıcı",
|
||||
"metrics.views": "Görüntüleme",
|
||||
"metrics.visitors": "Ziyaretçi"
|
||||
"metrics.visitors": "Ziyaretçi",
|
||||
"metrics.screens": "Ekranlar"
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { ok, methodNotAllowed, unauthorized, badRequest } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
|
||||
const sessionColumns = ['browser', 'os', 'device', 'country', 'language'];
|
||||
const sessionColumns = ['browser', 'os', 'device', 'screen', 'country', 'language'];
|
||||
const pageviewColumns = ['url', 'referrer'];
|
||||
|
||||
function getTable(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user