From c6f12bc092999b8c1da947fd10828e3e6d6f34ad Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Wed, 29 May 2024 16:41:14 +0800 Subject: [PATCH] fix sdoc history no result style --- frontend/src/pages/sdoc/sdoc-file-history/index.css | 10 +--------- frontend/src/pages/sdoc/sdoc-file-history/index.js | 9 ++++++--- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/frontend/src/pages/sdoc/sdoc-file-history/index.css b/frontend/src/pages/sdoc/sdoc-file-history/index.css index f7b7829bc09..a4af5e74e0a 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 a1763eef191..761e0025ba4 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); }); }