//@flow import React from "react"; import { Interpolate, translate } from "react-i18next"; import classNames from "classnames"; import styled from "styled-components"; import type { Changeset, Repository, Tag } from "@scm-manager/ui-types"; import { ExtensionPoint } from "@scm-manager/ui-extensions"; import { DateFromNow, ChangesetId, ChangesetTag, ChangesetAuthor, ChangesetDiff, AvatarWrapper, AvatarImage, changesets } from "@scm-manager/ui-components"; type Props = { changeset: Changeset, repository: Repository, // context props t: string => string }; const RightMarginP = styled.p` margin-right: 1em; `; const TagsWrapper = styled.div` & .tag { margin-left: 0.25rem; } `; class ChangesetDetails extends React.Component { render() { const { changeset, repository } = this.props; const description = changesets.parseDescription(changeset.description); const id = ( ); const date = ; return (

{description.title}

{this.renderTags()}

{description.message.split("\n").map((item, key) => { return ( {item}
); })}

); } getTags = () => { return this.props.changeset._embedded.tags || []; }; renderTags = () => { const tags = this.getTags(); if (tags.length > 0) { return ( {tags.map((tag: Tag) => { return ; })} ); } return null; }; } export default translate("repos")(ChangesetDetails);