1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-13 15:05:30 +00:00

fix-markdown-view (#6728)

* fix-markdown-view

* fix style
This commit is contained in:
yinjianfei-user 2024-09-08 08:17:47 +08:00 committed by GitHub
parent e595e72141
commit 4c295bc38c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View File

@ -249,7 +249,7 @@ class DirPath extends React.Component {
<span className="path-split">/</span>
</Fragment>
)}
{(currentPath === '/' || currentPath === '') ?
{(currentPath === '/' || currentPath === '' || Utils.isMarkdownFile(this.props.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>
}
{pathElem}
{this.props.isViewFile && !this.isViewMetadata() && (
{Utils.isMarkdownFile(this.props.currentPath) ? null : pathElem}
{this.props.isViewFile && !Utils.isMarkdownFile(this.props.currentPath) && !this.isViewMetadata() && (
<InternalLinkOperation repoID={this.props.repoID} path={this.props.currentPath}/>
)}
{(this.props.isViewFile && fileTags.length !== 0) &&

View File

@ -27,7 +27,7 @@
.seafile-markdown-viewer-modal-body {
padding: 0;
height: 600px;
height: calc(100vh / 2 + 130px);
overflow: auto;
}

View File

@ -52,7 +52,7 @@ class DirColumnFile extends React.Component {
render() {
const { currentDirent } = this.props;
const { name } = currentDirent;
const { name } = currentDirent || {};
if (this.props.isFileLoadedErr) {
return (

View File

@ -91,7 +91,7 @@ class LibContentView extends React.Component {
asyncOperationProgress: 0,
asyncOperatedFilesLength: 0,
viewId: '0000',
currentDirent: null
currentDirent: {}
};
this.oldonpopstate = window.onpopstate;