mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-01 23:38:37 +00:00
fix markdown preview (#6735)
This commit is contained in:
parent
908150f43b
commit
6e5c50c4bf
@ -249,7 +249,7 @@ class DirPath extends React.Component {
|
||||
<span className="path-split">/</span>
|
||||
</Fragment>
|
||||
)}
|
||||
{(currentPath === '/' || currentPath === '' || Utils.isMarkdownFile(this.props.currentPath)) ?
|
||||
{(currentPath === '/' || currentPath === '') ?
|
||||
<DirOperationToolBar
|
||||
path={this.props.currentPath}
|
||||
repoID={this.props.repoID}
|
||||
@ -269,8 +269,8 @@ class DirPath extends React.Component {
|
||||
</DirOperationToolBar> :
|
||||
<span className="path-item" data-path="/" onClick={this.onPathClick} role="button">{repoName}</span>
|
||||
}
|
||||
{Utils.isMarkdownFile(this.props.currentPath) ? null : pathElem}
|
||||
{this.props.isViewFile && !Utils.isMarkdownFile(this.props.currentPath) && !this.isViewMetadata() && (
|
||||
{pathElem}
|
||||
{this.props.isViewFile && !this.isViewMetadata() && (
|
||||
<InternalLinkOperation repoID={this.props.repoID} path={this.props.currentPath}/>
|
||||
)}
|
||||
{(this.props.isViewFile && fileTags.length !== 0) &&
|
||||
|
@ -7,8 +7,8 @@
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
padding: 12px 16px;
|
||||
height: 50px;
|
||||
padding: 0 16px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.seafile-markdown-viewer-modal-header .seafile-markdown-viewer-modal-header-left-name > span {
|
||||
|
@ -485,7 +485,7 @@ class LibContentView extends React.Component {
|
||||
// update state
|
||||
this.setState({
|
||||
isFileLoading: true,
|
||||
path: filePath,
|
||||
path: noRedirection ? this.state.path : filePath,
|
||||
isViewFile: true
|
||||
});
|
||||
|
||||
@ -1902,7 +1902,7 @@ class LibContentView extends React.Component {
|
||||
onCloseMarkdownViewDialog = () => {
|
||||
this.setState({
|
||||
isViewFile: false,
|
||||
path: '/'
|
||||
currentDirent: {},
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user