|
@@ -100,9 +100,6 @@ class RevisionPath extends React.Component {
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
|
// define styles
|
|
// define styles
|
|
|
- const rootStyle = {
|
|
|
|
|
- marginRight: '0.2em',
|
|
|
|
|
- };
|
|
|
|
|
const separatorStyle = {
|
|
const separatorStyle = {
|
|
|
marginLeft: '0.2em',
|
|
marginLeft: '0.2em',
|
|
|
marginRight: '0.2em',
|
|
marginRight: '0.2em',
|
|
@@ -115,6 +112,26 @@ class RevisionPath extends React.Component {
|
|
|
const { isInTrash } = this.state;
|
|
const { isInTrash } = this.state;
|
|
|
const pageLength = this.state.pages.length;
|
|
const pageLength = this.state.pages.length;
|
|
|
|
|
|
|
|
|
|
+ const rootElement = isInTrash
|
|
|
|
|
+ ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <span className="path-segment">
|
|
|
|
|
+ <a href="/trash"><i className="icon-trash"></i></a>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span className="separator" style={separatorStyle}><a href="/">/</a></span>
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
|
|
+ : (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <span className="path-segment">
|
|
|
|
|
+ <a href="/">
|
|
|
|
|
+ <i className="icon-home"></i>
|
|
|
|
|
+ <span className="separator" style={separatorStyle}>/</span>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </>
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
const afterElements = [];
|
|
const afterElements = [];
|
|
|
this.state.pages.forEach((page, index) => {
|
|
this.state.pages.forEach((page, index) => {
|
|
|
const isLastElement = (index === pageLength - 1);
|
|
const isLastElement = (index === pageLength - 1);
|
|
@@ -136,14 +153,8 @@ class RevisionPath extends React.Component {
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<span className="d-flex align-items-center">
|
|
<span className="d-flex align-items-center">
|
|
|
- { isInTrash && (
|
|
|
|
|
- <span className="path-segment">
|
|
|
|
|
- <a href="/trash"><i className="icon-trash"></i></a>
|
|
|
|
|
- </span>
|
|
|
|
|
- ) }
|
|
|
|
|
- <span className="separator" style={isInTrash ? separatorStyle : rootStyle}>
|
|
|
|
|
- <a href="/">/</a>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ {rootElement}
|
|
|
{afterElements}
|
|
{afterElements}
|
|
|
|
|
|
|
|
<CopyDropdown t={this.props.t} pagePath={this.props.pagePath} pageId={this.props.pageId} buttonStyle={buttonStyle}></CopyDropdown>
|
|
<CopyDropdown t={this.props.t} pagePath={this.props.pagePath} pageId={this.props.pageId} buttonStyle={buttonStyle}></CopyDropdown>
|