forked from Gitlink/forgeplus-react
Merge remote-tracking branch 'upstream/feature_reposyncer' into gitlink_ssr_head
This commit is contained in:
commit
1322fa35fa
|
|
@ -25,7 +25,7 @@ if (isDev) {
|
|||
}
|
||||
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
||||
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || ''
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
|
||||
}
|
||||
window._debugType = debugType;
|
||||
export function initAxiosInterceptors(props) {
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ function EditStore(props){
|
|||
rules:[{required:true,message: `请输入${platform || ""}授权token`}],
|
||||
initialValue: values.external_token
|
||||
})(
|
||||
<Input addonBefore="token" placeholder={`请输入${platform}的授权token`} className="storeInput" maxLength={300}/>
|
||||
<Input.Password addonBefore="token" placeholder={`请输入${platform}的授权token`} className="storeInput" maxLength={300}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
{!step && <div>
|
||||
|
|
@ -269,7 +269,7 @@ function EditStore(props){
|
|||
}
|
||||
setBranch(e.target.value);
|
||||
}} value={branch} style={{width: '80%'}}>
|
||||
<Radio value="1" style={{marginRight: '40%'}} disabled>全部分支<br/><span className="color-grey-6 ml25 font-12">建立仓库的实时双向同步</span></Radio>
|
||||
{/* <Radio value="1" style={{marginRight: '40%'}} disabled>全部分支<br/><span className="color-grey-6 ml25 font-12">建立仓库的实时双向同步</span></Radio> */}
|
||||
<Radio value="2">单个分支<br/><span className="color-grey-6 ml25 font-12">建立单个分支的实时双向同步</span></Radio>
|
||||
</Radio.Group>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -58,19 +58,15 @@ function RecordList(props){
|
|||
}}/>
|
||||
<Button type="primary" className="ml30" onClick={()=>{
|
||||
const external_token = token[external_repo_address]
|
||||
if(external_token){
|
||||
axios.post(`/v1/${owner}/${projectsId}/sync_repositories/update_info.json?sync_repository_ids=${sync_repository_ids.toString()}`, {
|
||||
external_repo_address,
|
||||
external_token
|
||||
}).then(res=>{
|
||||
if(res && res.data && !res.data.status){
|
||||
message.success("更新成功");
|
||||
reflushRepos();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
message.error("请先输入新的token")
|
||||
}
|
||||
axios.post(`/v1/${owner}/${projectsId}/sync_repositories/update_info.json?sync_repository_ids=${sync_repository_ids.toString()}`, {
|
||||
external_repo_address,
|
||||
external_token: external_token || item.external_token
|
||||
}).then(res=>{
|
||||
if(res && res.data && !res.data.status){
|
||||
message.success("更新成功");
|
||||
reflushRepos();
|
||||
}
|
||||
})
|
||||
}}>更新</Button>
|
||||
</Fragment>
|
||||
})}
|
||||
|
|
|
|||
Loading…
Reference in New Issue