diff --git a/app/components/home.module.scss b/app/components/home.module.scss index 764805d80..15cae9080 100644 --- a/app/components/home.module.scss +++ b/app/components/home.module.scss @@ -218,6 +218,7 @@ flex: 1; overflow: auto; padding: 20px; + background-color: var(--white); } .chat-body-title { diff --git a/app/components/home.tsx b/app/components/home.tsx index 2f09aa273..14efeae9d 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -20,6 +20,7 @@ import MenuIcon from "../icons/menu.svg"; import CloseIcon from "../icons/close.svg"; import CopyIcon from "../icons/copy.svg"; import DownloadIcon from "../icons/download.svg"; +import ExportImage from "../icons/export-image.svg"; import { Message, SubmitKey, useChatStore, ChatSession } from "../store"; import { showModal, showToast } from "./ui-lib"; @@ -36,6 +37,7 @@ import dynamic from "next/dynamic"; import { REPO_URL } from "../constant"; import { ControllerPool } from "../requests"; import { Prompt, usePromptStore } from "../store/prompt"; +import { toPng } from "html-to-image"; export function Loading(props: { noLogo?: boolean }) { return ( @@ -341,6 +343,9 @@ export function Chat(props: { }, 500); }); + //export image + const [exportImageLoading, setExportImageLoading] = useState(false); + return (