Skip to content

📈 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!

different logo for Swetrix CE

Blue Mousefc152f5fde1f
diff --git a/web/app/ui/icons/SwetrixLogo.tsx b/web/app/ui/icons/SwetrixLogo.tsx
index 063e0c2b7..a9263d1e5 100644
--- a/web/app/ui/icons/SwetrixLogo.tsx
+++ b/web/app/ui/icons/SwetrixLogo.tsx
@@ -1,5 +1,7 @@
import React from 'react'
import cx from 'clsx'
+import { isSelfhosted } from '~/lib/constants'
+import { useTranslation } from 'react-i18next'
interface SwetrixLogoProps {
className?: string
@@ -7,20 +9,33 @@ interface SwetrixLogoProps {
lazy?: boolean
}
-const SwetrixLogo = ({ className, theme = 'dark', lazy }: SwetrixLogoProps) => (
- <div className={cx('flex -translate-y-[2px] items-center gap-2', className)}>
- <img
- className='-translate-y-[1px]'
- height='28px'
- width='24px'
- src={theme === 'dark' ? '/assets/logo/white.png' : '/assets/logo/blue.png'}
- alt=''
- loading={lazy ? 'lazy' : 'eager'}
- />
- <span className={cx('font-mono text-2xl font-bold', theme === 'dark' ? 'text-white' : 'text-indigo-950')}>
- Swetrix
- </span>
- </div>
-)
+const SwetrixLogo = ({ className, theme = 'dark', lazy }: SwetrixLogoProps) => {
+ const { t } = useTranslation()
+
+ return (
+ <div className={cx('flex -translate-y-[2px] items-center gap-2 select-none', className)}>
+ <img
+ className='-translate-y-[1px]'
+ height='28px'
+ width='24px'
+ src={theme === 'dark' ? '/assets/logo/white.png' : '/assets/logo/blue.png'}
+ alt=''
+ loading={lazy ? 'lazy' : 'eager'}
+ />
+ <div className='flex flex-col'>
+ <span
+ className={cx('font-mono text-2xl leading-5 font-bold', theme === 'dark' ? 'text-white' : 'text-indigo-950')}
+ >
+ Swetrix
+ </span>
+ {isSelfhosted ? (
+ <span className={cx('font-mono text-xs font-semibold', theme === 'dark' ? 'text-white' : 'text-indigo-600')}>
+ {t('common.communityEdition')}
+ </span>
+ ) : null}
+ </div>
+ </div>
+ )
+}
export default SwetrixLogo
diff --git a/web/public/locales/en.json b/web/public/locales/en.json
index 4dac4edcd..12566a73d 100644
--- a/web/public/locales/en.json
+++ b/web/public/locales/en.json
@@ -124,7 +124,8 @@
"notSet": "Not set",
"remove": "Remove",
"pagination": "Showing <0>{{start}}</0> to <0>{{end}}</0> of <0>{{total}}</0> results",
- "resultsPerPage": "Results per page"
+ "resultsPerPage": "Results per page",
+ "communityEdition": "Community Edition"
},
"featureFlags": {
"title": "Feature Flags",