fix: custom logos

This commit is contained in:
jialin
2026-04-27 21:10:34 +08:00
committed by jialin
parent 519020077a
commit e4992e8313
20 changed files with 12081 additions and 3320 deletions
+1 -28
View File
@@ -39,7 +39,7 @@ import {
import { Button, ConfigProvider, Modal, theme } from 'antd';
import { useAtom } from 'jotai';
import 'overlayscrollbars/overlayscrollbars.css';
import { useEffect, useMemo, useRef } from 'react';
import { useMemo, useRef } from 'react';
import { PageContainerInner } from '../pages/_components/page-box';
import Exception from './Exception';
import './Layout.css';
@@ -227,32 +227,6 @@ export default (props: any) => {
return NO_CONTAINER_PAGES.includes(matchedRoute?.name as string);
}, [matchedRoute]);
useEffect(() => {
const initializeScroller = () => {
// const body = document.querySelector('.ant-pro-grid-content-children');
// if (body) {
// const ins = initialize(body);
// window.__GPUSTACK_BODY_SCROLLER__ = ins;
// return true;
// }
// return false;
return true;
};
// Try to initialize immediately
if (!initializeScroller()) {
// If element not found, retry with requestAnimationFrame
const rafId = requestAnimationFrame(() => {
if (!initializeScroller()) {
// If still not found, retry after a short delay
const timeoutId = setTimeout(initializeScroller, 100);
return () => clearTimeout(timeoutId);
}
});
return () => cancelAnimationFrame(rafId);
}
}, [initialize]);
const collapsed = useMemo(() => {
return userSettings.collapsed || false;
}, [userSettings.collapsed]);
@@ -346,7 +320,6 @@ export default (props: any) => {
return (
<ConfigProvider
componentSize="large"
key={userSettings.colorPrimary}
theme={{
algorithm: userSettings.isDarkTheme
? theme.darkAlgorithm