This commit is contained in:
caishi 2021-06-04 10:55:05 +08:00
parent 9feeaafaa2
commit 8c4151fdb7
4 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,7 @@ if (isDev) {
} }
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' : window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
} }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

View File

@ -462,7 +462,7 @@ class Detail extends Component {
firstSync ? "": firstSync ? "":
<span className="df mt25"> <span className="df mt25">
{ {
current_user && current_user.login && (projectDetail && projectDetail.type && projectDetail.type === 2) ? ((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : "" <a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
} }
<span className="detail_tag_btn"> <span className="detail_tag_btn">
@ -639,6 +639,11 @@ class Detail extends Component {
} }
></Route> ></Route>
{/* 新建合并请求 */} {/* 新建合并请求 */}
<Route path="/projects/:owner/:projectsId/pulls/new/:branch"
render={
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
}
></Route>
<Route path="/projects/:owner/:projectsId/pulls/new" <Route path="/projects/:owner/:projectsId/pulls/new"
render={ render={
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />) (props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)

View File

@ -43,6 +43,7 @@ export default Form.create()(
} }
Axios.put(url,params).then(result=>{ Axios.put(url,params).then(result=>{
if(result && result.data){ if(result && result.data){
props.showNotification("资料修改成功!")
resetUser && resetUser(result.data); resetUser && resetUser(result.data);
} }
}).catch(error=>{}) }).catch(error=>{})

View File

@ -84,7 +84,7 @@ function Index(props) {
let percent = result.data.user && result.data.user.languages_percent; let percent = result.data.user && result.data.user.languages_percent;
let arr = []; let arr = [];
Object.keys(percent).map((item,key)=>{ Object.keys(percent).map((item,key)=>{
arr.push({name:item,p:percent[item]*100,color:getColor()}); arr.push({name:item,p:parseFloat(percent[item]*100).toFixed(1),color:getColor()});
}) })
setPercentData(arr); setPercentData(arr);
} }