1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(system/upgrade): add upgrade banner [EE-4564] (#8046)

This commit is contained in:
Chaim Lev-Ari 2022-11-16 18:38:39 +02:00 committed by GitHub
parent c21921a08d
commit eccc8131dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 366 additions and 33 deletions

View file

@ -13,6 +13,7 @@ import { SidebarItem } from './SidebarItem';
import { Footer } from './Footer';
import { Header } from './Header';
import { SidebarProvider } from './useSidebarState';
import { UpgradeBEBanner } from './UpgradeBEBanner';
export function Sidebar() {
const { isAdmin, user } = useUser();
@ -29,31 +30,35 @@ export function Sidebar() {
return (
/* in the future (when we remove r2a) this should wrap the whole app - to change root styles */
<SidebarProvider>
<nav className={clsx(styles.root, 'p-5 flex flex-col')} aria-label="Main">
<Header logo={LogoURL} />
{/* negative margin + padding -> scrollbar won't hide the content */}
<div className="mt-6 overflow-y-auto flex-1 -mr-4 pr-4">
<ul className="space-y-9">
<SidebarItem
to="portainer.home"
icon={Home}
label="Home"
data-cy="portainerSidebar-home"
/>
<EnvironmentSidebar />
{isAdmin && EnableEdgeComputeFeatures && <EdgeComputeSidebar />}
<SettingsSidebar isAdmin={isAdmin} isTeamLeader={isTeamLeader} />
</ul>
</div>
<div className="mt-auto pt-8">
<Footer />
</div>
</nav>
<div className={clsx(styles.root, 'flex flex-col')}>
<UpgradeBEBanner />
<nav
className={clsx(
styles.nav,
'p-5 flex flex-col flex-1 overflow-y-auto'
)}
aria-label="Main"
>
<Header logo={LogoURL} />
{/* negative margin + padding -> scrollbar won't hide the content */}
<div className="mt-6 overflow-y-auto flex-1 -mr-4 pr-4">
<ul className="space-y-9">
<SidebarItem
to="portainer.home"
icon={Home}
label="Home"
data-cy="portainerSidebar-home"
/>
<EnvironmentSidebar />
{isAdmin && EnableEdgeComputeFeatures && <EdgeComputeSidebar />}
<SettingsSidebar isAdmin={isAdmin} isTeamLeader={isTeamLeader} />
</ul>
</div>
<div className="mt-auto pt-8">
<Footer />
</div>
</nav>
</div>
</SidebarProvider>
);
}