mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 13:35:44 +01:00
fixed wrong icons and added missing translation
This commit is contained in:
@@ -4,16 +4,20 @@ import type { Changeset, Repository } from "@scm-manager/ui-types";
|
||||
import ButtonGroup from "../../buttons/ButtonGroup";
|
||||
import Button from "../../buttons/Button";
|
||||
import { createChangesetLink, createSourcesLink } from "./changesets";
|
||||
import { translate } from "react-i18next";
|
||||
|
||||
type Props = {
|
||||
repository: Repository,
|
||||
changeset: Changeset
|
||||
changeset: Changeset,
|
||||
|
||||
// context props
|
||||
t: (string) => string
|
||||
}
|
||||
|
||||
class ChangesetButtonGroup extends React.Component<Props> {
|
||||
|
||||
render() {
|
||||
const { repository, changeset } = this.props;
|
||||
const { repository, changeset, t } = this.props;
|
||||
|
||||
const changesetLink = createChangesetLink(repository, changeset);
|
||||
const sourcesLink = createSourcesLink(repository, changeset);
|
||||
@@ -22,18 +26,18 @@ class ChangesetButtonGroup extends React.Component<Props> {
|
||||
<ButtonGroup className="is-pulled-right">
|
||||
<Button link={changesetLink}>
|
||||
<span className="icon">
|
||||
<i className="fas fa-code"></i>
|
||||
<i className="fas fa-code-branch"></i>
|
||||
</span>
|
||||
<span className="is-hidden-mobile is-hidden-tablet-only">
|
||||
Details
|
||||
{t("changesets.buttons.details")}
|
||||
</span>
|
||||
</Button>
|
||||
<Button link={sourcesLink}>
|
||||
<span className="icon">
|
||||
<i className="fas fa-history"></i>
|
||||
<i className="fas fa-code"></i>
|
||||
</span>
|
||||
<span className="is-hidden-mobile is-hidden-tablet-only">
|
||||
Sources
|
||||
{t("changesets.buttons.sources")}
|
||||
</span>
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
@@ -42,4 +46,4 @@ class ChangesetButtonGroup extends React.Component<Props> {
|
||||
|
||||
}
|
||||
|
||||
export default ChangesetButtonGroup;
|
||||
export default translate("repos")(ChangesetButtonGroup);
|
||||
|
||||
@@ -11,4 +11,3 @@ export { default as ChangesetRow } from "./ChangesetRow";
|
||||
export { default as ChangesetTag } from "./ChangesetTag";
|
||||
export { default as ChangesetTags } from "./ChangesetTags";
|
||||
export { default as ChangesetTagsCollapsed } from "./ChangesetTagsCollapsed";
|
||||
export { default as ChangesetDiff } from "./ChangesetDiff";
|
||||
|
||||
@@ -84,7 +84,11 @@
|
||||
"name": "Autor",
|
||||
"mail": "Mail",
|
||||
"prefix": "Verfasst von",
|
||||
"mailto": "E-Mail senden an"
|
||||
"mailto": "Mail senden an"
|
||||
},
|
||||
"buttons": {
|
||||
"details": "Details",
|
||||
"sources": "Sources"
|
||||
}
|
||||
},
|
||||
"branch-selector": {
|
||||
|
||||
@@ -85,6 +85,10 @@
|
||||
"mail": "Mail",
|
||||
"prefix": "Authored by",
|
||||
"mailto": "Send mail to"
|
||||
},
|
||||
"buttons": {
|
||||
"details": "Details",
|
||||
"sources": "Sources"
|
||||
}
|
||||
},
|
||||
"branch-selector": {
|
||||
|
||||
Reference in New Issue
Block a user