Skip to content

Commit

Permalink
Replace title attribute in footer elements with tooltips
Browse files Browse the repository at this point in the history
The footer still used `title` attributes instead of the tooltips we use
everywhere else. This patch fixes that.
  • Loading branch information
lkiesow committed Jul 2, 2024
1 parent 16eb84f commit cedc4b5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { hasAccess } from "../utils/utils";
import { useAppSelector } from "../store";
import { Link } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { Tooltip } from "./shared/Tooltip";

/**
* Component that renders the footer
Expand All @@ -29,14 +30,18 @@ const Footer: React.FC = () => {
<div className="default-footer">
<ul>
{/* Only render if a version is set */}
{!!user.ocVersion && (
{user.ocVersion && (
<li>
{"Opencast "}
<span title={t('BUILD.VERSION')}>{user.ocVersion.version}</span>
<Tooltip title={t('BUILD.VERSION')}><>{user.ocVersion.version}</></Tooltip>
{hasAccess("ROLE_ADMIN", user) && (
<span>
{" – "} <span title={t('BUILD.COMMIT')}>{user.ocVersion.buildNumber || "undefined"}</span>
{" – "} <span title={t('BUILD.DATE_DESC')}>{t("BUILD.BUILT_ON")} {lastModified}</span>
{user.ocVersion.buildNumber && (
<>{" – "} <Tooltip title={t('BUILD.COMMIT')}><>{user.ocVersion.buildNumber}</></Tooltip></>
)}
{lastModified && (
<>{" – "} <Tooltip title={t('BUILD.DATE_DESC')}><>{t("BUILD.BUILT_ON")} {lastModified}</></Tooltip></>
)}
</span>
)}
</li>
Expand Down

0 comments on commit cedc4b5

Please sign in to comment.