mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
add breadcrumb to fileViewer
This commit is contained in:
@@ -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} />}
|
||||||
|
|||||||
@@ -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()} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user