Merge branch 'Yidadaa:main' into main

This commit is contained in:
Hk-Gosuto 2023-09-20 09:19:21 +08:00 committed by GitHub
commit b0371af295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -967,7 +967,7 @@ function _Chat() {
const isTouchTopEdge = e.scrollTop <= edgeThreshold; const isTouchTopEdge = e.scrollTop <= edgeThreshold;
const isTouchBottomEdge = bottomHeight >= e.scrollHeight - edgeThreshold; const isTouchBottomEdge = bottomHeight >= e.scrollHeight - edgeThreshold;
const isHitBottom = const isHitBottom =
bottomHeight >= e.scrollHeight - (isMobileScreen ? 0 : 10); bottomHeight >= e.scrollHeight - (isMobileScreen ? 4 : 10);
const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE; const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE;
const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE; const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE;

View File

@ -119,7 +119,10 @@ const loadAsyncGoogleFont = () => {
getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl; getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl;
linkEl.rel = "stylesheet"; linkEl.rel = "stylesheet";
linkEl.href = 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); document.head.appendChild(linkEl);
}; };
@ -129,6 +132,8 @@ function Screen() {
const isHome = location.pathname === Path.Home; const isHome = location.pathname === Path.Home;
const isAuth = location.pathname === Path.Auth; const isAuth = location.pathname === Path.Auth;
const isMobileScreen = useMobileScreen(); const isMobileScreen = useMobileScreen();
const shouldTightBorder =
config.tightBorder && !isMobileScreen && !getClientConfig()?.isApp;
useEffect(() => { useEffect(() => {
loadAsyncGoogleFont(); loadAsyncGoogleFont();
@ -138,11 +143,9 @@ function Screen() {
<div <div
className={ className={
styles.container + styles.container +
` ${ ` ${shouldTightBorder ? styles["tight-container"] : styles.container} ${
config.tightBorder && !isMobileScreen getLang() === "ar" ? styles["rtl-screen"] : ""
? styles["tight-container"] }`
: styles.container
} ${getLang() === "ar" ? styles["rtl-screen"] : ""}`
} }
> >
{isAuth ? ( {isAuth ? (