diff --git a/public/react/src/modules/page/MainContent.js b/public/react/src/modules/page/MainContent.js index 596da84af..a1b7566d0 100644 --- a/public/react/src/modules/page/MainContent.js +++ b/public/react/src/modules/page/MainContent.js @@ -144,11 +144,7 @@ class MainContent extends Component { {/* readRepoTimeout 如果读取代码超时,显示重新加载按钮,重新拉取代码 */} { st === 0 - ? - readRepoTimeout === true ?
- 代码加载失败, this.props.fetchRepositoryCode(this.props, null, null, true, true)}>重试 -
: + ?
9) { this.setState({ - readRepoTimeout: true + readRepoTimeout: true, + codeLoading: false }) readingRepoTimes = 0; showSnackbar(`网络异常,请稍后重试。`); diff --git a/public/react/src/modules/page/main/CodeRepositoryView.js b/public/react/src/modules/page/main/CodeRepositoryView.js index ee2017ab3..758550d89 100644 --- a/public/react/src/modules/page/main/CodeRepositoryView.js +++ b/public/react/src/modules/page/main/CodeRepositoryView.js @@ -510,6 +510,10 @@ class CodeRepositoryView extends Component {
+ {this.props.readRepoTimeout === true ?
+ 代码加载失败, this.props.fetchRepositoryCode(this.props, null, null, true, true)}>重试 +
:
{/* 没必要显示这个,注释掉了 */} {/* { !isEditablePath && @@ -526,7 +530,7 @@ class CodeRepositoryView extends Component { {/* cm monaco 切换 */} {/* */} -
+
}
{/* { tabIndex === STABLE_SSH_TAB_ID && this.state.sshData && } */}