added hg and git branch manual

This commit is contained in:
Florian Scholdei
2019-04-01 13:47:41 +02:00
parent eaf3641d6f
commit 5420884f5a
6 changed files with 75 additions and 16 deletions

View File

@@ -14,12 +14,15 @@ type Props = {
class BranchDetailTable extends React.Component<Props> {
render() {
const { repository, branch, t } = this.props;
return (
<table className="table">
<tbody>
<tr>
<td className="has-text-weight-semibold">{t("branch.name")}</td>
<td>branch.name</td>
<td>
{branch.name} {this.renderDefaultBranch()}
</td>
</tr>
<tr>
<td className="has-text-weight-semibold">
@@ -28,15 +31,25 @@ class BranchDetailTable extends React.Component<Props> {
<td>{repository.name}</td>
</tr>
<tr>
<td className="has-text-weight-semibold">
{t("branch.actions")}
<td className="has-text-weight-semibold">{t("branch.actions")}</td>
<td>
<BranchButtonGroup repository={repository} branch={branch} />
</td>
<td><BranchButtonGroup repository={repository} branch={branch} /></td>
</tr>
</tbody>
</table>
);
}
renderDefaultBranch() {
const { branch } = this.props;
let defaultLabel = null;
if (branch.defaultBranch) {
defaultLabel = <span className="tag is-dark">Default</span>;
}
return defaultLabel;
}
}
export default translate("repos")(BranchDetailTable);