mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-17 16:56:37 +08:00
feat: 更新网络配置管理,修复主题切换时的网络状态逻辑
This commit is contained in:
parent
86f2c67784
commit
9cb7275703
@ -512,7 +512,7 @@ export function ChatActions(props: {
|
|||||||
|
|
||||||
// switch themes
|
// switch themes
|
||||||
const theme = config.theme;
|
const theme = config.theme;
|
||||||
const enableNetWork = config.modelConfig.enableNetWork;
|
const enableNetWork = session.mask.modelConfig.enableNetWork || false;
|
||||||
|
|
||||||
function nextTheme() {
|
function nextTheme() {
|
||||||
const themes = [Theme.Auto, Theme.Light, Theme.Dark];
|
const themes = [Theme.Auto, Theme.Light, Theme.Dark];
|
||||||
@ -523,10 +523,10 @@ export function ChatActions(props: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function nextNetWork() {
|
function nextNetWork() {
|
||||||
config.update(
|
chatStore.updateTargetSession(session, (session) => {
|
||||||
(config) =>
|
session.mask.modelConfig.enableNetWork =
|
||||||
(config.modelConfig.enableNetWork = !config.modelConfig.enableNetWork),
|
!session.mask.modelConfig.enableNetWork;
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop all responses
|
// stop all responses
|
||||||
|
Loading…
Reference in New Issue
Block a user