1
0
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:
Michael An 2024-09-09 11:55:41 +08:00 committed by GitHub
parent 908150f43b
commit 6e5c50c4bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -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) &&

View File

@ -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 {

View File

@ -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: {},
});
};