commit隐藏编辑文件按钮

This commit is contained in:
Eeeros 2024-04-22 15:59:34 +08:00
commit eafd40a6ff
1 changed files with 6 additions and 1 deletions

View File

@ -54,6 +54,11 @@ class CoderRootFileDetail extends Component {
} }
} }
isCommit = () => {
const {detail, branch} = this.props;
return detail && detail.commit && detail.commit.sha.includes(branch)
}
// 更新网页标题 // 更新网页标题
updateDocumentTitle(){ updateDocumentTitle(){
const {projectDetail, treeValuePath, location} = this.props; const {projectDetail, treeValuePath, location} = this.props;
@ -300,7 +305,7 @@ class CoderRootFileDetail extends Component {
</span> </span>
</div> </div>
<p className="text-right"> <p className="text-right">
{flag && platform && ( {flag && platform && !this.isCommit() && (
<div> <div>
{readOnly ? ( {readOnly ? (
<span> <span>