diff --git a/src/components/version-info/index.less b/src/components/version-info/index.less index 6e028d72..1033526f 100644 --- a/src/components/version-info/index.less +++ b/src/components/version-info/index.less @@ -22,6 +22,7 @@ } .ver { + margin-bottom: 20px; line-height: 32px; display: flex; justify-content: center; @@ -53,7 +54,6 @@ .upgrade { display: flex; - margin-top: 20px; justify-content: space-between; padding-block: 20px 4px; align-items: center; diff --git a/src/global.less b/src/global.less index e6821c31..c6646c9f 100644 --- a/src/global.less +++ b/src/global.less @@ -171,6 +171,10 @@ body { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; + &::-webkit-scrollbar { + width: 0; + } + .ant-modal-confirm-title { display: none; } diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 0744ca6a..f09954ff 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -24,6 +24,7 @@ import { } from '@umijs/max'; import { Button, Modal } from 'antd'; import { useAtom } from 'jotai'; +import 'overlayscrollbars/overlayscrollbars.css'; import { useCallback, useEffect, useMemo, useState } from 'react'; import Exception from './Exception'; import './Layout.css'; @@ -89,7 +90,7 @@ const mapRoutes = (routes: IRoute[], role: string) => { }; export default (props: any) => { - const { initialize } = useOverlayScroller(); + const { initialize: initialize } = useOverlayScroller(); const { initialize: initializeMenu } = useOverlayScroller(); const [userInfo] = useAtom(userAtom); const [version] = useAtom(GPUStackVersionAtom); @@ -185,13 +186,19 @@ export default (props: any) => { }, [updateCheck, version, initialState]); useEffect(() => { - initialize(document.body); + const body = document.querySelector('body'); + if (body) { + initialize(body); + } }, [initialize]); useEffect(() => { - initializeMenu( - document.querySelector('.ant-menu.ant-menu-root')?.parentElement - ); + const menuWrap = document.querySelector( + '.ant-menu.ant-menu-root' + )?.parentElement; + if (menuWrap) { + initializeMenu(menuWrap); + } }, [initializeMenu]); const renderMenuHeader = useCallback( diff --git a/src/pages/playground/style/ground-left.less b/src/pages/playground/style/ground-left.less index 130f1f44..875b76a2 100644 --- a/src/pages/playground/style/ground-left.less +++ b/src/pages/playground/style/ground-left.less @@ -11,6 +11,10 @@ padding-top: 16px; overflow-y: auto; + &::-webkit-scrollbar { + width: 0; + } + .box { width: 390px; padding-inline: var(--layout-content-inlinepadding); diff --git a/src/pages/resources/components/gpus.tsx b/src/pages/resources/components/gpus.tsx index 9cc93b39..e1df1b50 100644 --- a/src/pages/resources/components/gpus.tsx +++ b/src/pages/resources/components/gpus.tsx @@ -200,7 +200,14 @@ const GPUList: React.FC = () => { render={(text, record: GPUDeviceItem) => { return ( diff --git a/src/pages/resources/components/workers.tsx b/src/pages/resources/components/workers.tsx index 32e2be36..66fb6ccf 100644 --- a/src/pages/resources/components/workers.tsx +++ b/src/pages/resources/components/workers.tsx @@ -454,7 +454,16 @@ const Resources: React.FC = () => {