1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

Merge pull request #3331 from haiwen/file-history-page-rewirte

file history page rewrite
This commit is contained in:
Daniel Pan
2019-04-26 11:40:41 +08:00
committed by GitHub
12 changed files with 571 additions and 39 deletions

View File

@@ -100,7 +100,7 @@ class FileToolbar extends React.Component {
icon="fa fa-history"
text={gettext('History')}
tag="a"
href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`}
href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}`}
/>
)}
{(canEditFile && !err) &&

View File

@@ -3,7 +3,8 @@ import PropTypes from 'prop-types';
import { siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle } from '../utils/constants';
const propTypes = {
onCloseSidePanel: PropTypes.func.isRequired,
onCloseSidePanel: PropTypes.func,
showCloseSidePanelIcon: PropTypes.bool,
};
class Logo extends React.Component {
@@ -18,13 +19,15 @@ class Logo extends React.Component {
<a href={siteRoot} id="logo">
<img src={mediaUrl + logoPath} height={logoHeight} width={logoWidth} title={siteTitle} alt="logo" />
</a>
<a
className="sf2-icon-x1 sf-popover-close side-panel-close action-icon d-md-none"
onClick={this.closeSide}
title="Close"
aria-label="Close"
>
</a>
{this.props.showCloseSidePanelIcon &&
<a
className="sf2-icon-x1 sf-popover-close side-panel-close action-icon d-md-none"
onClick={this.closeSide}
title="Close"
aria-label="Close"
>
</a>
}
</div>
);
}