diff --git a/src/app/AppLayout/AppLayout.css b/src/app/AppLayout/AppLayout.css new file mode 100644 index 00000000..28cb96d7 --- /dev/null +++ b/src/app/AppLayout/AppLayout.css @@ -0,0 +1,19 @@ +#primary-app-container { + z-index: var(--pf-v5-c-page__sidebar--ZIndex); +} + +.ws-full-page-utils { + position: fixed; + right: 0; + bottom: 0; + padding: var(--pf-v5-global--spacer--lg); +} + +.ws-full-page-utils::before { + position: absolute; + inset: 0; + content: ""; + background-color: var(--pf-v5-global--BackgroundColor--100); + opacity: 0.8; + box-shadow: var(--pf-v5-global--BoxShadow--sm); +} diff --git a/src/app/AppLayout/AppLayout.tsx b/src/app/AppLayout/AppLayout.tsx index aa72a3af..855d36ec 100644 --- a/src/app/AppLayout/AppLayout.tsx +++ b/src/app/AppLayout/AppLayout.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { NavLink, useLocation } from 'react-router-dom'; import { Button, + Flex, Icon, Masthead, MastheadBrand, @@ -28,6 +29,7 @@ import { IAppRoute, IAppRouteGroup, routes } from '@app/routes'; import { BarsIcon } from '@patternfly/react-icons'; import MoonIcon from '@patternfly/react-icons/dist/esm/icons/moon-icon'; import SunIcon from '@patternfly/react-icons/dist/esm/icons/sun-icon'; +import './AppLayout.css'; interface IAppLayout { children: React.ReactNode; @@ -102,45 +104,6 @@ const AppLayout: React.FunctionComponent = ({ children }) => { - - - - - - - - - - } - isSelected={!isDarkTheme} - onChange={toggleDarkTheme} - /> - - - - } - isSelected={isDarkTheme} - onChange={toggleDarkTheme} - /> - - - - toggleRTL()} /> - - - - - ); @@ -199,6 +162,22 @@ const AppLayout: React.FunctionComponent = ({ children }) => { return ( {children} + + document!.querySelector('html')!.classList.toggle('pf-v5-theme-dark')} + /> + { + const html = document.querySelector('html'); + const curDir = html!.dir; + html!.dir = curDir !== 'rtl' ? 'rtl' : 'ltr'; + }} + /> + ); };