2022-08-12 01:27:30 +00:00
|
|
|
import { PropsWithChildren } from 'react';
|
|
|
|
import clsx from 'clsx';
|
|
|
|
|
2022-11-13 08:10:18 +00:00
|
|
|
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
2022-08-12 01:27:30 +00:00
|
|
|
|
|
|
|
import { UpdateNotification } from './UpdateNotifications';
|
|
|
|
import { BuildInfoModalButton } from './BuildInfoModal';
|
|
|
|
import '@reach/dialog/styles.css';
|
|
|
|
import styles from './Footer.module.css';
|
|
|
|
import Logo from './portainer_logo.svg?c';
|
|
|
|
|
|
|
|
export function Footer() {
|
|
|
|
return isBE ? <BEFooter /> : <CEFooter />;
|
|
|
|
}
|
|
|
|
|
|
|
|
function CEFooter() {
|
|
|
|
return (
|
|
|
|
<div className={clsx(styles.root, 'text-center')}>
|
|
|
|
<UpdateNotification />
|
|
|
|
|
|
|
|
<FooterContent>
|
2022-11-20 20:22:41 +00:00
|
|
|
<Logo width="90px" height="100%" />
|
2022-08-12 01:27:30 +00:00
|
|
|
<span>Community Edition</span>
|
|
|
|
|
|
|
|
<BuildInfoModalButton />
|
|
|
|
</FooterContent>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function BEFooter() {
|
|
|
|
return (
|
|
|
|
<div className={clsx(styles.root, 'text-center')}>
|
|
|
|
<FooterContent>
|
|
|
|
<span>©</span>
|
|
|
|
<span>Portainer Business Edition</span>
|
|
|
|
|
|
|
|
<BuildInfoModalButton />
|
|
|
|
</FooterContent>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function FooterContent({ children }: PropsWithChildren<unknown>) {
|
|
|
|
return (
|
2023-02-12 21:04:24 +00:00
|
|
|
<div className="mx-auto flex items-center justify-center space-x-1 text-[10px] text-gray-5 be:text-gray-6">
|
2022-08-12 01:27:30 +00:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|