diff --git a/frontend/src/components/cur-dir-path/dir-path.js b/frontend/src/components/cur-dir-path/dir-path.js
index c9b1be55a7..a49082023b 100644
--- a/frontend/src/components/cur-dir-path/dir-path.js
+++ b/frontend/src/components/cur-dir-path/dir-path.js
@@ -249,7 +249,7 @@ class DirPath extends React.Component {
/
)}
- {(currentPath === '/' || currentPath === '') ?
+ {(currentPath === '/' || currentPath === '' || Utils.isMarkdownFile(this.props.currentPath)) ?
:
{repoName}
}
- {pathElem}
- {this.props.isViewFile && !this.isViewMetadata() && (
+ {Utils.isMarkdownFile(this.props.currentPath) ? null : pathElem}
+ {this.props.isViewFile && !Utils.isMarkdownFile(this.props.currentPath) && !this.isViewMetadata() && (
)}
{(this.props.isViewFile && fileTags.length !== 0) &&
diff --git a/frontend/src/components/dir-view-mode/dir-column-file.css b/frontend/src/components/dir-view-mode/dir-column-file.css
index 43bbbf9753..ea223e9b2d 100644
--- a/frontend/src/components/dir-view-mode/dir-column-file.css
+++ b/frontend/src/components/dir-view-mode/dir-column-file.css
@@ -27,7 +27,7 @@
.seafile-markdown-viewer-modal-body {
padding: 0;
- height: 600px;
+ height: calc(100vh / 2 + 130px);
overflow: auto;
}
diff --git a/frontend/src/components/dir-view-mode/dir-column-file.js b/frontend/src/components/dir-view-mode/dir-column-file.js
index 8ba6afe1c2..91f7ade915 100644
--- a/frontend/src/components/dir-view-mode/dir-column-file.js
+++ b/frontend/src/components/dir-view-mode/dir-column-file.js
@@ -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 (
diff --git a/frontend/src/pages/lib-content-view/lib-content-view.js b/frontend/src/pages/lib-content-view/lib-content-view.js
index ca2015278a..cb66fd6eb3 100644
--- a/frontend/src/pages/lib-content-view/lib-content-view.js
+++ b/frontend/src/pages/lib-content-view/lib-content-view.js
@@ -91,7 +91,7 @@ class LibContentView extends React.Component {
asyncOperationProgress: 0,
asyncOperatedFilesLength: 0,
viewId: '0000',
- currentDirent: null
+ currentDirent: {}
};
this.oldonpopstate = window.onpopstate;