mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-06 00:16:49 +00:00
- Added frontend translation for english - Moved frontend api logic to hook and backend api space - Added swagger schema for the new api endpoint - Moved backend logic to its own internal file - Added user agent header to github api check - Added cypress integration test for version check api - Added a memory cache item from github check to avoid hitting it too much
79 lines
2.3 KiB
TypeScript
79 lines
2.3 KiB
TypeScript
import { useCheckVersion, useHealth } from "src/hooks";
|
|
import { T } from "src/locale";
|
|
|
|
export function SiteFooter() {
|
|
const health = useHealth();
|
|
const { data: versionData } = useCheckVersion();
|
|
|
|
const getVersion = () => {
|
|
if (!health.data) {
|
|
return "";
|
|
}
|
|
const v = health.data.version;
|
|
return `v${v.major}.${v.minor}.${v.revision}`;
|
|
};
|
|
|
|
return (
|
|
<footer className="footer d-print-none py-3">
|
|
<div className="container-xl">
|
|
<div className="row text-center align-items-center flex-row-reverse">
|
|
<div className="col-lg-auto ms-lg-auto">
|
|
<ul className="list-inline list-inline-dots mb-0">
|
|
<li className="list-inline-item">
|
|
<a
|
|
href="https://github.com/NginxProxyManager/nginx-proxy-manager"
|
|
target="_blank"
|
|
className="link-secondary"
|
|
rel="noopener"
|
|
>
|
|
<T id="footer.github-fork" />
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div className="col-12 col-lg-auto mt-3 mt-lg-0">
|
|
<ul className="list-inline list-inline-dots mb-0">
|
|
<li className="list-inline-item">
|
|
© 2025{" "}
|
|
<a href="https://jc21.com" rel="noreferrer" target="_blank" className="link-secondary">
|
|
jc21.com
|
|
</a>
|
|
</li>
|
|
<li className="list-inline-item">
|
|
Theme by{" "}
|
|
<a href="https://tabler.io" rel="noreferrer" target="_blank" className="link-secondary">
|
|
Tabler
|
|
</a>
|
|
</li>
|
|
<li className="list-inline-item">
|
|
<a
|
|
href={`https://github.com/NginxProxyManager/nginx-proxy-manager/releases/tag/${getVersion()}`}
|
|
className="link-secondary"
|
|
target="_blank"
|
|
rel="noopener"
|
|
>
|
|
{" "}
|
|
{getVersion()}{" "}
|
|
</a>
|
|
</li>
|
|
{versionData?.updateAvailable && versionData?.latest && (
|
|
<li className="list-inline-item">
|
|
<a
|
|
href={`https://github.com/NginxProxyManager/nginx-proxy-manager/releases/tag/${versionData.latest}`}
|
|
className="link-warning fw-bold"
|
|
target="_blank"
|
|
rel="noopener"
|
|
title={`New version ${versionData.latest} is available`}
|
|
>
|
|
<T id="update-available" data={{ latestVersion: versionData.latest }} />
|
|
</a>
|
|
</li>
|
|
)}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
);
|
|
}
|