diff --git a/src/app/(main)/discover/_layout/Desktop/Header.tsx b/src/app/(main)/discover/_layout/Desktop/Header.tsx
index e5aa64b76706..4c48f53d73ae 100644
--- a/src/app/(main)/discover/_layout/Desktop/Header.tsx
+++ b/src/app/(main)/discover/_layout/Desktop/Header.tsx
@@ -5,6 +5,7 @@ import Link from 'next/link';
import { memo } from 'react';
import { ProductLogo } from '@/components/Branding';
+import { isCustomBranding } from '@/const/version';
import CreateButton from '../../features/CreateButton';
import StoreSearchBar from '../../features/StoreSearchBar';
@@ -17,7 +18,7 @@ const Header = memo(() => {
}
- right={}
+ right={!isCustomBranding && }
style={{
position: 'relative',
zIndex: 10,
diff --git a/src/app/(main)/settings/llm/index.tsx b/src/app/(main)/settings/llm/index.tsx
index ad003761335e..6d0c823f7d53 100644
--- a/src/app/(main)/settings/llm/index.tsx
+++ b/src/app/(main)/settings/llm/index.tsx
@@ -2,6 +2,8 @@
import { Flexbox } from 'react-layout-kit';
+import { isCustomBranding } from '@/const/version';
+
import { useProviderList } from './ProviderList/providers';
import ProviderConfig from './components/ProviderConfig';
import Footer from './features/Footer';
@@ -14,7 +16,7 @@ const Page = () => {
{list.map(({ id, ...res }) => (
))}
-
+ {!isCustomBranding && }
);
};
diff --git a/src/app/metadata.ts b/src/app/metadata.ts
index c75a8e49bc90..4c4f038a81d3 100644
--- a/src/app/metadata.ts
+++ b/src/app/metadata.ts
@@ -1,8 +1,9 @@
import { Metadata } from 'next';
import { appEnv } from '@/config/app';
-import { BRANDING_NAME } from '@/const/branding';
+import { BRANDING_LOGO_URL, BRANDING_NAME, ORG_NAME } from '@/const/branding';
import { OFFICIAL_URL, OG_URL } from '@/const/url';
+import { isCustomBranding, isCustomORG } from '@/const/version';
import { translation } from '@/server/translation';
const BASE_PATH = appEnv.NEXT_PUBLIC_BASE_PATH;
@@ -22,11 +23,13 @@ export const generateMetadata = async (): Promise => {
title: BRANDING_NAME,
},
description: t('chat.description', { appName: BRANDING_NAME }),
- icons: {
- apple: '/apple-touch-icon.png?v=1',
- icon: '/favicon.ico?v=1',
- shortcut: '/favicon-32x32.ico?v=1',
- },
+ icons: isCustomBranding
+ ? BRANDING_LOGO_URL
+ : {
+ apple: '/apple-touch-icon.png?v=1',
+ icon: '/favicon.ico?v=1',
+ shortcut: '/favicon-32x32.ico?v=1',
+ },
manifest: noManifest ? undefined : '/manifest.json',
metadataBase: new URL(OFFICIAL_URL),
openGraph: {
@@ -53,7 +56,7 @@ export const generateMetadata = async (): Promise => {
card: 'summary_large_image',
description: t('chat.description', { appName: BRANDING_NAME }),
images: [OG_URL],
- site: '@lobehub',
+ site: isCustomORG ? `@${ORG_NAME}` : '@lobehub',
title: t('chat.title', { appName: BRANDING_NAME }),
},
};
diff --git a/src/const/branding.ts b/src/const/branding.ts
index 33d29729af27..65585152d241 100644
--- a/src/const/branding.ts
+++ b/src/const/branding.ts
@@ -8,3 +8,9 @@ export const BRANDING_NAME = 'LobeChat';
export const BRANDING_LOGO_URL = '';
export const ORG_NAME = 'LobeHub';
+
+export const BRANDING_URL = {
+ help: undefined,
+ privacy: undefined,
+ terms: undefined,
+};
diff --git a/src/layout/AuthProvider/Clerk/useAppearance.ts b/src/layout/AuthProvider/Clerk/useAppearance.ts
index 3cc1f069b7c8..ca13a3f1cf17 100644
--- a/src/layout/AuthProvider/Clerk/useAppearance.ts
+++ b/src/layout/AuthProvider/Clerk/useAppearance.ts
@@ -4,6 +4,8 @@ import { dark } from '@clerk/themes';
import { ElementsConfig, Theme } from '@clerk/types';
import { createStyles, useThemeMode } from 'antd-style';
+import { BRANDING_URL } from '@/const/branding';
+
const prefixCls = 'cl';
export const useStyles = createStyles(
@@ -101,10 +103,10 @@ export const useAppearance = () => {
baseTheme: isDarkMode ? dark : undefined,
elements: styles,
layout: {
- helpPageUrl: 'https://lobehub.com/docs',
- privacyPageUrl: 'https://lobehub.com/privacy',
+ helpPageUrl: BRANDING_URL.help ?? 'https://lobehub.com/docs',
+ privacyPageUrl: BRANDING_URL.privacy ?? 'https://lobehub.com/privacy',
socialButtonsVariant: 'blockButton',
- termsPageUrl: 'https://lobehub.com/terms',
+ termsPageUrl: BRANDING_URL.terms ?? 'https://lobehub.com/terms',
},
variables: {
borderRadius: `${theme.borderRadius}px`,