diff --git a/README.md b/README.md index 8cacd296..88965f68 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ 13. 🎵 添加 [Suno API](https://github.com/Suno-API/Suno-API)接口支持,[对接文档](Suno.md) 14. 🔄 支持Rerank模型,目前兼容Cohere和Jina,可接入Dify,[对接文档](Rerank.md) 15. ⚡ **[OpenAI Realtime API](https://platform.openai.com/docs/guides/realtime/integration)** - 支持OpenAI的Realtime API,支持Azure渠道 +16. 支持使用路由/chat2link 进入聊天界面 ## 模型支持 此版本额外支持以下模型: diff --git a/web/src/components/HeaderBar.js b/web/src/components/HeaderBar.js index d885d59b..8884d21b 100644 --- a/web/src/components/HeaderBar.js +++ b/web/src/components/HeaderBar.js @@ -14,6 +14,7 @@ import { IconHelpCircle, IconHome, IconHomeStroked, IconIndentLeft, + IconComment, IconKey, IconMenu, IconNoteMoneyStroked, IconPriceTag, @@ -87,16 +88,27 @@ const HeaderBar = () => { useEffect(() => { if (theme === 'dark') { document.body.setAttribute('theme-mode', 'dark'); + } else { + document.body.removeAttribute('theme-mode'); + } + // 发送当前主题模式给子页面 + const iframe = document.querySelector('iframe'); + if (iframe) { + iframe.contentWindow.postMessage({ themeMode: theme }, '*'); } if (isNewYear) { console.log('Happy New Year!'); } - }, []); + }, [theme]); useEffect(() => { const handleLanguageChanged = (lng) => { setCurrentLang(lng); + const iframe = document.querySelector('iframe'); + if (iframe) { + iframe.contentWindow.postMessage({ lang: lng }, '*'); + } }; i18n.on('languageChanged', handleLanguageChanged); @@ -125,6 +137,7 @@ const HeaderBar = () => { pricing: '/pricing', detail: '/detail', home: '/', + chat: '/chat', }; return (