From eae7d6260f6d0968a59a07576bd86937b12a673a Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Tue, 19 Sep 2023 23:26:52 +0800 Subject: [PATCH 1/3] 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 285ca0f58..07d5e88b3 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 2/3] 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 6fb497303..4e6aedecc 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; From 23eb7732d7011ce9476ab6309c92509e094fca81 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Wed, 20 Sep 2023 17:47:35 +0800 Subject: [PATCH 3/3] feat: support more http status check for webdav --- app/utils/cloud/webdav.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/cloud/webdav.ts b/app/utils/cloud/webdav.ts index c87fdd71e..3a1553c10 100644 --- a/app/utils/cloud/webdav.ts +++ b/app/utils/cloud/webdav.ts @@ -21,7 +21,7 @@ export function createWebDavClient(store: SyncStore) { proxyUrl, }); console.log("[WebDav] check", res.status, res.statusText); - return [201, 200, 404, 401].includes(res.status); + return [201, 200, 404, 301, 302, 307, 308].includes(res.status); } catch (e) { console.error("[WebDav] failed to check", e); }