mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Changed handling of changeset description extension point
This commit is contained in:
@@ -3,15 +3,16 @@ import React from "react";
|
|||||||
import type { Changeset, Repository, Tag } from "@scm-manager/ui-types";
|
import type { Changeset, Repository, Tag } from "@scm-manager/ui-types";
|
||||||
|
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import {Interpolate, translate} from "react-i18next";
|
import { Interpolate, translate } from "react-i18next";
|
||||||
import ChangesetId from "./ChangesetId";
|
import ChangesetId from "./ChangesetId";
|
||||||
import injectSheet from "react-jss";
|
import injectSheet from "react-jss";
|
||||||
import {DateFromNow} from "../..";
|
import { DateFromNow } from "../..";
|
||||||
import ChangesetAuthor from "./ChangesetAuthor";
|
import ChangesetAuthor from "./ChangesetAuthor";
|
||||||
import ChangesetTag from "./ChangesetTag";
|
import ChangesetTag from "./ChangesetTag";
|
||||||
|
|
||||||
import {parseDescription} from "./changesets";
|
import { parseDescription } from "./changesets";
|
||||||
import {AvatarWrapper, AvatarImage} from "../../avatar";
|
import { AvatarWrapper, AvatarImage } from "../../avatar";
|
||||||
|
import { ExtensionPoint } from "@scm-manager/ui-extensions";
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
pointer: {
|
pointer: {
|
||||||
@@ -64,7 +65,15 @@ class ChangesetRow extends React.Component<Props> {
|
|||||||
<div className={classNames("media-content", classes.withOverflow)}>
|
<div className={classNames("media-content", classes.withOverflow)}>
|
||||||
<div className="content">
|
<div className="content">
|
||||||
<p className="is-ellipsis-overflow">
|
<p className="is-ellipsis-overflow">
|
||||||
<strong>{description.title}</strong>
|
<strong>
|
||||||
|
<ExtensionPoint
|
||||||
|
name="changesets.changeset.description"
|
||||||
|
props={{ changeset, value: description.title }}
|
||||||
|
renderAll={true}
|
||||||
|
>
|
||||||
|
{description.title}
|
||||||
|
</ExtensionPoint>
|
||||||
|
</strong>
|
||||||
<br />
|
<br />
|
||||||
<Interpolate
|
<Interpolate
|
||||||
i18nKey="changesets.changeset.summary"
|
i18nKey="changesets.changeset.summary"
|
||||||
|
|||||||
@@ -46,7 +46,15 @@ class ChangesetDetails extends React.Component<Props> {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="content">
|
<div className="content">
|
||||||
<h4>{description.title}</h4>
|
<h4>
|
||||||
|
<ExtensionPoint
|
||||||
|
name="changesets.changeset.description"
|
||||||
|
props={{ changeset, value: description.title }}
|
||||||
|
renderAll={true}
|
||||||
|
>
|
||||||
|
{description.title}
|
||||||
|
</ExtensionPoint>
|
||||||
|
</h4>
|
||||||
<article className="media">
|
<article className="media">
|
||||||
<AvatarWrapper>
|
<AvatarWrapper>
|
||||||
<p className={classNames("image", "is-64x64", classes.spacing)}>
|
<p className={classNames("image", "is-64x64", classes.spacing)}>
|
||||||
@@ -67,22 +75,23 @@ class ChangesetDetails extends React.Component<Props> {
|
|||||||
</div>
|
</div>
|
||||||
<div className="media-right">{this.renderTags()}</div>
|
<div className="media-right">{this.renderTags()}</div>
|
||||||
</article>
|
</article>
|
||||||
<ExtensionPoint
|
|
||||||
name="changesets.changeset.description"
|
|
||||||
props={{ changeset, description }}
|
|
||||||
renderAll={true}
|
|
||||||
>
|
|
||||||
<p>
|
<p>
|
||||||
{description.message.split("\n").map((item, key) => {
|
{description.message.split("\n").map((item, key) => {
|
||||||
return (
|
return (
|
||||||
<span key={key}>
|
<span key={key}>
|
||||||
|
<ExtensionPoint
|
||||||
|
name="changesets.changeset.description"
|
||||||
|
props={{ changeset, value: item }}
|
||||||
|
renderAll={true}
|
||||||
|
>
|
||||||
{item}
|
{item}
|
||||||
|
</ExtensionPoint>
|
||||||
<br />
|
<br />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</ExtensionPoint>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ChangesetDiff changeset={changeset} />
|
<ChangesetDiff changeset={changeset} />
|
||||||
|
|||||||
Reference in New Issue
Block a user