diff --git a/gradle/changelog/file_history_source_link.yaml b/gradle/changelog/file_history_source_link.yaml new file mode 100644 index 0000000000..9fa9495457 --- /dev/null +++ b/gradle/changelog/file_history_source_link.yaml @@ -0,0 +1,2 @@ +- type: changed + description: Link directly to file with file history sources link ([#1945](https://github.com/scm-manager/scm-manager/pull/1945)) diff --git a/scm-ui/ui-components/src/repos/changesets/ChangesetButtonGroup.tsx b/scm-ui/ui-components/src/repos/changesets/ChangesetButtonGroup.tsx index de9f728108..56f68e0424 100644 --- a/scm-ui/ui-components/src/repos/changesets/ChangesetButtonGroup.tsx +++ b/scm-ui/ui-components/src/repos/changesets/ChangesetButtonGroup.tsx @@ -21,29 +21,28 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React from "react"; -import { Changeset, Repository } from "@scm-manager/ui-types"; -import { ButtonAddons, Button } from "../../buttons"; +import React, { FC } from "react"; +import { Changeset, File, Repository } from "@scm-manager/ui-types"; +import { Button, ButtonAddons } from "../../buttons"; import { createChangesetLink, createSourcesLink } from "./changesets"; -import { WithTranslation, withTranslation } from "react-i18next"; +import { useTranslation } from "react-i18next"; -type Props = WithTranslation & { +type Props = { repository: Repository; changeset: Changeset; + file?: File; }; -class ChangesetButtonGroup extends React.Component { - render() { - const { repository, changeset, t } = this.props; - const changesetLink = createChangesetLink(repository, changeset); - const sourcesLink = createSourcesLink(repository, changeset); - return ( - -