diff --git a/src/forge/DevOps/disposePipeline.jsx b/src/forge/DevOps/disposePipeline.jsx
index 1da142f6..deabc149 100644
--- a/src/forge/DevOps/disposePipeline.jsx
+++ b/src/forge/DevOps/disposePipeline.jsx
@@ -275,7 +275,7 @@ function disposePipeline(props){
...params
}).then(result=>{
if(result){
- props.history.push(`/projects/${owner}/${projectsId}/devops/dispose`);
+ props.history.push(`/${owner}/${projectsId}/devops`);
}
setLoading(false);
}).catch(error=>{
diff --git a/src/forge/DevOps/opsDetail.jsx b/src/forge/DevOps/opsDetail.jsx
index 6ac3dc44..1944dfe6 100644
--- a/src/forge/DevOps/opsDetail.jsx
+++ b/src/forge/DevOps/opsDetail.jsx
@@ -48,7 +48,7 @@ export default (props) => {
axios.post(url).then((result) => {
if (result && result.data) {
props.showNotification("工作流正在重新构建!");
- props.history.push(`/projects/${owner}/${projectId}/devops/${result.data.number}/detail`);
+ props.history.push(`/${owner}/${projectId}/devops/${result.data.number}/detail`);
}
})
.catch((error) => {
@@ -87,7 +87,7 @@ export default (props) => {
退出
diff --git a/src/forge/DevOps/ssh/XmlPanel.jsx b/src/forge/DevOps/ssh/XmlPanel.jsx
index ae642caa..295d96ce 100644
--- a/src/forge/DevOps/ssh/XmlPanel.jsx
+++ b/src/forge/DevOps/ssh/XmlPanel.jsx
@@ -24,7 +24,6 @@ function onLayout(term, el) {
entry.target.offsetHeight,
term,
);
- console.log('cols, rows', cols, rows);
term.resize(cols, rows);
mediator.publish('ssh-xterm-resize', {
columns: cols,
@@ -139,12 +138,10 @@ export default ({ sshConfigData, sid }) => {
}, 1000);
}
isFirstConnected.current = true;
- console.log('event:', event);
const data = Base64.decode(event.data.toString());
let w = term._core._renderService.dimensions.actualCellWidth || 9.5;
- console.log('data:', data, w, term);
term.write(data);
};
diff --git a/src/forge/Divert/DivertModal.jsx b/src/forge/Divert/DivertModal.jsx
index a6ecdc05..d4c1f201 100644
--- a/src/forge/Divert/DivertModal.jsx
+++ b/src/forge/Divert/DivertModal.jsx
@@ -41,14 +41,15 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
// 确认转移
function onOk(){
validateFields((error,values)=>{
- console.log(...values);
if(!error){
const url = `/${owner}/${repo}/applied_transfer_projects.json`;
Axios.post(url,{
...values
}).then(result=>{
- if(result){
+ if(result && result.data.id){
onSuccess(result.data && result.data.owner);
+ }else{
+ onSuccess();
}
}).catch(error=>{})
}
@@ -104,7 +105,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
:
- - 仓库仅可以转移到您已经加入的组织中,不可以转移到未加入的组织中
+ - 仓库仅可以转移到您具有管理权限的组织中
- 涉及到仓库改名操作,请提前做好仓库备份并且在转移后对本地仓库的remote进行修改
- 转移仓库到组织后,你和组织创建者/管理员同时拥有对该仓库的管理操作
diff --git a/src/forge/Head/AddProjectModal.jsx b/src/forge/Head/AddProjectModal.jsx
index 8e3073e3..81f1d27c 100644
--- a/src/forge/Head/AddProjectModal.jsx
+++ b/src/forge/Head/AddProjectModal.jsx
@@ -1,6 +1,7 @@
import React, { useState , forwardRef, useEffect } from 'react';
import { Form , Modal , Input , Radio } from 'antd';
import Axios from 'axios';
+import CheckProfile from '../Component/ProfileModal/Profile';
export default Form.create()(
forwardRef((props)=>{
@@ -77,7 +78,7 @@ export default Form.create()(
-
setVisible(true)}>加入项目
+
setVisible(true)}>加入项目
)
})
diff --git a/src/forge/Head/AppPullRefresh.jsx b/src/forge/Head/AppPullRefresh.jsx
new file mode 100644
index 00000000..2b9c7660
--- /dev/null
+++ b/src/forge/Head/AppPullRefresh.jsx
@@ -0,0 +1,108 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import { Icon } from 'antd';
+import _ from 'lodash';
+import Nodata from '../Nodata';
+
+
+class PullRefresh extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ }
+ this.pullRef = {};
+ // 节流
+ this.onScrollList = _.throttle(this.handleScroll, 200, {
+ leading: false,
+ trailing: true,
+ });
+ }
+
+ componentDidMount() {
+ let dom = document.querySelector('.pull-refresh-wrap');
+ dom && dom.addEventListener('scroll', this.onScrollList);
+ }
+
+ componentWillUnmount() {
+ let dom = document.querySelector('.pull-refresh-wrap');
+ dom && dom.removeEventListener('scroll', this.onScrollList)
+ }
+
+
+ handleScroll = () => {
+ if (this.props.count < this.props.pageSize) return;
+ if (this.props.type === 1 || this.props.type === 2) return;
+ const wrap = this.pullRef;
+ const currentScroll = wrap.scrollTop + wrap.clientHeight
+
+ // 触底
+ if (currentScroll >= (wrap.scrollHeight - 200)) {
+ this.loadData()
+ }
+ }
+
+
+ handleLoadClick = () => {
+ this.loadData();
+ }
+
+ loadData = () => {
+ this.props.onPullRefresh()
+ }
+
+
+ renderLoading() {
+ switch (this.props.type) {
+ case 0: // 加载更多
+ return
显示更多
+ case 1: // 加载中
+ return (
+
+
+ 加载中...
+
+ )
+ case 2: // 无样式
+ return
没有更多了
+ default:
+ return
没有更多了
+ }
+ }
+
+
+ render() {
+ const { className, count, children } = this.props;
+ return (
+
{ this.pullRef = dom }}
+ >
+
+ {children}
+
+ {
+ count < 1 &&
+ }
+
+ {/* 大于分页数据才显示loading */}
+ {/* {this.props.count >= this.props.pageSize ? this.renderLoading() : null} */}
+
+
+
+ )
+ }
+
+}
+
+
+PullRefresh.propTypes = {
+ className: PropTypes.string,
+ children: PropTypes.any,
+ onPullRefresh: PropTypes.func.isRequired,
+ type: PropTypes.oneOf([0, 1, 2]),
+ count: PropTypes.number.isRequired,
+ pageSize: PropTypes.number.isRequired,
+}
+
+
+export default PullRefresh
diff --git a/src/forge/Head/Footer.jsx b/src/forge/Head/Footer.jsx
index 568583ea..52c06858 100644
--- a/src/forge/Head/Footer.jsx
+++ b/src/forge/Head/Footer.jsx
@@ -19,7 +19,7 @@ function Footer(){
return(
-
+
{value && showhtml(value)}
{/*
diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js
index 7364ebd3..ac139351 100644
--- a/src/forge/Head/Header.js
+++ b/src/forge/Head/Header.js
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import AccountProfile from "../../modules/user/AccountProfile";
import { getImageUrl } from 'educoder'
import axios from 'axios';
-import { Input , notification , Dropdown , Menu } from 'antd';
+import { Input , notification , Dropdown ,Popover, Menu,Badge, Button } from 'antd';
import { Link } from 'react-router-dom';
import LoginDialog from '../../modules/login/LoginDialog';
@@ -10,8 +10,10 @@ import HeadSearch from '../Component/HeadSearch';
import AddProjectModal from './AddProjectModal';
import '../../modules/tpm/TPMIndex.css';
+import CheckProfile from '../Component/ProfileModal/Profile';
import './header.scss';
+import NoticeContent from './NoticeContent';
const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用
const { Search } = Input;
@@ -46,6 +48,7 @@ class NewHeader extends Component {
settings: null,
visiblemyss: false,
openSearch:false,
+ visible:false, //浮动消息框展示控制
}
}
componentDidMount() {
@@ -91,9 +94,6 @@ class NewHeader extends Component {
this.setState({
user: newProps.user
})
- if (newProps.Headertop !== undefined) {
- old_url = newProps.Headertop.old_url
- }
}
educoderlogin = () => {
@@ -120,7 +120,6 @@ class NewHeader extends Component {
})
};
HideAddcoursestypess = (i) => {
- console.log("调用了");
this.setState({
Addcoursestypes: false,
mydisplay: true,
@@ -222,6 +221,15 @@ class NewHeader extends Component {
}
}
}
+
+ checkProfile=(url)=>{
+ const { showCompeleteDialog , completeProfile } = this.props;
+ if(!completeProfile){
+ showCompeleteDialog && showCompeleteDialog();
+ }else{
+ window.location.href(url);
+ }
+ }
addMenu=(list)=>{
return(
@@ -231,21 +239,27 @@ class NewHeader extends Component {
{
list.map((item,key)=>{
return(
- (item.name !=="加入课堂" && item.name !=="加入开发项目") &&
{item.name}
+ (item.name !=="加入课堂" && item.name !=="加入开发项目") &&
+
+ {window.location.href=item.url}}>{item.name}
+
)
})
}
-
+
+
+
)
}
+
renderMenu=(personal)=>{
const { current_user } = this.props;
return(
)
}
+ handleVisibleChange = visible => {
+ this.setState({ visible });
+ };
+
render() {
- const { match} = this.props;
+ const { match ,resetUserInfo ,showNotification} = this.props;
let current_user = this.props.user;
let {
AccountProfiletype,
@@ -270,6 +288,7 @@ class NewHeader extends Component {
headtypesonClickbool,
headtypess,
settings,
+ visible,
} = this.state;
/*用户名称 用户头像url*/
let activeIndex = false;
@@ -347,8 +366,7 @@ class NewHeader extends Component {
})
}
- // let search_url = settings && settings.common && settings.common.search;
- let notice_url = settings && settings.common && settings.common.notice;
+ let search_url = settings && settings.common && settings.common.search;
return (