diff --git a/frontend/src/pages/sdoc/sdoc-file-history/index.css b/frontend/src/pages/sdoc/sdoc-file-history/index.css index f7b7829bc0..a4af5e74e0 100644 --- a/frontend/src/pages/sdoc/sdoc-file-history/index.css +++ b/frontend/src/pages/sdoc/sdoc-file-history/index.css @@ -93,11 +93,7 @@ .sdoc-file-history .sdoc-file-history-content .sdoc-file-history-viewer { width: 100%; - min-height: 120px; - flex: 1; - background-color: #fff; - word-break: break-word; - border: 1px solid #e6e6dd; + height: calc(100vh - 50px); } .sdoc-file-history .sdoc-file-history-container .sdoc-file-history-content .sdoc-editor-content { @@ -364,10 +360,6 @@ padding: 0; } - .sdoc-file-history .sdoc-file-history-content .sdoc-file-history-viewer { - border: none; - } - .markdown-viewer-render-content { margin: 20px; } diff --git a/frontend/src/pages/sdoc/sdoc-file-history/index.js b/frontend/src/pages/sdoc/sdoc-file-history/index.js index a1763eef19..761e0025ba 100644 --- a/frontend/src/pages/sdoc/sdoc-file-history/index.js +++ b/frontend/src/pages/sdoc/sdoc-file-history/index.js @@ -339,12 +339,15 @@ class SdocFileHistory extends React.Component { const path = [0, 0, 0]; const { isShowChanges } = this.state; this.onSelectHistoryVersion(...getCurrentAndLastVersion(path, historyGroups, isShowChanges)); + } else { + this.setState({ isLoading: false }); } }).catch((error) => { const errorMessage = 'there has an error in server'; - const isLoading = false; - this.setState({ isLoading }); - this.setState({ sidePanelInitData: { isLoading, errorMessage } }); + this.setState({ + isLoading: false, + sidePanelInitData: { isLoading: false, errorMessage } + }); throw Error(errorMessage); }); }