diff --git a/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx b/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx index 65b9b2de4c..47823b71fe 100644 --- a/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx +++ b/scm-ui/ui-components/src/repos/changesets/ChangesetRow.tsx @@ -35,8 +35,7 @@ import ChangesetAuthor from "./ChangesetAuthor"; import ChangesetTags from "./ChangesetTags"; import ChangesetButtonGroup from "./ChangesetButtonGroup"; import ChangesetDescription from "./ChangesetDescription"; -import SignatureIcon from "@scm-manager/ui-webapp/src/repos/components/changesets/SignatureIcon"; -import { Level } from "../.."; +import SignatureIcon from "./SignatureIcon"; type Props = WithTranslation & { repository: Repository; diff --git a/scm-ui/ui-webapp/src/repos/components/changesets/SignatureIcon.tsx b/scm-ui/ui-components/src/repos/changesets/SignatureIcon.tsx similarity index 82% rename from scm-ui/ui-webapp/src/repos/components/changesets/SignatureIcon.tsx rename to scm-ui/ui-components/src/repos/changesets/SignatureIcon.tsx index 1167b50b66..57ce8fba38 100644 --- a/scm-ui/ui-webapp/src/repos/components/changesets/SignatureIcon.tsx +++ b/scm-ui/ui-components/src/repos/changesets/SignatureIcon.tsx @@ -22,15 +22,26 @@ * SOFTWARE. */ import React, { FC } from "react"; -import { Icon, Tooltip } from "@scm-manager/ui-components"; import { useTranslation } from "react-i18next"; import { Signature } from "@scm-manager/ui-types"; +import styled from "styled-components"; +import Icon from "../../Icon"; +import Tooltip from "../../Tooltip"; type Props = { signatures: Signature[]; className: any; }; +const StyledIcon = styled(Icon)` + width: 1em; + height: 1em; + vertical-align: middle; + border-radius: 0.25em; + margin-bottom: 0.2em; +`; + + const SignatureIcon: FC = ({ signatures, className }) => { const [t] = useTranslation("repos"); @@ -54,14 +65,16 @@ const SignatureIcon: FC = ({ signatures, className }) => { return `${t("changeset.signatureStatus")}: ${status}`; } - let message = `${t("changeset.signedBy")}: ${signature.owner ? signature.owner : t("changeset.noOwner")}\n${t("changeset.keyId")}: ${signature.keyId}\n${t( + let message = `${t("changeset.keyOwner")}: ${signature.owner ? signature.owner : t("changeset.noOwner")}\n${t("changeset.keyId")}: ${signature.keyId}\n${t( "changeset.signatureStatus" )}: ${status}`; if (signature.contacts?.length > 0) { - message = message + `\n${t("changeset.keyContacts")}: ${signature.contacts.map((contact: string) => `\n- ${contact}`)}`; + message += `\n${t("changeset.keyContacts")}:`; + signature.contacts.forEach((contact) => { + message += `\n- ${contact}`; + }); } - return message; }; @@ -78,7 +91,7 @@ const SignatureIcon: FC = ({ signatures, className }) => { return ( - + ); }; diff --git a/scm-ui/ui-webapp/public/locales/de/repos.json b/scm-ui/ui-webapp/public/locales/de/repos.json index 6d34e782c6..ad35ed7371 100644 --- a/scm-ui/ui-webapp/public/locales/de/repos.json +++ b/scm-ui/ui-webapp/public/locales/de/repos.json @@ -88,7 +88,7 @@ "shortSummary": "Committet <0/> <1/>", "tags": "Tags", "diffNotSupported": "Diff des Changesets wird von diesem Repositorytyp nicht unterstützt", - "signedBy": "Signiert von", + "keyOwner": "Schlüssel Besitzer", "signatureStatus": "Status", "keyId": "Schlüssel-ID", "keyContacts": "Kontakte", diff --git a/scm-ui/ui-webapp/public/locales/en/repos.json b/scm-ui/ui-webapp/public/locales/en/repos.json index 63c14a73db..daa5bc0caa 100644 --- a/scm-ui/ui-webapp/public/locales/en/repos.json +++ b/scm-ui/ui-webapp/public/locales/en/repos.json @@ -87,7 +87,7 @@ "summary": "Changeset <0/> was committed <1/>", "shortSummary": "Committed <0/> <1/>", "tags": "Tags", - "signedBy": "Signed by", + "keyOwner": "Key Owner", "keyId": "Key ID", "keyContacts": "Contacts", "noOwner": "Unknown", diff --git a/scm-ui/ui-webapp/src/repos/components/changesets/ChangesetDetails.tsx b/scm-ui/ui-webapp/src/repos/components/changesets/ChangesetDetails.tsx index c9bc1c6b6b..c52f8d83a3 100644 --- a/scm-ui/ui-webapp/src/repos/components/changesets/ChangesetDetails.tsx +++ b/scm-ui/ui-webapp/src/repos/components/changesets/ChangesetDetails.tsx @@ -43,7 +43,7 @@ import { } from "@scm-manager/ui-components"; import ContributorTable from "./ContributorTable"; import { Link as ReactLink } from "react-router-dom"; -import SignatureIcon from "./SignatureIcon"; +import SignatureIcon from "@scm-manager/ui-components/src/repos/changesets/SignatureIcon"; type Props = WithTranslation & { changeset: Changeset;