From 083ea28a1f7db00fc1d17c89ecdc401b1b5ebe2f Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Tue, 3 Sep 2024 16:41:20 +0200 Subject: [PATCH] feat: Add help dropdown menu --- .../DashboardTopbar/DashboardTopbar.tsx | 55 +++++++++++++++++-- packages/webapp/src/constants/routes.ts | 2 + packages/webapp/src/static/json/icons.tsx | 6 ++ 3 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 packages/webapp/src/constants/routes.ts diff --git a/packages/webapp/src/components/Dashboard/DashboardTopbar/DashboardTopbar.tsx b/packages/webapp/src/components/Dashboard/DashboardTopbar/DashboardTopbar.tsx index 549785a87..02eee52ea 100644 --- a/packages/webapp/src/components/Dashboard/DashboardTopbar/DashboardTopbar.tsx +++ b/packages/webapp/src/components/Dashboard/DashboardTopbar/DashboardTopbar.tsx @@ -9,7 +9,12 @@ import { Classes, Tooltip, Position, + MenuItem, + Menu, + MenuDivider, } from '@blueprintjs/core'; +import { Popover2 } from '@blueprintjs/popover2'; + import { FormattedMessage as T, Icon, Hint, If } from '@/components'; import DashboardTopbarUser from '@/components/Dashboard/TopbarUser'; @@ -19,9 +24,20 @@ import DashboardBackLink from '@/components/Dashboard/DashboardBackLink'; import withUniversalSearchActions from '@/containers/UniversalSearch/withUniversalSearchActions'; import withDashboardActions from '@/containers/Dashboard/withDashboardActions'; import withDashboard from '@/containers/Dashboard/withDashboard'; +import withDialogActions from '@/containers/Dialog/withDialogActions'; import QuickNewDropdown from '@/containers/QuickNewDropdown/QuickNewDropdown'; -import { DashboardHamburgerButton, DashboardQuickSearchButton } from './_components'; +import { + DashboardHamburgerButton, + DashboardQuickSearchButton, +} from './_components'; + +import { DialogsName } from '@/constants/dialogs'; +import { + COMMUNITY_BIGCAPITAL_LINK, + DOCS_BIGCAPITAL_LINK, +} from '@/constants/routes'; + import { compose } from '@/utils'; /** @@ -41,6 +57,9 @@ function DashboardTopbar({ // #withGlobalSearch openGlobalSearch, + + // #withDialogActions + openDialog, }) { const history = useHistory(); @@ -112,11 +131,34 @@ function DashboardTopbar({ /> -