feat(side config): add SITE_TITLE,SITE_DESCRIPTION and SITE_LOGO_URL as environment variable

This commit is contained in:
chenxc
2024-07-15 13:53:32 +08:00
parent a7894a77d0
commit 92a00c5cca
7 changed files with 40 additions and 29 deletions

View File

@@ -40,6 +40,7 @@ import { EXPORT_MESSAGE_CLASS_NAME } from "../constant";
import { getClientConfig } from "../config/client";
import { type ClientApi, getClientApi } from "../client/api";
import { getMessageTextContent } from "../utils";
import { getServerSideConfig } from "@/app/config/server";
const Markdown = dynamic(async () => (await import("./markdown")).Markdown, {
loading: () => <LoadingIcon />,
@@ -515,7 +516,7 @@ export function ImagePreviewer(props: {
dom.innerHTML = dom.innerHTML; // Refresh the content of the preview by resetting its HTML for fix a bug glitching
}
};
const { siteTitle, siteDescription } = getServerSideConfig();
return (
<div className={styles["image-previewer"]}>
<PreviewActions
@@ -539,10 +540,8 @@ export function ImagePreviewer(props: {
</div>
<div>
<div className={styles["main-title"]}>NextChat</div>
<div className={styles["sub-title"]}>
github.com/Yidadaa/ChatGPT-Next-Web
</div>
<div className={styles["main-title"]}>{siteTitle}</div>
<div className={styles["sub-title"]}>{siteDescription}</div>
<div className={styles["icons"]}>
<ExportAvatar avatar={config.avatar} />
<span className={styles["icon-space"]}>&</span>