diff --git a/main.js b/main.js index 9990293550..6ebf3d7ded 100644 --- a/main.js +++ b/main.js @@ -328,7 +328,7 @@ function createWindow() { height: windowHeight, title: 'Backend.AI', frame: true, - titleBarStyle: 'hiddenInset', + titleBarStyle: 'customButtonsOnHover', webPreferences: { nativeWindowOpen: true, nodeIntegration: false, diff --git a/react/package.json b/react/package.json index f6f87cb828..d9eec91688 100644 --- a/react/package.json +++ b/react/package.json @@ -26,6 +26,7 @@ "ansi_up": "^6.0.2", "antd": "^5.20.0", "antd-style": "^3.6.2", + "classnames": "^2.5.1", "dayjs": "^1.11.12", "graphql": "^16.9.0", "i18next": "^23.12.2", diff --git a/react/pnpm-lock.yaml b/react/pnpm-lock.yaml index acb99c74f8..4483bdb2cd 100644 --- a/react/pnpm-lock.yaml +++ b/react/pnpm-lock.yaml @@ -77,6 +77,9 @@ importers: antd-style: specifier: ^3.6.2 version: 3.6.2(@types/react@18.3.3)(antd@5.20.0(date-fns@2.30.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + classnames: + specifier: ^2.5.1 + version: 2.5.1 dayjs: specifier: ^1.11.12 version: 1.11.12 diff --git a/react/src/components/BAIMenu.tsx b/react/src/components/BAIMenu.tsx index 397124b750..480d50cce7 100644 --- a/react/src/components/BAIMenu.tsx +++ b/react/src/components/BAIMenu.tsx @@ -1,56 +1,29 @@ -import { ConfigProvider, Menu, MenuProps, theme } from 'antd'; +import { ConfigProvider, Menu, MenuProps } from 'antd'; import React from 'react'; -// interface BAIMenuProps extends MenuProps { - -// } - const BAIMenu: React.FC = ({ ...props }) => { - const { token } = theme.useToken(); return ( - <> - - + - - - + // mode="" + {...props} + className="bai-menu" + /> + ); }; diff --git a/react/src/components/BAINotificationButton.tsx b/react/src/components/BAINotificationButton.tsx index 453c10efcb..2cbd2905e0 100644 --- a/react/src/components/BAINotificationButton.tsx +++ b/react/src/components/BAINotificationButton.tsx @@ -10,10 +10,15 @@ import { atom, useAtom } from 'jotai'; import _ from 'lodash'; import React, { useEffect } from 'react'; -interface Props extends ButtonProps {} +interface Props extends ButtonProps { + buttonRender?: (defaultButton: React.ReactNode) => React.ReactNode; +} export const isOpenDrawerState = atom(false); -const BAINotificationButton: React.FC = ({ ...props }) => { +const BAINotificationButton: React.FC = ({ + buttonRender = (btn) => btn, + ...props +}) => { const [notifications, { upsertNotification }] = useBAINotificationState(); useBAINotificationEffect(); @@ -33,17 +38,18 @@ const BAINotificationButton: React.FC = ({ ...props }) => { }); return ( <> - + +