diff --git a/react/src/components/BAIMenu.tsx b/react/src/components/BAIMenu.tsx index 397124b750..36a96fa51c 100644 --- a/react/src/components/BAIMenu.tsx +++ b/react/src/components/BAIMenu.tsx @@ -13,7 +13,6 @@ const BAIMenu: React.FC = ({ ...props }) => { {` .bai-menu li.ant-menu-item.ant-menu-item-selected { overflow: visible; - font-weight: 600; } .bai-menu li.ant-menu-item.ant-menu-item-selected::before { @@ -22,7 +21,6 @@ const BAIMenu: React.FC = ({ ...props }) => { bottom: 0; position: absolute; right: auto; - border-right: 3px solid ${token.colorPrimary}; transform: scaleY(1); opacity: 1; content: ""; @@ -33,7 +31,7 @@ const BAIMenu: React.FC = ({ ...props }) => { theme={{ components: { Menu: { - itemBorderRadius: 2, + itemBorderRadius: 20, itemMarginInline: 0, }, }, diff --git a/react/src/components/BAISider.tsx b/react/src/components/BAISider.tsx index 568a899a62..e532c8e126 100644 --- a/react/src/components/BAISider.tsx +++ b/react/src/components/BAISider.tsx @@ -53,10 +53,27 @@ const BAISider: React.FC = ({ .bai-sider .non-draggable { -webkit-app-region: no-drag; } + .bai-menu li.ant-menu-item.ant-menu-item-selected { + border-radius: 20px; + background-color: #FFE3B7 !important; + } + .bai-menu li.ant-menu-item.ant-menu-item-selected > span.ant-menu-title-content { + color: #FF7A00 !important; + font-weight: normal; + } + .bai-menu li.ant-menu-item.ant-menu-item-selected::before { + width: 0px !important; + } + .bai-menu li.ant-menu-item.ant-menu-item-selected > span.anticon.ant-menu-item-icon { + color: #FF7A00 !important; + } + .bai-menu span.ant-menu-title-content { + color: #333; + } `} = ({ position: 'sticky', top: 0, left: 0, - borderRight: '1px solid', + background: '#FFF', borderColor: token.colorBorder, paddingTop: token.paddingContentVerticalSM, scrollbarColor: 'auto', @@ -86,7 +103,7 @@ const BAISider: React.FC = ({ algorithm: siderTheme === 'dark' ? theme.darkAlgorithm : undefined, }} > - = ({ {otherProps.collapsed ? logoTitleCollapsed : logoTitle} - + */} {children} {bottomText && ( <> diff --git a/react/src/components/MainLayout/MainLayout.tsx b/react/src/components/MainLayout/MainLayout.tsx index c161e72b25..de3c0ae970 100644 --- a/react/src/components/MainLayout/MainLayout.tsx +++ b/react/src/components/MainLayout/MainLayout.tsx @@ -122,16 +122,9 @@ function MainLayout() { } > - { - if (broken) { - setSideCollapsed(true); - } else { - !compactSidebarActive && setSideCollapsed(false); - } - }} - webuiplugins={webUIPlugins} + setSideCollapsed((v) => !v)} + containerElement={contentScrollFlexRef.current} /> } > -
- - setSideCollapsed((v) => !v)} - containerElement={contentScrollFlexRef.current} + + { + if (broken) { + setSideCollapsed(true); + } else { + !compactSidebarActive && setSideCollapsed(false); + } + }} + webuiplugins={webUIPlugins} /> -
+ {/* */} diff --git a/react/src/components/MainLayout/WebUIHeader.tsx b/react/src/components/MainLayout/WebUIHeader.tsx index a69a40f690..504c7a0255 100644 --- a/react/src/components/MainLayout/WebUIHeader.tsx +++ b/react/src/components/MainLayout/WebUIHeader.tsx @@ -1,9 +1,12 @@ +import { useCustomThemeConfig } from '../../helper/customThemeConfig'; import { useCurrentDomainValue } from '../../hooks'; +import { useSuspendedBackendaiClient, useWebUINavigate } from '../../hooks'; import { useCurrentProjectValue, useSetCurrentProject, } from '../../hooks/useCurrentProject'; import { useScrollBreakPoint } from '../../hooks/useScrollBreackPoint'; +import { useThemeMode } from '../../hooks/useThemeMode'; import BAINotificationButton from '../BAINotificationButton'; import Flex, { FlexProps } from '../Flex'; import ProjectSelect from '../ProjectSelect'; @@ -42,6 +45,14 @@ const WebUIHeader: React.FC = ({ containerElement, ); const gridBreakpoint = Grid.useBreakpoint(); + const themeConfig = useCustomThemeConfig(); + const webuiNavigate = useWebUINavigate(); + const { isDarkMode } = useThemeMode(); + const mergedSiderTheme = themeConfig?.sider?.theme + ? themeConfig.sider.theme + : isDarkMode + ? 'dark' + : 'light'; const { md } = Grid.useBreakpoint(); @@ -59,55 +70,66 @@ const WebUIHeader: React.FC = ({ height: HEADER_HEIGHT, paddingRight: token.marginMD, paddingLeft: token.marginMD, - backgroundColor: scrolled ? token.colorBgElevated : 'transparent', + backgroundColor: token.colorFillContent, boxShadow: scrolled ? `0 5px 6px -6px ${token.colorBorder}` : 'none', transition: 'background-color 0.2s ease-in-out', }} className={'webui-header-container'} > - -