📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix: OS name logos are not loading
Blue Mouse422fb63b2e1a
diff --git a/web/app/pages/Project/View/ViewProject.helpers.tsx b/web/app/pages/Project/View/ViewProject.helpers.tsxindex aa1b5b4a9..8a802bd09 100644--- a/web/app/pages/Project/View/ViewProject.helpers.tsx+++ b/web/app/pages/Project/View/ViewProject.helpers.tsx@@ -1993,13 +1993,13 @@ export const getDeviceRowMapper = (activeTab: string, theme: string, t: typeof iconst { name: entryName, version } = entryconst logoKey = entryName// @ts-expect-error- const logoPathLight = OS_LOGO_MAP[logoKey]+ const logoUrlLight = OS_LOGO_MAP[logoKey]// @ts-expect-error- const logoPathDark = OS_LOGO_MAP_DARK[logoKey]+ const logoUrlDark = OS_LOGO_MAP_DARK[logoKey]const displayName = version ? `${entryName} ${version}` : entryName- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLightif (entryName === null) {return (@@ -2011,7 +2011,7 @@ export const getDeviceRowMapper = (activeTab: string, theme: string, t: typeof i)}- if (!logoPath) {+ if (!logoUrl) {return (<><GlobeIcon className='h-5 w-5' strokeWidth={1.5} />@@ -2021,7 +2021,6 @@ export const getDeviceRowMapper = (activeTab: string, theme: string, t: typeof i)}- const logoUrl = `/${logoPath}`return (<><img src={logoUrl} className='h-5 w-5 dark:fill-gray-50' alt='' />diff --git a/web/app/pages/Project/tabs/Captcha/CaptchaView.tsx b/web/app/pages/Project/tabs/Captcha/CaptchaView.tsxindex f11744535..c43469c6e 100644--- a/web/app/pages/Project/tabs/Captcha/CaptchaView.tsx+++ b/web/app/pages/Project/tabs/Captcha/CaptchaView.tsx@@ -306,12 +306,13 @@ const CaptchaView = ({ projectId }: CaptchaViewProps) => {const rowMapper = (entry: any) => {const { name: entryName } = entry// @ts-expect-error- const logoPathLight = OS_LOGO_MAP[entryName]+ const logoUrlLight = OS_LOGO_MAP[entryName]// @ts-expect-error- const logoPathDark = OS_LOGO_MAP_DARK[entryName]- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight- if (!logoPath) {+ const logoUrlDark = OS_LOGO_MAP_DARK[entryName]+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLight++ if (!logoUrl) {return (<><GlobeAltIcon className='h-5 w-5' />@@ -320,7 +321,7 @@ const CaptchaView = ({ projectId }: CaptchaViewProps) => {</>)}- const logoUrl = `/${logoPath}`+return (<><img src={logoUrl} className='h-5 w-5 dark:fill-gray-50' alt='' />diff --git a/web/app/pages/Project/tabs/Errors/ErrorDetails.tsx b/web/app/pages/Project/tabs/Errors/ErrorDetails.tsxindex b073469be..f8d216c2e 100644--- a/web/app/pages/Project/tabs/Errors/ErrorDetails.tsx+++ b/web/app/pages/Project/tabs/Errors/ErrorDetails.tsx@@ -63,15 +63,15 @@ const BrowserIcon = ({ browser }: { browser: string | null }) => {const OSIcon = ({ os, theme }: { os: string | null; theme: string }) => {if (!os) return null- const logoPathLight = OS_LOGO_MAP[os as keyof typeof OS_LOGO_MAP]- const logoPathDark = OS_LOGO_MAP_DARK[os as keyof typeof OS_LOGO_MAP_DARK]+ const logoUrlLight = OS_LOGO_MAP[os as keyof typeof OS_LOGO_MAP]+ const logoUrlDark = OS_LOGO_MAP_DARK[os as keyof typeof OS_LOGO_MAP_DARK]- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLight- if (!logoPath) return null+ if (!logoUrl) return null- return <img src={`/${logoPath}`} className='h-4 w-4' alt='' />+ return <img src={logoUrl} className='h-4 w-4' alt='' />}interface SessionRowProps {diff --git a/web/app/pages/Project/tabs/Profiles/ProfileDetails.tsx b/web/app/pages/Project/tabs/Profiles/ProfileDetails.tsxindex dfaa17c71..7a77861ce 100644--- a/web/app/pages/Project/tabs/Profiles/ProfileDetails.tsx+++ b/web/app/pages/Project/tabs/Profiles/ProfileDetails.tsx@@ -183,15 +183,15 @@ const BrowserIcon = ({ browser }: { browser: string | null }) => {const OSIcon = ({ os, theme }: { os: string | null; theme: string }) => {if (!os) return <GlobeIcon className='h-4 w-4' />- const logoPathLight = OS_LOGO_MAP[os as keyof typeof OS_LOGO_MAP]- const logoPathDark = OS_LOGO_MAP_DARK[os as keyof typeof OS_LOGO_MAP_DARK]+ const logoUrlLight = OS_LOGO_MAP[os as keyof typeof OS_LOGO_MAP]+ const logoUrlDark = OS_LOGO_MAP_DARK[os as keyof typeof OS_LOGO_MAP_DARK]- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLight- if (!logoPath) return <GlobeIcon className='h-4 w-4' />+ if (!logoUrl) return <GlobeIcon className='h-4 w-4' />- return <img src={`/${logoPath}`} className='h-4 w-4' alt='' />+ return <img src={logoUrl} className='h-4 w-4' alt='' />}export const ProfileDetails = ({diff --git a/web/app/pages/Project/tabs/Sessions/SessionDetailView.tsx b/web/app/pages/Project/tabs/Sessions/SessionDetailView.tsxindex 435e359f0..236d70826 100644--- a/web/app/pages/Project/tabs/Sessions/SessionDetailView.tsx+++ b/web/app/pages/Project/tabs/Sessions/SessionDetailView.tsx@@ -78,15 +78,15 @@ const BrowserIcon = ({ browser }: { browser: string | null }) => {const OSIcon = ({ os, theme }: { os: string | null; theme: string }) => {if (!os) return <GlobeIcon className='h-4 w-4' />- const logoPathLight = OS_LOGO_MAP[os as keyof typeof OS_LOGO_MAP]- const logoPathDark = OS_LOGO_MAP_DARK[os as keyof typeof OS_LOGO_MAP_DARK]+ const logoUrlLight = OS_LOGO_MAP[os as keyof typeof OS_LOGO_MAP]+ const logoUrlDark = OS_LOGO_MAP_DARK[os as keyof typeof OS_LOGO_MAP_DARK]- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLight- if (!logoPath) return <GlobeIcon className='h-4 w-4' />+ if (!logoUrl) return <GlobeIcon className='h-4 w-4' />- return <img src={`/${logoPath}`} className='h-4 w-4' alt='' />+ return <img src={logoUrl} className='h-4 w-4' alt='' />}export const SessionDetailView = ({diff --git a/web/app/routes/_index.tsx b/web/app/routes/_index.tsxindex 51af16ff1..af4c32fe9 100644--- a/web/app/routes/_index.tsx+++ b/web/app/routes/_index.tsx@@ -1480,13 +1480,13 @@ const FeaturesShowcase = () => {label={t('project.mapping.os')}value={deviceInfo.os}valueMapper={(value: keyof typeof OS_LOGO_MAP) => {- const logoPathLight = OS_LOGO_MAP[value]- const logoPathDark = OS_LOGO_MAP_DARK[value as keyof typeof OS_LOGO_MAP_DARK]+ const logoUrlLight = OS_LOGO_MAP[value]+ const logoUrlDark = OS_LOGO_MAP_DARK[value as keyof typeof OS_LOGO_MAP_DARK]- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLight- if (!logoPath) {+ if (!logoUrl) {return (<><GlobeIcon className='size-6' />@@ -1495,7 +1495,6 @@ const FeaturesShowcase = () => {</>)}- const logoUrl = `/${logoPath}`return (<div className='flex items-center'>diff --git a/web/app/ui/FilterValueInput.tsx b/web/app/ui/FilterValueInput.tsxindex b1ed6cc0d..e7300913c 100644--- a/web/app/ui/FilterValueInput.tsx+++ b/web/app/ui/FilterValueInput.tsx@@ -180,14 +180,14 @@ const FilterValueInput = ({if (column === 'os') {// @ts-expect-error - dynamic key access- const logoPathLight = OS_LOGO_MAP[item]+ const logoUrlLight = OS_LOGO_MAP[item]// @ts-expect-error - dynamic key access- const logoPathDark = OS_LOGO_MAP_DARK[item]- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight+ const logoUrlDark = OS_LOGO_MAP_DARK[item]+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLight- if (logoPath) {- return <img src={`/${logoPath}`} className='size-4 shrink-0 dark:fill-gray-50' alt='' />+ if (logoUrl) {+ return <img src={logoUrl} className='size-4 shrink-0 dark:fill-gray-50' alt='' />}return <GlobeIcon className='size-4 shrink-0' strokeWidth={1.5} />}@@ -197,14 +197,14 @@ const FilterValueInput = ({const parsed = parseVersionValue(item)if (parsed) {// @ts-expect-error - dynamic key access- const logoPathLight = OS_LOGO_MAP[parsed.parent]+ const logoUrlLight = OS_LOGO_MAP[parsed.parent]// @ts-expect-error - dynamic key access- const logoPathDark = OS_LOGO_MAP_DARK[parsed.parent]- let logoPath = theme === 'dark' ? logoPathDark : logoPathLight- logoPath ||= logoPathLight+ const logoUrlDark = OS_LOGO_MAP_DARK[parsed.parent]+ let logoUrl = theme === 'dark' ? logoUrlDark : logoUrlLight+ logoUrl ||= logoUrlLight- if (logoPath) {- return <img src={`/${logoPath}`} className='size-4 shrink-0 dark:fill-gray-50' alt='' />+ if (logoUrl) {+ return <img src={logoUrl} className='size-4 shrink-0 dark:fill-gray-50' alt='' />}}return <GlobeIcon className='size-4 shrink-0' strokeWidth={1.5} />