From 37b49400db0358c9eeb1d63c8843b405097c869e Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Tue, 19 Sep 2023 11:03:03 +0800 Subject: [PATCH 1/5] Update constant.ts --- app/constant.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/constant.ts b/app/constant.ts index c6cba3ef0a8..9e23ed510e4 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -8,7 +8,7 @@ export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/c export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`; export const RUNTIME_CONFIG_DOM = "danger-runtime-config"; -export const DEFAULT_CORS_HOST = "https://chatgpt2.nextweb.fun"; +export const DEFAULT_CORS_HOST = "https://nb.nextweb.fun"; export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`; export enum Path { From b050417ab1caf4d2c5da99039f57c84712559648 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Tue, 19 Sep 2023 11:03:22 +0800 Subject: [PATCH 2/5] Update tauri.conf.json --- src-tauri/tauri.conf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d8b677bf6a0..77b02a3bae8 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "ChatGPT Next Web", - "version": "2.9.6" + "version": "2.9.7" }, "tauri": { "allowlist": { From 175b4e7f92abba782bdd2561c5e479bc315d6d9f Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Tue, 19 Sep 2023 11:04:10 +0800 Subject: [PATCH 3/5] Update README_CN.md --- README_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index e593e45da9c..b31e8b367ee 100644 --- a/README_CN.md +++ b/README_CN.md @@ -114,7 +114,7 @@ OpenAI 接口代理 URL,如果你手动配置了 openai 接口代理,请填 OPENAI_API_KEY= # 中国大陆用户,可以使用本项目自带的代理进行开发,你也可以自由选择其他代理地址 -BASE_URL=https://chatgpt2.nextweb.fun/api/proxy +BASE_URL=https://nb.nextweb.fun/api/proxy ``` ### 本地开发 From eae7d6260f6d0968a59a07576bd86937b12a673a Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Tue, 19 Sep 2023 23:26:52 +0800 Subject: [PATCH 4/5] fix: should not tight border in desktop app --- app/components/home.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/components/home.tsx b/app/components/home.tsx index 285ca0f5852..07d5e88b373 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -115,7 +115,10 @@ const loadAsyncGoogleFont = () => { getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl; linkEl.rel = "stylesheet"; linkEl.href = - googleFontUrl + "/css2?family=" + encodeURIComponent("Noto Sans:wght@300;400;700;900") + "&display=swap"; + googleFontUrl + + "/css2?family=" + + encodeURIComponent("Noto Sans:wght@300;400;700;900") + + "&display=swap"; document.head.appendChild(linkEl); }; @@ -125,6 +128,8 @@ function Screen() { const isHome = location.pathname === Path.Home; const isAuth = location.pathname === Path.Auth; const isMobileScreen = useMobileScreen(); + const shouldTightBorder = + config.tightBorder && !isMobileScreen && !getClientConfig()?.isApp; useEffect(() => { loadAsyncGoogleFont(); @@ -134,11 +139,9 @@ function Screen() {
{isAuth ? ( From 26e50cefea3afe79ef98cef951ef404d077aaf3d Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Wed, 20 Sep 2023 02:09:14 +0800 Subject: [PATCH 5/5] Update chat.tsx --- app/components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 6fb497303eb..4e6aedecc60 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -937,7 +937,7 @@ function _Chat() { const isTouchTopEdge = e.scrollTop <= edgeThreshold; const isTouchBottomEdge = bottomHeight >= e.scrollHeight - edgeThreshold; const isHitBottom = - bottomHeight >= e.scrollHeight - (isMobileScreen ? 0 : 10); + bottomHeight >= e.scrollHeight - (isMobileScreen ? 4 : 10); const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE; const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE;