secret_repository_tab

dev_cs
hjm 5 years ago
parent a03a1682f7
commit 29e31216c7

@ -303,7 +303,7 @@ class TPMIndex extends Component {
/>)
}></Route>
<Route path="/shixuns/:shixunId/secret_repository" render={
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository={true}
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true}
/>)
}></Route>

@ -31,7 +31,7 @@ class TPMRepositoryComponent extends Component {
}
}
componentDidUpdate(prevProps, prevState) {
if (this.props.secret_repository != prevProps.secret_repository) {
if (this.props.secret_repository_tab != prevProps.secret_repository_tab) {
this.fetchRepo()
}
}

@ -85,7 +85,7 @@ class Repository extends Component {
className=" guideBtn" >Git使用指南</a>
{
this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
!this.props.secret_repository &&
!this.props.secret_repository_tab &&
<ActionBtn style="orangeLine" className="ml20" to={`/shixuns/${match.params.shixunId}/repository/add_file`}>+添加文件</ActionBtn>
:""
}
@ -158,7 +158,7 @@ class Repository extends Component {
</div>
</div>
{this.props.secret_repository && <RepositoryCombinePath {...this.props}>
{this.props.secret_repository_tab && <RepositoryCombinePath {...this.props}>
</RepositoryCombinePath>}

Loading…
Cancel
Save