create bundle for git plugin

This commit is contained in:
Sebastian Sdorra
2018-08-21 14:56:44 +02:00
parent 84e729793b
commit e2fa2388f1
5 changed files with 2277 additions and 9 deletions

View File

@@ -0,0 +1,31 @@
//@flow
import React from 'react';
// TODO flow types ???
type Props = {
repository: Object
}
class CloneInformation extends React.Component<Props> {
render() {
const { repository } = this.repository;
if (repository.type !== "git") {
return null;
}
if (!repository._links.httpProtocol) {
return null;
}
return (
<div>
<h2>Git</h2>
<pre><code>
git clone { repository._links.httpProtocol }
</code></pre>
</div>
);
}
}
export default CloneInformation;

View File

@@ -0,0 +1,4 @@
import { binder } from "@scm-manager/ui-extensions";
import CloneInformation from './CloneInformation';
binder.bind("repos.repository-details.informations", CloneInformation);