mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
Add divider for not parsed hunks
This commit is contained in:
@@ -26,7 +26,7 @@ import { withTranslation, WithTranslation } from "react-i18next";
|
||||
import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
// @ts-ignore
|
||||
import { getChangeKey, Hunk } from "react-diff-view";
|
||||
import { Decoration, getChangeKey, Hunk } from "react-diff-view";
|
||||
import { ButtonGroup } from "../buttons";
|
||||
import Tag from "../Tag";
|
||||
import Icon from "../Icon";
|
||||
@@ -82,6 +82,10 @@ const ButtonWrapper = styled.div`
|
||||
margin-left: auto;
|
||||
`;
|
||||
|
||||
const HunkDivider = styled.hr`
|
||||
margin: 0.5rem 0;
|
||||
`;
|
||||
|
||||
const ChangeTypeTag = styled(Tag)`
|
||||
margin-left: 0.75rem;
|
||||
`;
|
||||
@@ -304,6 +308,8 @@ class DiffFile extends React.Component<Props, State> {
|
||||
const items = [];
|
||||
if (file._links?.lines) {
|
||||
items.push(this.createHunkHeader(expandableHunk));
|
||||
} else if (i > 0) {
|
||||
items.push(<Decoration><HunkDivider /></Decoration>);
|
||||
}
|
||||
|
||||
items.push(
|
||||
|
||||
Reference in New Issue
Block a user