Merge branch 'gitlink_server' of https://gitlink.org.cn/Gitlink/forgeplus-react into feature_websiteBuild

This commit is contained in:
谢思 2023-08-24 17:26:20 +08:00
commit 6f3f2e9857
4 changed files with 32 additions and 10 deletions

8
package-lock.json generated
View File

@ -1171,7 +1171,7 @@
},
"raf": {
"version": "3.4.1",
"resolved": "http://173.15.15.82:8081/repository/npm-all/raf/-/raf-3.4.1.tgz",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"requires": {
"performance-now": "^2.1.0"
@ -1190,7 +1190,7 @@
},
"rc-rate": {
"version": "2.5.1",
"resolved": "http://173.15.15.82:8081/repository/npm-all/rc-rate/-/rc-rate-2.5.1.tgz",
"resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.5.1.tgz",
"integrity": "sha512-3iJkNJT8xlHklPCdeZtUZmJmRVUbr6AHRlfSsztfYTXVlHrv2TcPn3XkHsH+12j812WVB7gvilS2j3+ffjUHXg==",
"requires": {
"classnames": "^2.2.5",
@ -1201,7 +1201,7 @@
},
"rc-select": {
"version": "9.2.3",
"resolved": "http://173.15.15.82:8081/repository/npm-all/rc-select/-/rc-select-9.2.3.tgz",
"resolved": "https://registry.npmjs.org/rc-select/-/rc-select-9.2.3.tgz",
"integrity": "sha512-WhswxOMWiNnkXRbxyrj0kiIvyCfo/BaRPaYbsDetSIAU2yEDwKHF798blCP5u86KLOBKBvtxWLFCkSsQw1so5w==",
"requires": {
"babel-runtime": "^6.23.0",
@ -1220,7 +1220,7 @@
},
"rc-tree": {
"version": "2.1.4",
"resolved": "http://173.15.15.82:8081/repository/npm-all/rc-tree/-/rc-tree-2.1.4.tgz",
"resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-2.1.4.tgz",
"integrity": "sha512-Xey794Iavgs8YldFlXcZLOhfcIhlX5Oz/yfKufknBXf2AlZCOkc7aHqSM9uTF7fBPtTGPhPxNEfOqHfY7b7xng==",
"requires": {
"@ant-design/create-react-context": "^0.2.4",

View File

@ -378,6 +378,21 @@ class Index extends Component {
}
}
changeName=(e)=>{
let value = e.target.value;
if(value){
let reg = /[a-zA-Z0-9]/g;
let strArr = value.match(reg);
if(strArr){
let str = strArr.join("");
this.props.form.setFieldsValue({
repository_name:str
})
}else{
}
}
}
render() {
const { getFieldDecorator } = this.props.form;
// 项目类型deposit-托管项目mirror-镜像项目
@ -537,7 +552,7 @@ class Index extends Component {
required: true, message: '请填写项目名称'
}],
})(
<Input placeholder="例如:团队协作方法与研究" maxLength={50}/>
<Input placeholder="例如:团队协作方法与研究" maxLength={50} />
)}
</Form.Item>
</AlignCenter>

View File

@ -6,6 +6,7 @@ import { AlignCenter , WhiteBack , FlexAJ } from '../Component/layout';
import axios from 'axios';
import { Button, Select , Pagination } from 'antd';
import { getBranch } from '../GetData/getData';
import { turnbar , returnbar} from 'educoder';
const Div = styled.div`{
padding:20px 30px;
@ -95,6 +96,11 @@ export default ((props)=>{
setPage(page);
}
function changeBranch(b){
console.log(returnbar(b));
setBranch(returnbar(b));
}
return(
<WhiteBack>
<Title><span className="font-18">分支设置</span></Title>
@ -107,7 +113,7 @@ export default ((props)=>{
branch={branch}
repo_id={ projectDetail && projectDetail.repo_id}
projectsId={projectsId}
changeBranch={setBranch}
changeBranch={changeBranch}
owner={owner}
history={props.history}
branchList = {branchList}
@ -123,13 +129,13 @@ export default ((props)=>{
branch={protectBranch}
repo_id={ projectDetail && projectDetail.repo_id}
projectsId={projectsId}
changeBranch={setProtectBranch}
changeBranch={(b)=>{setProtectBranch(returnbar(b))}}
owner={owner}
history={props.history}
branchList = {branchList}
tagflag={false}
/>
<a className={ protectBranchList && protectBranchList.length > 0?"color-blue ml20":"color-grey ml20"} onClick={()=>settingRule(protectBranch)}>设置分支保护</a>
<a className={ protectBranchList && protectBranchList.length > 0?"color-blue ml20":"color-grey ml20"} onClick={()=>settingRule(turnbar(protectBranch))}>设置分支保护</a>
</AlignCenter>
{
protectBranchList && protectBranchList.length > 0 &&

View File

@ -3,6 +3,7 @@ import { Form, InputNumber , Select, Button , Checkbox , Radio } from "antd";
import Title from "../Component/Title";
import { Cancel } from "../Component/layout";
import axios from "axios";
import { turnbar , returnbar} from 'educoder';
export default Form.create()(
forwardRef(({ form, match, history , showNotification, projectDetail }) => {
@ -68,7 +69,7 @@ export default Form.create()(
let url = "";
if(protects){
// true
url = `/${owner}/${projectsId}/protected_branches/${branch}.json`;
url = `/${owner}/${projectsId}/protected_branches/${turnbar(branch)}.json`;
}else{
//
url = `/${owner}/${projectsId}/protected_branches.json`;
@ -122,7 +123,7 @@ export default Form.create()(
}
return (
<div style={{backgroundColor:"#fff"}}>
<Title>新建'{branch}'保护分支规则</Title>
<Title>新建'{returnbar(branch)}'保护分支规则</Title>
<Form>
<div style={{padding:"20px 30px"}}>
{helper(