&
diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx
index c68aacccf..13d22a118 100644
--- a/app/components/sidebar.tsx
+++ b/app/components/sidebar.tsx
@@ -140,7 +140,7 @@ export function SideBar(props: { className?: string }) {
() => isIOS() && isMobileScreen,
[isMobileScreen],
);
- const serverConfig = getServerSideConfig();
+ const { siteTitle, siteDescription, siteLogURL } = getServerSideConfig();
useHotKey();
return (
@@ -155,13 +155,15 @@ export function SideBar(props: { className?: string }) {
>
- {serverConfig.sidebarTitle}
-
-
- {serverConfig.sidebarSubTitle}
+ {siteTitle}
+
{siteDescription}
-
+ {!!siteLogURL ? (
+

+ ) : (
+
+ )}
diff --git a/app/config/server.ts b/app/config/server.ts
index fc6de1157..8ad8a4bf9 100644
--- a/app/config/server.ts
+++ b/app/config/server.ts
@@ -56,10 +56,11 @@ declare global {
// custom template for preprocessing user input
DEFAULT_INPUT_TEMPLATE?: string;
- // custom sidebar title
- SIDEBAR_TITLE?: string;
- // custom sidebar sub-title
- SIDEBAR_SUB_TITLE?: string;
+ // custom site title
+ SITE_TITLE?: string;
+ // custom site description
+ SITE_DESCRIPTION?: string;
+ SITE_LOGO_URL?: string;
}
}
}
@@ -129,10 +130,11 @@ export const getServerSideConfig = () => {
const allowedWebDevEndpoints = (
process.env.WHITE_WEBDEV_ENDPOINTS ?? ""
).split(",");
- // custom title
- const sidebarTitle = process.env.SIDEBAR_TITLE ?? "NextChat";
- const sidebarSubTitle =
- process.env.SIDEBAR_SUB_TITLE ?? "Build your own AI assistant.";
+ // custom site
+ const siteTitle = process.env.SITE_TITLE ?? "NextChat";
+ const siteDescription =
+ process.env.SITE_DESCRIPTION ?? "Build your own AI assistant.";
+ const siteLogURL = process.env.SITE_LOGO_URL ?? "";
return {
baseUrl: process.env.BASE_URL,
apiKey: getApiKey(process.env.OPENAI_API_KEY),
@@ -181,7 +183,8 @@ export const getServerSideConfig = () => {
customModels,
defaultModel,
allowedWebDevEndpoints,
- sidebarTitle,
- sidebarSubTitle,
+ siteTitle,
+ siteDescription,
+ siteLogURL,
};
};
diff --git a/app/layout.tsx b/app/layout.tsx
index 637b4556b..787158cca 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -10,10 +10,10 @@ import { GoogleTagManager } from "@next/third-parties/google";
const serverConfig = getServerSideConfig();
export const metadata: Metadata = {
- title: "NextChat",
+ title: serverConfig.siteTitle,
description: "Your personal ChatGPT Chat Bot.",
appleWebApp: {
- title: "NextChat",
+ title: serverConfig.siteTitle,
statusBarStyle: "default",
},
};
@@ -37,7 +37,10 @@ export default function RootLayout({
-
+
diff --git a/app/store/update.ts b/app/store/update.ts
index 7253caffc..a3f02aa24 100644
--- a/app/store/update.ts
+++ b/app/store/update.ts
@@ -11,9 +11,11 @@ import Locale from "../locales";
import { use } from "react";
import { useAppConfig } from ".";
import { ClientApi } from "../client/api";
+import { getServerSideConfig } from "@/app/config/server";
const ONE_MINUTE = 60 * 1000;
const isApp = !!getClientConfig()?.isApp;
+const serverConfig = getServerSideConfig();
function formatVersionDate(t: string) {
const d = new Date(+t);
@@ -106,7 +108,7 @@ export const useUpdateStore = createPersistStore(
if (version === remoteId) {
// Show a notification using Tauri
window.__TAURI__?.notification.sendNotification({
- title: "NextChat",
+ title: `${serverConfig.siteTitle}`,
body: `${Locale.Settings.Update.IsLatest}`,
icon: `${ChatGptIcon.src}`,
sound: "Default",
@@ -116,7 +118,7 @@ export const useUpdateStore = createPersistStore(
Locale.Settings.Update.FoundUpdate(`${remoteId}`);
// Show a notification for the new version using Tauri
window.__TAURI__?.notification.sendNotification({
- title: "NextChat",
+ title: `${serverConfig.siteTitle}`,
body: updateMessage,
icon: `${ChatGptIcon.src}`,
sound: "Default",