mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
|
|
//@flow
|
||
|
|
import React from "react";
|
||
|
|
import type { Repository, Branch } from "@scm-manager/ui-types";
|
||
|
|
import { ButtonGroup, Button } from "@scm-manager/ui-components";
|
||
|
|
import { translate } from "react-i18next";
|
||
|
|
|
||
|
|
type Props = {
|
||
|
|
repository: Repository,
|
||
|
|
branch: Branch,
|
||
|
|
|
||
|
|
// context props
|
||
|
|
t: string => string
|
||
|
|
};
|
||
|
|
|
||
|
|
class BranchButtonGroup extends React.Component<Props> {
|
||
|
|
render() {
|
||
|
|
const { repository, branch, t } = this.props;
|
||
|
|
|
||
|
|
const changesetLink = "";
|
||
|
|
const sourcesLink = "";
|
||
|
|
|
||
|
|
return (
|
||
|
|
<ButtonGroup>
|
||
|
|
<Button link={changesetLink}>
|
||
|
|
<span className="icon">
|
||
|
|
<i className="fas fa-exchange-alt" />
|
||
|
|
</span>
|
||
|
|
<span className="is-hidden-mobile is-hidden-tablet-only">
|
||
|
|
{t("branch.commits")}
|
||
|
|
</span>
|
||
|
|
</Button>
|
||
|
|
<Button link={sourcesLink}>
|
||
|
|
<span className="icon">
|
||
|
|
<i className="fas fa-code" />
|
||
|
|
</span>
|
||
|
|
<span className="is-hidden-mobile is-hidden-tablet-only">
|
||
|
|
{t("branch.sources")}
|
||
|
|
</span>
|
||
|
|
</Button>
|
||
|
|
</ButtonGroup>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default translate("repos")(BranchButtonGroup);
|