2021-02-22 02:39:04 +00:00
|
|
|
import { Component } from "inferno";
|
2021-04-23 19:13:21 +00:00
|
|
|
import { NavLink } from "inferno-router";
|
2021-02-22 02:39:04 +00:00
|
|
|
import { GetSiteResponse } from "lemmy-js-client";
|
2021-07-17 20:42:55 +00:00
|
|
|
import { i18n } from "../../i18next";
|
|
|
|
import { docsUrl, joinLemmyUrl, repoUrl } from "../../utils";
|
|
|
|
import { VERSION } from "../../version";
|
2020-09-06 16:15:25 +00:00
|
|
|
|
2020-09-09 03:13:26 +00:00
|
|
|
interface FooterProps {
|
|
|
|
site: GetSiteResponse;
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
2021-02-22 02:24:09 +00:00
|
|
|
export class Footer extends Component<FooterProps, any> {
|
2020-09-06 16:15:25 +00:00
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2021-03-25 16:29:20 +00:00
|
|
|
<nav class="container navbar navbar-expand-md navbar-light navbar-bg p-3">
|
2020-09-06 16:15:25 +00:00
|
|
|
<div className="navbar-collapse">
|
|
|
|
<ul class="navbar-nav ml-auto">
|
2021-04-26 14:54:41 +00:00
|
|
|
{this.props.site.version !== VERSION && (
|
|
|
|
<li class="nav-item">
|
|
|
|
<span class="nav-link">UI: {VERSION}</span>
|
|
|
|
</li>
|
|
|
|
)}
|
2021-04-26 13:57:41 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<span class="nav-link">BE: {this.props.site.version}</span>
|
2020-09-06 16:15:25 +00:00
|
|
|
</li>
|
2020-09-07 03:41:46 +00:00
|
|
|
<li className="nav-item">
|
2021-04-23 19:13:21 +00:00
|
|
|
<NavLink className="nav-link" to="/modlog">
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("modlog")}
|
2021-04-23 19:13:21 +00:00
|
|
|
</NavLink>
|
2020-09-06 16:15:25 +00:00
|
|
|
</li>
|
2021-02-01 18:08:45 +00:00
|
|
|
{this.props.site.federated_instances && (
|
|
|
|
<li class="nav-item">
|
2021-04-23 19:13:21 +00:00
|
|
|
<NavLink className="nav-link" to="/instances">
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("instances")}
|
2021-04-23 19:13:21 +00:00
|
|
|
</NavLink>
|
2021-02-01 18:08:45 +00:00
|
|
|
</li>
|
|
|
|
)}
|
2020-09-06 16:15:25 +00:00
|
|
|
<li class="nav-item">
|
2021-01-06 21:06:42 +00:00
|
|
|
<a className="nav-link" href={docsUrl}>
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("docs")}
|
2020-09-06 16:15:25 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
2020-09-07 03:41:46 +00:00
|
|
|
<a className="nav-link" href={repoUrl}>
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("code")}
|
2020-09-06 16:15:25 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2020-10-24 15:48:27 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<a className="nav-link" href={joinLemmyUrl}>
|
2021-02-22 02:39:04 +00:00
|
|
|
{i18n.t("join_lemmy")}
|
2020-10-24 15:48:27 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2020-09-06 16:15:25 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|