mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-08 02:56:39 +08:00
Merge branch 'main' into hidebutton
This commit is contained in:
commit
dedfff1ce0
@ -209,6 +209,7 @@ export function Artifacts() {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [fileName, setFileName] = useState("");
|
||||
const previewRef = useRef<HTMLPreviewHander>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (id) {
|
||||
fetch(`${ApiPath.Artifacts}?id=${id}`)
|
||||
@ -251,6 +252,7 @@ export function Artifacts() {
|
||||
{code && (
|
||||
<HTMLPreview
|
||||
code={code}
|
||||
ref={previewRef}
|
||||
autoHeight={false}
|
||||
height={"100%"}
|
||||
ref={previewRef}
|
||||
|
@ -8,7 +8,7 @@ import RehypeHighlight from "rehype-highlight";
|
||||
import { useRef, useState, RefObject, useEffect, useMemo } from "react";
|
||||
import { copyToClipboard, useWindowSize } from "../utils";
|
||||
import mermaid from "mermaid";
|
||||
|
||||
import Locale from "../locales";
|
||||
import LoadingIcon from "../icons/three-dots.svg";
|
||||
import ReloadButtonIcon from "../icons/reload.svg";
|
||||
import React from "react";
|
||||
@ -199,7 +199,7 @@ function CustomCode(props: { children: any }) {
|
||||
<div
|
||||
className={`show-hide-button ${collapsed ? "collapsed" : "expanded"}`}
|
||||
>
|
||||
<button onClick={toggleCollapsed}>查看全部</button>
|
||||
<button onClick={toggleCollapsed}>{Locale.NewChat.More}</button>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
@ -304,7 +304,7 @@ pre {
|
||||
}
|
||||
}
|
||||
|
||||
pre{
|
||||
pre{
|
||||
.show-hide-button {
|
||||
border-radius: 10px;
|
||||
position: absolute;
|
||||
|
Loading…
Reference in New Issue
Block a user