mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 07:00:07 -04:00
Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
25 lines
925 B
JavaScript
25 lines
925 B
JavaScript
import React from "react";
|
|
import Link from "@/components/Link";
|
|
import { clientConfig, currentUser } from "@/services/auth";
|
|
import frontendVersion from "@/version.json";
|
|
|
|
export default function VersionInfo() {
|
|
return (
|
|
<React.Fragment>
|
|
<div>
|
|
Version: {clientConfig.version}
|
|
{frontendVersion !== clientConfig.version && ` (${frontendVersion.substring(0, 8)})`}
|
|
</div>
|
|
{clientConfig.newVersionAvailable && currentUser.hasPermission("super_admin") && (
|
|
<div className="m-t-10">
|
|
{/* eslint-disable react/jsx-no-target-blank */}
|
|
<Link href="https://version.redash.io/" className="update-available" target="_blank" rel="noopener">
|
|
Update Available <i className="fa fa-external-link m-l-5" aria-hidden="true" />
|
|
<span className="sr-only">(opens in a new tab)</span>
|
|
</Link>
|
|
</div>
|
|
)}
|
|
</React.Fragment>
|
|
);
|
|
}
|