/* * Copyright (c) 2020 - present Cloudogu GmbH * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see https://www.gnu.org/licenses/. */ import React, { FC } from "react"; import { Feedback, Links, Me } from "@scm-manager/ui-types"; import { useIndex } from "@scm-manager/ui-api"; import { ExtensionPoint, extensionPoints, useBinder } from "@scm-manager/ui-extensions"; import { AvatarImage } from "../avatar"; import NavLink from "../navigation/NavLink"; import FooterSection from "./FooterSection"; import styled from "styled-components"; import { EXTENSION_POINT } from "../avatar/Avatar"; import ExternalNavLink from "../navigation/ExternalNavLink"; import { useTranslation } from "react-i18next"; import { createAttributesForTesting } from "../devBuild"; type Props = { me?: Me; version: string; links: Links; }; type TitleWithIconsProps = { title: string; icon: string; }; const TitleWithIcon: FC = ({ icon, title }) => { return ( <> {title} ); }; type TitleWithAvatarProps = { me: Me; }; const VCenteredAvatar = styled(AvatarImage)` width: 1rem !important; height: 1rem !important; margin-right: 0.3em; padding-top: 0.2em; border-radius: 100%; `; const TitleWithAvatar: FC = ({ me }) => (
{me.displayName}
); const Footer: FC = ({ me, version, links }) => { const [t] = useTranslation("commons"); const binder = useBinder(); const index = useIndex(); const extensionProps = { me, url: "/me", links }; let meSectionTile; if (me) { if (binder.hasExtension(EXTENSION_POINT)) { meSectionTile = ; } else { meSectionTile = ; } } return ( ); }; export default Footer;