From 92b716f23e08dcecf8160a366476b591706908f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Matias=CC=8Cko?= Date: Fri, 9 Aug 2024 21:58:21 +0200 Subject: [PATCH] Sidebar visibility by service ( API TOKENS ) --- http-gateway/web/packages/shared-ui | 2 +- http-gateway/web/src/containers/App/App.tsx | 3 +++ http-gateway/web/src/routes.tsx | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/http-gateway/web/packages/shared-ui b/http-gateway/web/packages/shared-ui index f408237f9..ed01cd37d 160000 --- a/http-gateway/web/packages/shared-ui +++ b/http-gateway/web/packages/shared-ui @@ -1 +1 @@ -Subproject commit f408237f93fdc3dc24f568541724f9913ea870cb +Subproject commit ed01cd37d7eb832d4748f90567aed398ed434375 diff --git a/http-gateway/web/src/containers/App/App.tsx b/http-gateway/web/src/containers/App/App.tsx index 2e54e3ea4..714a9d22e 100644 --- a/http-gateway/web/src/containers/App/App.tsx +++ b/http-gateway/web/src/containers/App/App.tsx @@ -25,6 +25,7 @@ import AppLayout from '@/containers/App/AppLayout/AppLayout' import { setTheme, setThemes } from './slice' import { CombinedStoreType } from '@/store/store' import { defaultMenu } from '@/routes' +import { updateSidebarVisibility } from '@shared-ui/common/services/sidebar' const App = (props: { mockApp: boolean }) => { const { formatMessage: _ } = useIntl() @@ -52,6 +53,8 @@ const App = (props: { mockApp: boolean }) => { wellKnown.ui = { visibility: { mainSidebar: defaultMenu } } } + wellKnown.ui = updateSidebarVisibility(wellKnown) + const clientId = webOauthClient?.clientId const httpGatewayAddress = wellKnown.httpGatewayAddress const authority = wellKnown.authority diff --git a/http-gateway/web/src/routes.tsx b/http-gateway/web/src/routes.tsx index 34e2e49d5..98d75734c 100644 --- a/http-gateway/web/src/routes.tsx +++ b/http-gateway/web/src/routes.tsx @@ -381,9 +381,7 @@ export const getMenu = (menuConfig: any): MenuGroup[] => [ link: pages.API_TOKENS.LINK, paths: [pages.API_TOKENS.LINK, pages.API_TOKENS.DETAIL], exact: true, - dataTestId: testId.menu.apiTokens, - // visibility: menuConfig.apiTokens === false ? false : 'disabled', - visibility: true, + visibility: menuConfig.apiTokens === false ? false : 'disabled', }, { icon: ,