add breadcrumb to fileViewer

This commit is contained in:
Eduard Heimbuch
2020-01-09 09:34:40 +01:00
parent 0d546755a9
commit 4e23fd95ab
2 changed files with 4 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ type Props = WithTranslation & {
repository: Repository; repository: Repository;
revision: string; revision: string;
path: string; path: string;
breadcrumb: React.ReactNode;
}; };
type State = { type State = {
@@ -172,7 +173,7 @@ class Content extends React.Component<Props, State> {
} }
render() { render() {
const { file, revision, repository, path } = this.props; const { file, revision, repository, path, breadcrumb } = this.props;
const { showHistory, errorFromExtension } = this.state; const { showHistory, errorFromExtension } = this.state;
const header = this.showHeader(); const header = this.showHeader();
@@ -189,6 +190,7 @@ class Content extends React.Component<Props, State> {
<div className="panel"> <div className="panel">
<div className="panel-heading">{header}</div> <div className="panel-heading">{header}</div>
{moreInformation} {moreInformation}
{breadcrumb}
{content} {content}
</div> </div>
{errorFromExtension && <ErrorNotification error={errorFromExtension} />} {errorFromExtension && <ErrorNotification error={errorFromExtension} />}

View File

@@ -118,7 +118,7 @@ class Sources extends React.Component<Props, State> {
</div> </div>
); );
} else { } else {
return <Content repository={repository} revision={revision} path={path} />; return <Content repository={repository} revision={revision} path={path} breadcrumb={this.renderBreadcrumb()} />;
} }
} }