diff --git a/components/metrics/BrowsersTable.js b/components/metrics/BrowsersTable.js index a8dd34ea..2920280f 100644 --- a/components/metrics/BrowsersTable.js +++ b/components/metrics/BrowsersTable.js @@ -2,12 +2,23 @@ import FilterLink from 'components/common/FilterLink'; import MetricsTable from 'components/metrics/MetricsTable'; import { BROWSERS } from 'lib/constants'; import useMessages from 'hooks/useMessages'; +import { useRouter } from 'next/router'; export function BrowsersTable({ websiteId, ...props }) { const { formatMessage, labels } = useMessages(); + const { basePath } = useRouter(); function renderLink({ x: browser }) { - return ; + return ( + + {browser} + + ); } return ( diff --git a/components/metrics/DevicesTable.js b/components/metrics/DevicesTable.js index 1bc3ac04..30b2a742 100644 --- a/components/metrics/DevicesTable.js +++ b/components/metrics/DevicesTable.js @@ -1,9 +1,11 @@ import MetricsTable from './MetricsTable'; import FilterLink from 'components/common/FilterLink'; import useMessages from 'hooks/useMessages'; +import { useRouter } from 'next/router'; export function DevicesTable({ websiteId, ...props }) { const { formatMessage, labels } = useMessages(); + const { basePath } = useRouter(); function renderLink({ x: device }) { return ( @@ -11,7 +13,14 @@ export function DevicesTable({ websiteId, ...props }) { id="device" value={labels[device] && device} label={formatMessage(labels[device] || labels.unknown)} - /> + > + {device} + ); } diff --git a/components/metrics/OSTable.js b/components/metrics/OSTable.js index a638038b..02ead27d 100644 --- a/components/metrics/OSTable.js +++ b/components/metrics/OSTable.js @@ -1,12 +1,25 @@ import MetricsTable from './MetricsTable'; import FilterLink from 'components/common/FilterLink'; import useMessages from 'hooks/useMessages'; +import { useRouter } from 'next/router'; export function OSTable({ websiteId, ...props }) { const { formatMessage, labels } = useMessages(); + const { basePath } = useRouter(); function renderLink({ x: os }) { - return ; + return ( + + {os} + + ); } return ( diff --git a/lib/constants.ts b/lib/constants.ts index 5772e147..9753a8d4 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -182,7 +182,7 @@ export const DESKTOP_OS = [ 'BeOS', 'Chrome OS', 'Linux', - 'macOS', + 'Mac OS', 'Open BSD', 'OS/2', 'QNX', @@ -204,33 +204,34 @@ export const DESKTOP_OS = [ export const MOBILE_OS = ['Amazon OS', 'Android OS', 'BlackBerry OS', 'iOS', 'Windows Mobile']; export const BROWSERS = { + android: 'Android', aol: 'AOL', - edge: 'Edge', - 'edge-ios': 'Edge (iOS)', - yandexbrowser: 'Yandex', - kakaotalk: 'KaKaoTalk', - samsung: 'Samsung', - silk: 'Silk', - miui: 'MIUI', beaker: 'Beaker', - 'edge-chromium': 'Edge (Chromium)', + bb10: 'BlackBerry 10', chrome: 'Chrome', 'chromium-webview': 'Chrome (webview)', - phantomjs: 'PhantomJS', crios: 'Chrome (iOS)', + curl: 'Curl', + edge: 'Edge', + 'edge-chromium': 'Edge (Chromium)', + 'edge-ios': 'Edge (iOS)', + facebook: 'Facebook', firefox: 'Firefox', fxios: 'Firefox (iOS)', - 'opera-mini': 'Opera Mini', - opera: 'Opera', ie: 'IE', - bb10: 'BlackBerry 10', - android: 'Android', - ios: 'iOS', - safari: 'Safari', - facebook: 'Facebook', instagram: 'Instagram', + ios: 'iOS', 'ios-webview': 'iOS (webview)', + kakaotalk: 'KaKaoTalk', + miui: 'MIUI', + opera: 'Opera', + 'opera-mini': 'Opera Mini', + phantomjs: 'PhantomJS', + safari: 'Safari', + samsung: 'Samsung', + silk: 'Silk', searchbot: 'Searchbot', + yandexbrowser: 'Yandex', }; export const MAP_FILE = '/datamaps.world.json'; diff --git a/public/images/browsers/android-webview.png b/public/images/browsers/android-webview.png new file mode 100644 index 00000000..99242297 Binary files /dev/null and b/public/images/browsers/android-webview.png differ diff --git a/public/images/browsers/android.png b/public/images/browsers/android.png new file mode 100644 index 00000000..6e28498d Binary files /dev/null and b/public/images/browsers/android.png differ diff --git a/public/images/browsers/aol.png b/public/images/browsers/aol.png new file mode 100644 index 00000000..66dc4288 Binary files /dev/null and b/public/images/browsers/aol.png differ diff --git a/public/images/browsers/beaker.png b/public/images/browsers/beaker.png new file mode 100644 index 00000000..fbc997cd Binary files /dev/null and b/public/images/browsers/beaker.png differ diff --git a/public/images/browsers/blackberry.png b/public/images/browsers/blackberry.png new file mode 100644 index 00000000..74f255cb Binary files /dev/null and b/public/images/browsers/blackberry.png differ diff --git a/public/images/browsers/brave.png b/public/images/browsers/brave.png new file mode 100644 index 00000000..0556c120 Binary files /dev/null and b/public/images/browsers/brave.png differ diff --git a/public/images/browsers/chrome.png b/public/images/browsers/chrome.png new file mode 100644 index 00000000..e4e2773f Binary files /dev/null and b/public/images/browsers/chrome.png differ diff --git a/public/images/browsers/chromium-webview.png b/public/images/browsers/chromium-webview.png new file mode 100644 index 00000000..a3fd998d Binary files /dev/null and b/public/images/browsers/chromium-webview.png differ diff --git a/public/images/browsers/crios.png b/public/images/browsers/crios.png new file mode 100644 index 00000000..e4e2773f Binary files /dev/null and b/public/images/browsers/crios.png differ diff --git a/public/images/browsers/curl.png b/public/images/browsers/curl.png new file mode 100644 index 00000000..dd221927 Binary files /dev/null and b/public/images/browsers/curl.png differ diff --git a/public/images/browsers/edge-chromium.png b/public/images/browsers/edge-chromium.png new file mode 100644 index 00000000..1f2b230f Binary files /dev/null and b/public/images/browsers/edge-chromium.png differ diff --git a/public/images/browsers/edge-ios.png b/public/images/browsers/edge-ios.png new file mode 100644 index 00000000..1f2b230f Binary files /dev/null and b/public/images/browsers/edge-ios.png differ diff --git a/public/images/browsers/edge.png b/public/images/browsers/edge.png new file mode 100644 index 00000000..3881a7e0 Binary files /dev/null and b/public/images/browsers/edge.png differ diff --git a/public/images/browsers/facebook.png b/public/images/browsers/facebook.png new file mode 100644 index 00000000..4dc9b267 Binary files /dev/null and b/public/images/browsers/facebook.png differ diff --git a/public/images/browsers/firefox.png b/public/images/browsers/firefox.png new file mode 100644 index 00000000..c118f9c1 Binary files /dev/null and b/public/images/browsers/firefox.png differ diff --git a/public/images/browsers/fxios.png b/public/images/browsers/fxios.png new file mode 100644 index 00000000..c118f9c1 Binary files /dev/null and b/public/images/browsers/fxios.png differ diff --git a/public/images/browsers/ie.png b/public/images/browsers/ie.png new file mode 100644 index 00000000..1d3bbe8f Binary files /dev/null and b/public/images/browsers/ie.png differ diff --git a/public/images/browsers/instagram.png b/public/images/browsers/instagram.png new file mode 100644 index 00000000..5961a6b3 Binary files /dev/null and b/public/images/browsers/instagram.png differ diff --git a/public/images/browsers/ios-webview.png b/public/images/browsers/ios-webview.png new file mode 100644 index 00000000..5f2dd401 Binary files /dev/null and b/public/images/browsers/ios-webview.png differ diff --git a/public/images/browsers/ios.png b/public/images/browsers/ios.png new file mode 100644 index 00000000..5f2dd401 Binary files /dev/null and b/public/images/browsers/ios.png differ diff --git a/public/images/browsers/kakaotalk.png b/public/images/browsers/kakaotalk.png new file mode 100644 index 00000000..e932a67b Binary files /dev/null and b/public/images/browsers/kakaotalk.png differ diff --git a/public/images/browsers/miui.png b/public/images/browsers/miui.png new file mode 100644 index 00000000..5f929510 Binary files /dev/null and b/public/images/browsers/miui.png differ diff --git a/public/images/browsers/opera-mini.png b/public/images/browsers/opera-mini.png new file mode 100644 index 00000000..d4e26712 Binary files /dev/null and b/public/images/browsers/opera-mini.png differ diff --git a/public/images/browsers/opera.png b/public/images/browsers/opera.png new file mode 100644 index 00000000..84e6d0fc Binary files /dev/null and b/public/images/browsers/opera.png differ diff --git a/public/images/browsers/safari.png b/public/images/browsers/safari.png new file mode 100644 index 00000000..b06369aa Binary files /dev/null and b/public/images/browsers/safari.png differ diff --git a/public/images/browsers/samsung.png b/public/images/browsers/samsung.png new file mode 100644 index 00000000..544e390e Binary files /dev/null and b/public/images/browsers/samsung.png differ diff --git a/public/images/browsers/searchbot.png b/public/images/browsers/searchbot.png new file mode 100644 index 00000000..46a33055 Binary files /dev/null and b/public/images/browsers/searchbot.png differ diff --git a/public/images/browsers/silk.png b/public/images/browsers/silk.png new file mode 100644 index 00000000..6af1d726 Binary files /dev/null and b/public/images/browsers/silk.png differ diff --git a/public/images/browsers/unknown.png b/public/images/browsers/unknown.png new file mode 100644 index 00000000..47a1553c Binary files /dev/null and b/public/images/browsers/unknown.png differ diff --git a/public/images/browsers/yandexbrowser.png b/public/images/browsers/yandexbrowser.png new file mode 100644 index 00000000..f703db23 Binary files /dev/null and b/public/images/browsers/yandexbrowser.png differ diff --git a/public/images/device/desktop.png b/public/images/device/desktop.png new file mode 100644 index 00000000..d5ede419 Binary files /dev/null and b/public/images/device/desktop.png differ diff --git a/public/images/device/laptop.png b/public/images/device/laptop.png new file mode 100644 index 00000000..19f66967 Binary files /dev/null and b/public/images/device/laptop.png differ diff --git a/public/images/device/mobile.png b/public/images/device/mobile.png new file mode 100644 index 00000000..d2190f4a Binary files /dev/null and b/public/images/device/mobile.png differ diff --git a/public/images/device/tablet.png b/public/images/device/tablet.png new file mode 100644 index 00000000..5e06bcff Binary files /dev/null and b/public/images/device/tablet.png differ diff --git a/public/images/device/unknown.png b/public/images/device/unknown.png new file mode 100644 index 00000000..52058026 Binary files /dev/null and b/public/images/device/unknown.png differ diff --git a/public/images/os/amazon-os.png b/public/images/os/amazon-os.png new file mode 100644 index 00000000..9b18cf0f Binary files /dev/null and b/public/images/os/amazon-os.png differ diff --git a/public/images/os/android-os.png b/public/images/os/android-os.png new file mode 100644 index 00000000..fc6509b3 Binary files /dev/null and b/public/images/os/android-os.png differ diff --git a/public/images/os/beos.png b/public/images/os/beos.png new file mode 100644 index 00000000..6bc4a8a5 Binary files /dev/null and b/public/images/os/beos.png differ diff --git a/public/images/os/blackberry-os.png b/public/images/os/blackberry-os.png new file mode 100644 index 00000000..c77db525 Binary files /dev/null and b/public/images/os/blackberry-os.png differ diff --git a/public/images/os/chrome-os.png b/public/images/os/chrome-os.png new file mode 100644 index 00000000..ae008601 Binary files /dev/null and b/public/images/os/chrome-os.png differ diff --git a/public/images/os/ios.png b/public/images/os/ios.png new file mode 100644 index 00000000..1c129ae8 Binary files /dev/null and b/public/images/os/ios.png differ diff --git a/public/images/os/linux.png b/public/images/os/linux.png new file mode 100644 index 00000000..ce8fba38 Binary files /dev/null and b/public/images/os/linux.png differ diff --git a/public/images/os/mac-os.png b/public/images/os/mac-os.png new file mode 100644 index 00000000..357e3eac Binary files /dev/null and b/public/images/os/mac-os.png differ diff --git a/public/images/os/open-bsd.png b/public/images/os/open-bsd.png new file mode 100644 index 00000000..806887e8 Binary files /dev/null and b/public/images/os/open-bsd.png differ diff --git a/public/images/os/os-2.png b/public/images/os/os-2.png new file mode 100644 index 00000000..5f88105d Binary files /dev/null and b/public/images/os/os-2.png differ diff --git a/public/images/os/qnx.png b/public/images/os/qnx.png new file mode 100644 index 00000000..59d9a44c Binary files /dev/null and b/public/images/os/qnx.png differ diff --git a/public/images/os/sun-os.png b/public/images/os/sun-os.png new file mode 100644 index 00000000..c19f0eb3 Binary files /dev/null and b/public/images/os/sun-os.png differ diff --git a/public/images/os/unknown.png b/public/images/os/unknown.png new file mode 100644 index 00000000..52058026 Binary files /dev/null and b/public/images/os/unknown.png differ diff --git a/public/images/os/windows-10.png b/public/images/os/windows-10.png new file mode 100644 index 00000000..4effcd2b Binary files /dev/null and b/public/images/os/windows-10.png differ diff --git a/public/images/os/windows-11.png b/public/images/os/windows-11.png new file mode 100644 index 00000000..4effcd2b Binary files /dev/null and b/public/images/os/windows-11.png differ diff --git a/public/images/os/windows-2000.png b/public/images/os/windows-2000.png new file mode 100644 index 00000000..3bccae3f Binary files /dev/null and b/public/images/os/windows-2000.png differ diff --git a/public/images/os/windows-3-11.png b/public/images/os/windows-3-11.png new file mode 100644 index 00000000..3bccae3f Binary files /dev/null and b/public/images/os/windows-3-11.png differ diff --git a/public/images/os/windows-7.png b/public/images/os/windows-7.png new file mode 100644 index 00000000..cd2db79e Binary files /dev/null and b/public/images/os/windows-7.png differ diff --git a/public/images/os/windows-8-1.png b/public/images/os/windows-8-1.png new file mode 100644 index 00000000..3ce98aaa Binary files /dev/null and b/public/images/os/windows-8-1.png differ diff --git a/public/images/os/windows-8.png b/public/images/os/windows-8.png new file mode 100644 index 00000000..3ce98aaa Binary files /dev/null and b/public/images/os/windows-8.png differ diff --git a/public/images/os/windows-95.png b/public/images/os/windows-95.png new file mode 100644 index 00000000..3bccae3f Binary files /dev/null and b/public/images/os/windows-95.png differ diff --git a/public/images/os/windows-98.png b/public/images/os/windows-98.png new file mode 100644 index 00000000..3bccae3f Binary files /dev/null and b/public/images/os/windows-98.png differ diff --git a/public/images/os/windows-me.png b/public/images/os/windows-me.png new file mode 100644 index 00000000..cd2db79e Binary files /dev/null and b/public/images/os/windows-me.png differ diff --git a/public/images/os/windows-server-2003.png b/public/images/os/windows-server-2003.png new file mode 100644 index 00000000..cd2db79e Binary files /dev/null and b/public/images/os/windows-server-2003.png differ diff --git a/public/images/os/windows-vista.png b/public/images/os/windows-vista.png new file mode 100644 index 00000000..cd2db79e Binary files /dev/null and b/public/images/os/windows-vista.png differ diff --git a/public/images/os/windows-xp.png b/public/images/os/windows-xp.png new file mode 100644 index 00000000..cd2db79e Binary files /dev/null and b/public/images/os/windows-xp.png differ