diff --git a/src/components/Option/Sidebar.tsx b/src/components/Option/Sidebar.tsx index d2cb7a6..48d99c4 100644 --- a/src/components/Option/Sidebar.tsx +++ b/src/components/Option/Sidebar.tsx @@ -149,7 +149,7 @@ export const Sidebar = ({ const db = new PageAssitDatabase() const history = await db.getChatHistory(chat.id) setHistoryId(chat.id) - setCurrentMessageId() + setCurrentMessageId("") setHistory(formatToChatHistory(history)) setMessages(formatToMessage(history)) stopStreamingRequest() diff --git a/src/components/Option/VideoPlayer/index.tsx b/src/components/Option/VideoPlayer/index.tsx index 29e496c..b647823 100644 --- a/src/components/Option/VideoPlayer/index.tsx +++ b/src/components/Option/VideoPlayer/index.tsx @@ -1,5 +1,5 @@ -import React, { useEffect, useRef, useState } from "react" -import iodVideo from "@/assets/video.mp4" +import React, { useEffect, useMemo, useRef, useState } from "react" +import iodVideo from "@/public/video.mp4" import { useOptionLayoutContext } from "@/components/Layouts/Layout.tsx" import { ExpandOutlined, @@ -313,6 +313,11 @@ const VideoPlayer = () => { // 计算进度条百分比 const progressPercent = duration ? (currentTime / duration) * 100 : 0 + // 是否隐藏logo + const hideLogo = useMemo(() => { + return localStorage.getItem("hideLogo") === "true" + }, []) + return (
{
)} - {/* 控制栏 - 使用与原始HTML相同的类名和行为 */}
-
- {logo} +
+ {!hideLogo && logo}

数联网科创智能体

@@ -368,7 +374,7 @@ const VideoPlayer = () => { className="bg-transparent border-none text-white text-lg cursor-pointer p-1 rounded-full w-12 h-12 flex items-center justify-center hover:bg-white hover:bg-opacity-20 transition-colors" onClick={togglePlayPause}> {isPlaying ? ( - + ) : ( )} diff --git a/src/assets/video.mp4 b/src/public/video.mp4 similarity index 100% rename from src/assets/video.mp4 rename to src/public/video.mp4