mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
Add footer extension points for links and avatar
This commit is contained in:
@@ -1,23 +1,66 @@
|
||||
import React from "react";
|
||||
import { Me } from "@scm-manager/ui-types";
|
||||
import { Me, Links } from "@scm-manager/ui-types";
|
||||
import { Link } from "react-router-dom";
|
||||
import { binder } from "@scm-manager/ui-extensions";
|
||||
import { AvatarWrapper, AvatarImage } from "../avatar";
|
||||
|
||||
type Props = {
|
||||
me?: Me;
|
||||
version: string;
|
||||
links: Links;
|
||||
};
|
||||
|
||||
const RestDocLink = () => {
|
||||
return <a href="">Rest Documentation</a>;
|
||||
};
|
||||
|
||||
binder.bind("footer.links", RestDocLink);
|
||||
|
||||
class Footer extends React.Component<Props> {
|
||||
render() {
|
||||
const { me } = this.props;
|
||||
const { me, version, links } = this.props;
|
||||
if (!me) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const extensions = binder.getExtensions("footer.links", { me, links });
|
||||
|
||||
return (
|
||||
<footer className="footer">
|
||||
<div className="container is-centered">
|
||||
<p className="has-text-centered">
|
||||
<div className="container is-centered has-text-centered ">
|
||||
<p className="is-size-6 columns is-centered">
|
||||
<AvatarWrapper>
|
||||
<figure className="media-left">
|
||||
<p className="image is-24x24 is-rounded">
|
||||
<AvatarImage person={me} representation="rounded" />
|
||||
</p>
|
||||
</figure>
|
||||
</AvatarWrapper>
|
||||
<Link to={"/me"}>{me.displayName}</Link>
|
||||
</p>
|
||||
<hr className={"has-background-grey-lighter"} />
|
||||
<p>
|
||||
<a href="https://www.scm-manager.org/" target="_blank">
|
||||
SCM-Manager {version}
|
||||
</a>
|
||||
{extensions.map(Ext => (
|
||||
<>
|
||||
{" "}
|
||||
| <Ext />
|
||||
</>
|
||||
))}
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
Powered by{" "}
|
||||
<a target="_blank" href="https://cloudogu.com/">
|
||||
Cloudogu GmbH
|
||||
</a>{" "}
|
||||
| Learn more at{" "}
|
||||
<a href="https://www.scm-manager.org/" target="_blank">
|
||||
SCM-Manager
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user