Add extension point for repository links in card

This commit is contained in:
René Pfeuffer
2020-03-14 20:50:25 +01:00
parent 5b0c98fd3c
commit 176f19fb1a
2 changed files with 6 additions and 0 deletions

View File

@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Added
- Extension point to add links to the repository cards from plug ins ([#1041](https://github.com/scm-manager/scm-manager/pull/1041))
## 2.0.0-rc5 - 2020-03-12 ## 2.0.0-rc5 - 2020-03-12
### Added ### Added
- Added footer extension points for links and avatar - Added footer extension points for links and avatar

View File

@@ -3,6 +3,7 @@ import { Repository } from "@scm-manager/ui-types";
import { CardColumn, DateFromNow } from "@scm-manager/ui-components"; import { CardColumn, DateFromNow } from "@scm-manager/ui-components";
import RepositoryEntryLink from "./RepositoryEntryLink"; import RepositoryEntryLink from "./RepositoryEntryLink";
import RepositoryAvatar from "./RepositoryAvatar"; import RepositoryAvatar from "./RepositoryAvatar";
import { ExtensionPoint } from "@scm-manager/ui-extensions";
type Props = { type Props = {
repository: Repository; repository: Repository;
@@ -47,6 +48,7 @@ class RepositoryEntry extends React.Component<Props> {
{this.renderBranchesLink(repository, repositoryLink)} {this.renderBranchesLink(repository, repositoryLink)}
{this.renderChangesetsLink(repository, repositoryLink)} {this.renderChangesetsLink(repository, repositoryLink)}
{this.renderSourcesLink(repository, repositoryLink)} {this.renderSourcesLink(repository, repositoryLink)}
<ExtensionPoint name={"repository.card.quickLink"} props={{ repository, repositoryLink }} renderAll={true} />
{this.renderModifyLink(repository, repositoryLink)} {this.renderModifyLink(repository, repositoryLink)}
</> </>
); );