Merge pull request '1201上线' (#594) from Eeeros/forgeplus-react:gitlink_server into gitlink_server

1
This commit is contained in:
Eeeros 2023-12-01 13:51:06 +08:00
commit 4b9aab156e
5 changed files with 696 additions and 685 deletions

1362
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -62,9 +62,11 @@ function CoderDepot(props){
let branchName = props.match.params.branchName;
branchName = returnbar(branchName);
let pathname = props.history.location.pathname;
let search = props.history.location.search
const { platform , mirror_status , bannerList , projectDetail } = props ;
//distribution
const distribution = projectDetail && projectDetail.type ===0 && ( projectDetail.permission && projectDetail.permission !== "Reporter");
useEffect(()=>{
if(bannerList && bannerList.length>0){
let a = bannerList.filter(i=>i.menu_name === "pulls");
@ -138,6 +140,15 @@ function CoderDepot(props){
}
},[projectsId,owner,pathname,defaultBranch,mirror_status])
//
useEffect(()=>{
if (projectsId && owner && defaultBranch && mirror_status===0 && !search){
let b = turnbar(branchName) ;
let url = pathname.split(`/tree/${b}/`)[1];
getFileInfo(url,branchName);
}
},[search])
useEffect(()=>{
if(platform && mirror_status===0){
setReadOnly(props.history.location.search.indexOf('edit') !== -1);

View File

@ -54,7 +54,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId , platform
</span>
<span title="init project">
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}>
{getEmoji(getMessage(item.commit && item.commit.message))}
{getEmoji(getMessage(item.commit && item.commit.message.split('\n')[0]))}
</Link>
</span>
<span title={item.commit && item.commit.created_at}>{item.commit && item.commit.time_from_now}</span>

View File

@ -145,7 +145,7 @@ class UserSubmitComponent extends Component {
let b = currentBranch || branch;
let src = `/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}${detail.path ? `/${returnbar(detail.path)}` : ""}`;
this.props.history.push(src);
this.props.showNotification("文件修改成功!");
this.props.showNotification("文件修改成功! ");
}
})
.catch((error) => {

View File

@ -45,7 +45,7 @@
cursor: pointer;
/* 行内样式 */
max-width: 100% !important;
height: auto !important;
/* height: auto !important; */
}
.markdown-body pre ol.linenums,.markdown-body pre ul.linenums{
padding-left: 0px;
@ -57,7 +57,7 @@
.markdown-body video{
/* 行内样式 */
max-width: 100% !important;
height: auto !important;
/* height: auto !important; */
}
ol,