合并蔡世代码并解决冲突
This commit is contained in:
commit
03d568f5f7
|
@ -1,8 +1,8 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2340181 */
|
||||
src: url('iconfont.woff2?t=1628841816999') format('woff2'),
|
||||
url('iconfont.woff?t=1628841816999') format('woff'),
|
||||
url('iconfont.ttf?t=1628841816999') format('truetype');
|
||||
src: url('iconfont.woff2?t=1630465334247') format('woff2'),
|
||||
url('iconfont.woff?t=1630465334247') format('woff'),
|
||||
url('iconfont.ttf?t=1630465334247') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -13,6 +13,90 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-gerenziliao:before {
|
||||
content: "\e8c4";
|
||||
}
|
||||
|
||||
.icon-xinshouzhiyin:before {
|
||||
content: "\e8e4";
|
||||
}
|
||||
|
||||
.icon-xinjianxiangmu:before {
|
||||
content: "\e8e6";
|
||||
}
|
||||
|
||||
.icon-jiaruketang1:before {
|
||||
content: "\e8e9";
|
||||
}
|
||||
|
||||
.icon-xiangmugonggao:before {
|
||||
content: "\e8c2";
|
||||
}
|
||||
|
||||
.icon-chengguo:before {
|
||||
content: "\e8c3";
|
||||
}
|
||||
|
||||
.icon-chengjiaogonggao:before {
|
||||
content: "\e8c0";
|
||||
}
|
||||
|
||||
.icon-jishuzichan:before {
|
||||
content: "\e8c1";
|
||||
}
|
||||
|
||||
.icon-feibiaogonggao:before {
|
||||
content: "\e8bc";
|
||||
}
|
||||
|
||||
.icon-zhongbiaogonggao:before {
|
||||
content: "\e8bd";
|
||||
}
|
||||
|
||||
.icon-gengzhenggonggao:before {
|
||||
content: "\e8be";
|
||||
}
|
||||
|
||||
.icon-zhaobiaogonggao:before {
|
||||
content: "\e8bf";
|
||||
}
|
||||
|
||||
.icon-wenjian6:before {
|
||||
content: "\e8ba";
|
||||
}
|
||||
|
||||
.icon-wenjianjia4:before {
|
||||
content: "\e8bb";
|
||||
}
|
||||
|
||||
.icon-quxiaoguanzhu:before {
|
||||
content: "\e89a";
|
||||
}
|
||||
|
||||
.icon-dianzan_icon:before {
|
||||
content: "\e8a2";
|
||||
}
|
||||
|
||||
.icon-wenjian5:before {
|
||||
content: "\e896";
|
||||
}
|
||||
|
||||
.icon-wenjianjia3:before {
|
||||
content: "\e8a9";
|
||||
}
|
||||
|
||||
.icon-fuzhiicon:before {
|
||||
content: "\e886";
|
||||
}
|
||||
|
||||
.icon-zhuye-fill:before {
|
||||
content: "\e876";
|
||||
}
|
||||
|
||||
.icon-daimakuicon:before {
|
||||
content: "\e884";
|
||||
}
|
||||
|
||||
.icon-xinjian2:before {
|
||||
content: "\e8b0";
|
||||
}
|
||||
|
@ -29,22 +113,6 @@
|
|||
content: "\e8a6";
|
||||
}
|
||||
|
||||
.icon-dianzan_icon:before {
|
||||
content: "\e8ba";
|
||||
}
|
||||
|
||||
.icon-quxiaoguanzhu:before {
|
||||
content: "\e8bb";
|
||||
}
|
||||
|
||||
.icon-daimakuicon:before {
|
||||
content: "\e8a9";
|
||||
}
|
||||
|
||||
.icon-zhuyeicon:before {
|
||||
content: "\e884";
|
||||
}
|
||||
|
||||
.icon-biaoqianicon:before {
|
||||
content: "\e882";
|
||||
}
|
||||
|
@ -57,10 +125,6 @@
|
|||
content: "\e885";
|
||||
}
|
||||
|
||||
.icon-fuzhiicon:before {
|
||||
content: "\e886";
|
||||
}
|
||||
|
||||
.icon-lianjieicon:before {
|
||||
content: "\e887";
|
||||
}
|
||||
|
@ -93,10 +157,6 @@
|
|||
content: "\e899";
|
||||
}
|
||||
|
||||
.icon-wenjian5:before {
|
||||
content: "\e89a";
|
||||
}
|
||||
|
||||
.icon-tijiaoicon:before {
|
||||
content: "\e89e";
|
||||
}
|
||||
|
@ -105,10 +165,6 @@
|
|||
content: "\e89f";
|
||||
}
|
||||
|
||||
.icon-wenjianjia3:before {
|
||||
content: "\e8a2";
|
||||
}
|
||||
|
||||
.icon-xialaanniu1:before {
|
||||
content: "\e8a4";
|
||||
}
|
||||
|
@ -241,10 +297,6 @@
|
|||
content: "\e875";
|
||||
}
|
||||
|
||||
.icon-fuzhi_icon:before {
|
||||
content: "\e876";
|
||||
}
|
||||
|
||||
.icon-shanchuicon:before {
|
||||
content: "\e877";
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,153 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "24014152",
|
||||
"name": "个人资料",
|
||||
"font_class": "gerenziliao",
|
||||
"unicode": "e8c4",
|
||||
"unicode_decimal": 59588
|
||||
},
|
||||
{
|
||||
"icon_id": "23655968",
|
||||
"name": "新手指引",
|
||||
"font_class": "xinshouzhiyin",
|
||||
"unicode": "e8e4",
|
||||
"unicode_decimal": 59620
|
||||
},
|
||||
{
|
||||
"icon_id": "23655969",
|
||||
"name": "新建项目",
|
||||
"font_class": "xinjianxiangmu",
|
||||
"unicode": "e8e6",
|
||||
"unicode_decimal": 59622
|
||||
},
|
||||
{
|
||||
"icon_id": "23658111",
|
||||
"name": "加入课堂",
|
||||
"font_class": "jiaruketang1",
|
||||
"unicode": "e8e9",
|
||||
"unicode_decimal": 59625
|
||||
},
|
||||
{
|
||||
"icon_id": "23791639",
|
||||
"name": "项目公告",
|
||||
"font_class": "xiangmugonggao",
|
||||
"unicode": "e8c2",
|
||||
"unicode_decimal": 59586
|
||||
},
|
||||
{
|
||||
"icon_id": "23791640",
|
||||
"name": "成果",
|
||||
"font_class": "chengguo",
|
||||
"unicode": "e8c3",
|
||||
"unicode_decimal": 59587
|
||||
},
|
||||
{
|
||||
"icon_id": "23791410",
|
||||
"name": "成交公告",
|
||||
"font_class": "chengjiaogonggao",
|
||||
"unicode": "e8c0",
|
||||
"unicode_decimal": 59584
|
||||
},
|
||||
{
|
||||
"icon_id": "23791411",
|
||||
"name": "技术资产",
|
||||
"font_class": "jishuzichan",
|
||||
"unicode": "e8c1",
|
||||
"unicode_decimal": 59585
|
||||
},
|
||||
{
|
||||
"icon_id": "23790928",
|
||||
"name": "废标公告",
|
||||
"font_class": "feibiaogonggao",
|
||||
"unicode": "e8bc",
|
||||
"unicode_decimal": 59580
|
||||
},
|
||||
{
|
||||
"icon_id": "23790929",
|
||||
"name": "中标公告",
|
||||
"font_class": "zhongbiaogonggao",
|
||||
"unicode": "e8bd",
|
||||
"unicode_decimal": 59581
|
||||
},
|
||||
{
|
||||
"icon_id": "23790930",
|
||||
"name": "更正公告",
|
||||
"font_class": "gengzhenggonggao",
|
||||
"unicode": "e8be",
|
||||
"unicode_decimal": 59582
|
||||
},
|
||||
{
|
||||
"icon_id": "23790931",
|
||||
"name": "招标公告",
|
||||
"font_class": "zhaobiaogonggao",
|
||||
"unicode": "e8bf",
|
||||
"unicode_decimal": 59583
|
||||
},
|
||||
{
|
||||
"icon_id": "23732532",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian6",
|
||||
"unicode": "e8ba",
|
||||
"unicode_decimal": 59578
|
||||
},
|
||||
{
|
||||
"icon_id": "23732533",
|
||||
"name": "文件夹",
|
||||
"font_class": "wenjianjia4",
|
||||
"unicode": "e8bb",
|
||||
"unicode_decimal": 59579
|
||||
},
|
||||
{
|
||||
"icon_id": "23642443",
|
||||
"name": "取消关注",
|
||||
"font_class": "quxiaoguanzhu",
|
||||
"unicode": "e89a",
|
||||
"unicode_decimal": 59546
|
||||
},
|
||||
{
|
||||
"icon_id": "23642444",
|
||||
"name": "点赞_icon",
|
||||
"font_class": "dianzan_icon",
|
||||
"unicode": "e8a2",
|
||||
"unicode_decimal": 59554
|
||||
},
|
||||
{
|
||||
"icon_id": "23639530",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian5",
|
||||
"unicode": "e896",
|
||||
"unicode_decimal": 59542
|
||||
},
|
||||
{
|
||||
"icon_id": "23639533",
|
||||
"name": "文件夹",
|
||||
"font_class": "wenjianjia3",
|
||||
"unicode": "e8a9",
|
||||
"unicode_decimal": 59561
|
||||
},
|
||||
{
|
||||
"icon_id": "23639440",
|
||||
"name": "复制icon",
|
||||
"font_class": "fuzhiicon",
|
||||
"unicode": "e886",
|
||||
"unicode_decimal": 59526
|
||||
},
|
||||
{
|
||||
"icon_id": "23639422",
|
||||
"name": "主页-fill",
|
||||
"font_class": "zhuye-fill",
|
||||
"unicode": "e876",
|
||||
"unicode_decimal": 59510
|
||||
},
|
||||
{
|
||||
"icon_id": "23639423",
|
||||
"name": "代码库icon",
|
||||
"font_class": "daimakuicon",
|
||||
"unicode": "e884",
|
||||
"unicode_decimal": 59524
|
||||
},
|
||||
{
|
||||
"icon_id": "23572260",
|
||||
"name": "新建",
|
||||
|
@ -33,34 +180,6 @@
|
|||
"unicode": "e8a6",
|
||||
"unicode_decimal": 59558
|
||||
},
|
||||
{
|
||||
"icon_id": "23492900",
|
||||
"name": "点赞_icon",
|
||||
"font_class": "dianzan_icon",
|
||||
"unicode": "e8ba",
|
||||
"unicode_decimal": 59578
|
||||
},
|
||||
{
|
||||
"icon_id": "23492901",
|
||||
"name": "取消关注",
|
||||
"font_class": "quxiaoguanzhu",
|
||||
"unicode": "e8bb",
|
||||
"unicode_decimal": 59579
|
||||
},
|
||||
{
|
||||
"icon_id": "23473151",
|
||||
"name": "代码库icon",
|
||||
"font_class": "daimakuicon",
|
||||
"unicode": "e8a9",
|
||||
"unicode_decimal": 59561
|
||||
},
|
||||
{
|
||||
"icon_id": "23473104",
|
||||
"name": "主页icon",
|
||||
"font_class": "zhuyeicon",
|
||||
"unicode": "e884",
|
||||
"unicode_decimal": 59524
|
||||
},
|
||||
{
|
||||
"icon_id": "23472253",
|
||||
"name": "标签icon",
|
||||
|
@ -82,13 +201,6 @@
|
|||
"unicode": "e885",
|
||||
"unicode_decimal": 59525
|
||||
},
|
||||
{
|
||||
"icon_id": "23472257",
|
||||
"name": "复制icon",
|
||||
"font_class": "fuzhiicon",
|
||||
"unicode": "e886",
|
||||
"unicode_decimal": 59526
|
||||
},
|
||||
{
|
||||
"icon_id": "23472258",
|
||||
"name": "链接icon",
|
||||
|
@ -145,13 +257,6 @@
|
|||
"unicode": "e899",
|
||||
"unicode_decimal": 59545
|
||||
},
|
||||
{
|
||||
"icon_id": "23472268",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian5",
|
||||
"unicode": "e89a",
|
||||
"unicode_decimal": 59546
|
||||
},
|
||||
{
|
||||
"icon_id": "23472269",
|
||||
"name": "提交icon",
|
||||
|
@ -166,13 +271,6 @@
|
|||
"unicode": "e89f",
|
||||
"unicode_decimal": 59551
|
||||
},
|
||||
{
|
||||
"icon_id": "23472271",
|
||||
"name": "文件夹",
|
||||
"font_class": "wenjianjia3",
|
||||
"unicode": "e8a2",
|
||||
"unicode_decimal": 59554
|
||||
},
|
||||
{
|
||||
"icon_id": "23472272",
|
||||
"name": "下拉按钮",
|
||||
|
@ -404,13 +502,6 @@
|
|||
"unicode": "e875",
|
||||
"unicode_decimal": 59509
|
||||
},
|
||||
{
|
||||
"icon_id": "23046262",
|
||||
"name": "复制_icon",
|
||||
"font_class": "fuzhi_icon",
|
||||
"unicode": "e876",
|
||||
"unicode_decimal": 59510
|
||||
},
|
||||
{
|
||||
"icon_id": "23046268",
|
||||
"name": "删除icon",
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,16 +1,10 @@
|
|||
import React, { useState } from 'react';
|
||||
import { Dropdown, Menu, Tooltip } from 'antd';
|
||||
import { Menu } from 'antd';
|
||||
import "./branch.scss";
|
||||
import CopyTool from '../Component/CopyTool';
|
||||
|
||||
function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
|
||||
const [ key , setKey ] = useState("HTTP");
|
||||
// 点击按钮复制功能
|
||||
function jsCopy(){
|
||||
var e = document.getElementById("copy_rep_content");
|
||||
e.select();
|
||||
document.execCommand("Copy");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="downMenu">
|
||||
<div style={{padding:"10px 20px 20px 20px",borderBottom:"1px solid #eee"}}>
|
||||
|
@ -20,9 +14,7 @@ function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
|
|||
</Menu>
|
||||
<div className="gitAddressClone">
|
||||
<input type="text" id="copy_rep_content" value={key==="HTTP" ? http_url:ssh_url} />
|
||||
<Tooltip title="复制链接">
|
||||
<span className="color-blue" onClick={jsCopy}><i className="iconfont icon-fuzhi"></i></span>
|
||||
</Tooltip>
|
||||
<CopyTool inputId="copy_rep_content" className="copytool"/>
|
||||
</div>
|
||||
</div>
|
||||
<Menu className="edu-txt-center">
|
||||
|
|
|
@ -102,4 +102,7 @@
|
|||
border-color:transparent ;
|
||||
}
|
||||
}
|
||||
}
|
||||
.copytool{
|
||||
margin:0px 10px;
|
||||
}
|
|
@ -9,24 +9,32 @@ CopyTool.defaultProps = {
|
|||
};
|
||||
|
||||
|
||||
function CopyTool({ beforeText, afterText, className,inputId }) {
|
||||
function CopyTool({ beforeText, afterText, className , inputId , timeOut }) {
|
||||
const [title, setTitle] = useState(() => {
|
||||
return beforeText;
|
||||
});
|
||||
|
||||
// 复制链接
|
||||
const copyUrl = useCallback(() => {
|
||||
let inputDom = document.getElementById(inputId);
|
||||
if (!inputDom) {
|
||||
const copyEle = document.querySelector(`#${inputId}`); // 获取要复制的节点
|
||||
if (!copyEle) {
|
||||
console.error("您的CopyTool未设置正确的inputId");
|
||||
return;
|
||||
}
|
||||
inputDom.select();
|
||||
const range = document.createRange(); // 创造range
|
||||
window.getSelection().removeAllRanges(); //清除页面中已有的selection
|
||||
range.selectNode(copyEle); // 选中需要复制的节点
|
||||
window.getSelection().addRange(range); // 执行选中元素
|
||||
|
||||
if (document.execCommand('copy')) {
|
||||
document.execCommand('copy');
|
||||
}
|
||||
setTitle(afterText);
|
||||
inputDom.blur();
|
||||
if(timeOut){
|
||||
setTimeout(function(){
|
||||
setTitle(beforeText);
|
||||
},1500)
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { AlignCenter } from '../layout';
|
||||
import { Modal , Button } from 'antd';
|
||||
import './Index.scss';
|
||||
import { Button } from 'antd';
|
||||
import Modals from '../PublicModal/Index';
|
||||
|
||||
function DeleteBox({
|
||||
visible ,
|
||||
|
@ -12,24 +12,22 @@ function DeleteBox({
|
|||
content
|
||||
}) {
|
||||
return(
|
||||
<Modal
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
title={title}
|
||||
width="600px"
|
||||
className="deleteBox"
|
||||
footer={
|
||||
<Modals
|
||||
title={title}
|
||||
btn={
|
||||
<div>
|
||||
<Button size={'large'} onClick={onCancel}>取消</Button>
|
||||
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
onCancel={onCancel}
|
||||
visible={visible}
|
||||
>
|
||||
<div className="desc">
|
||||
<AlignCenter className="descMain"><i className="iconfont icon-shanchu_tc_icon mr10"></i>{content}</AlignCenter>
|
||||
<p>{subTitle}</p>
|
||||
<p>{subTitle}</p>
|
||||
</div>
|
||||
</Modal>
|
||||
</Modals>
|
||||
)
|
||||
}
|
||||
export default DeleteBox;
|
|
@ -1,6 +1,6 @@
|
|||
.ant-modal-mask{
|
||||
z-index: 1001;
|
||||
z-index: 1031;
|
||||
}
|
||||
.ant-modal-wrap{
|
||||
z-index: 1002;
|
||||
z-index: 1032;
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
import React , { useEffect , useState } from 'react';
|
||||
import Modals from '../PublicModal/Index';
|
||||
import { Button } from 'antd';
|
||||
import axios from 'axios';
|
||||
|
||||
import './Index.scss';
|
||||
|
||||
function ProfileModal({visible,onCancel,history}) {
|
||||
const [ modalVis , setModalVis ] = useState(visible);
|
||||
const [ addMemberCheck , setAddMemberCheck ] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
axios.interceptors.response.use((response) => {
|
||||
if (response && (response.data.status === 411 || response.data.status === 412)) {
|
||||
setModalVis(true);
|
||||
if(response.data.status === 412){
|
||||
setAddMemberCheck(true);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}, (error) => {
|
||||
});
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
setModalVis(visible);
|
||||
},[visible])
|
||||
|
||||
function onOk(){
|
||||
onCancel();
|
||||
setModalVis(false);
|
||||
setTimeout(function(){
|
||||
window.open(`/settings/profile`,"_blank");
|
||||
},200)
|
||||
}
|
||||
|
||||
function onNo() {
|
||||
onCancel();
|
||||
setModalVis(false);
|
||||
}
|
||||
|
||||
return(
|
||||
<Modals
|
||||
title="完善资料"
|
||||
onCancel={onNo}
|
||||
visible={modalVis}
|
||||
btn={
|
||||
addMemberCheck?
|
||||
<div>
|
||||
<Button type={'primary'} size={"large"} onClick={onNo}>好的</Button>
|
||||
</div>
|
||||
:
|
||||
<div>
|
||||
<Button size={"large"} onClick={onNo}>暂不补充</Button>
|
||||
<Button type={'primary'} size={"large"} onClick={onOk}>好的</Button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{
|
||||
addMemberCheck ?
|
||||
<p>目标用户个人资料不完整,需提醒目标用户补充资料后以进行后续操作</p>
|
||||
:
|
||||
<p>您目前的个人资料不完整,需要补充资料以进行后续操作。是否前往补充个人信息?</p>
|
||||
}
|
||||
</Modals>
|
||||
)
|
||||
}
|
||||
export default ProfileModal;
|
|
@ -0,0 +1,17 @@
|
|||
import React from 'react';
|
||||
|
||||
function Profile({children,sureFunc,showCompeleteDialog , completeProfile, className}) {
|
||||
|
||||
function checkProfile() {
|
||||
if(!completeProfile){
|
||||
showCompeleteDialog && showCompeleteDialog();
|
||||
}else{
|
||||
sureFunc();
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
<a className={className} onClick={checkProfile}>{children}</a>
|
||||
)
|
||||
}
|
||||
export default Profile;
|
|
@ -0,0 +1,19 @@
|
|||
import React from 'react';
|
||||
import { Modal } from 'antd';
|
||||
import './Index.scss';
|
||||
|
||||
function Modals({title,children,btn,onCancel,visible}) {
|
||||
return(
|
||||
<Modal
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
title={title}
|
||||
width="600px"
|
||||
className="deleteBox"
|
||||
footer={btn}
|
||||
>
|
||||
{children}
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
export default Modals;
|
|
@ -32,14 +32,23 @@
|
|||
border-top: none;
|
||||
text-align: center;
|
||||
padding-bottom: 40px;
|
||||
button{
|
||||
button,a{
|
||||
width: 120px;
|
||||
margin:0px 20px;
|
||||
&.ant-btn{
|
||||
border-color: #D0D0D0;
|
||||
color: #666;
|
||||
}
|
||||
&.ant-btn-danger{
|
||||
background-color: #fff;
|
||||
color: #DF0002;
|
||||
border-color: #D0D0D0;
|
||||
}
|
||||
&.ant-btn.ant-btn-primary{
|
||||
background-color: #fff;
|
||||
color: #466AFF;
|
||||
border-color: #D0D0D0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -41,15 +41,19 @@ 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){
|
||||
onSuccess(result.data && result.data.owner);
|
||||
if(result.data.status === 0){
|
||||
onSuccess(result.data && result.data.owner);
|
||||
}else{
|
||||
onSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(error=>{})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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()(
|
|||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
<a onClick={()=>setVisible(true)}>加入项目</a>
|
||||
<CheckProfile {...props} sureFunc={()=>setVisible(true)}>加入项目</CheckProfile>
|
||||
</React.Fragment>
|
||||
)
|
||||
})
|
||||
|
|
|
@ -10,6 +10,7 @@ import HeadSearch from '../Component/HeadSearch';
|
|||
|
||||
import AddProjectModal from './AddProjectModal';
|
||||
import '../../modules/tpm/TPMIndex.css';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import './header.scss';
|
||||
const $ = window.$
|
||||
|
@ -222,6 +223,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,11 +241,16 @@ class NewHeader extends Component {
|
|||
{
|
||||
list.map((item,key)=>{
|
||||
return(
|
||||
(item.name !=="加入课堂" && item.name !=="加入开发项目") && <Menu.Item key={item.name+key}><a href={item.url}>{item.name}</a></Menu.Item>
|
||||
(item.name !=="加入课堂" && item.name !=="加入开发项目") &&
|
||||
<Menu.Item key={item.name+key}>
|
||||
<CheckProfile {...this.props} sureFunc={()=>{window.location.href=item.url}}>{item.name}</CheckProfile>
|
||||
</Menu.Item>
|
||||
)
|
||||
})
|
||||
}
|
||||
<Menu.Item><AddProjectModal showNotification={this.props.showNotification}/></Menu.Item>
|
||||
<Menu.Item>
|
||||
<AddProjectModal {...this.props} showNotification={this.props.showNotification}/>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -20,6 +20,7 @@ import DrawerPanel from '../Component/DrawerPanel';
|
|||
import UpdateDescModal from './sub/UpdateDescModal';
|
||||
import Nodata from '../Nodata';
|
||||
import Invite from './sub/Invite';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
/**
|
||||
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
||||
*/
|
||||
|
@ -364,11 +365,11 @@ function CoderDepot(props){
|
|||
<div className="mr20 addOptionBtn">
|
||||
{
|
||||
projectDetail.type !== 2 && pullsFlag &&
|
||||
<a onClick={()=>urlLink(`/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</a>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</CheckProfile>
|
||||
}
|
||||
{
|
||||
issuesFlag &&
|
||||
<a onClick={()=>urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 任务</a>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 任务</CheckProfile>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
@ -454,7 +455,10 @@ function CoderDepot(props){
|
|||
<Gap style={{paddingLeft:"30px"}}>
|
||||
<div className="panelmenu">
|
||||
<FlexAJ className="font-18 color-grey-6 mb20" style={{lineHeight:"28px"}}>简介
|
||||
{projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner") && <i onClick={()=>setOpenModal(true)} className="iconfont icon-anquanshezhi color-grey-9 font-15"></i>}
|
||||
{
|
||||
projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner" || projectDetail.permission==="Manager") &&
|
||||
<i onClick={()=>setOpenModal(true)} className="iconfont icon-anquanshezhi color-grey-9 font-15"></i>
|
||||
}
|
||||
</FlexAJ>
|
||||
{desc && <p className="font-14 color-grey-9 mb15 task-hide-2" style={{lineHeight:"22px",WebkitLineClamp:"4",textAlign:"justify",wordBreak:"break-all"}}>{desc}</p>}
|
||||
{
|
||||
|
|
|
@ -1,26 +1,15 @@
|
|||
import React from 'react';
|
||||
import { Tooltip , message } from 'antd';
|
||||
import './sub.scss';
|
||||
import CopyTool from '../../Component/CopyTool';
|
||||
|
||||
function Invite({code,className}) {
|
||||
|
||||
function jsCopy(id) {
|
||||
const copyEle = document.querySelector(id); // 获取要复制的节点
|
||||
const range = document.createRange(); // 创造range
|
||||
window.getSelection().removeAllRanges(); //清除页面中已有的selection
|
||||
range.selectNode(copyEle); // 选中需要复制的节点
|
||||
window.getSelection().addRange(range); // 执行选中元素
|
||||
document.execCommand("Copy"); // 执行copy操作
|
||||
message.success('复制成功');
|
||||
}
|
||||
return(
|
||||
<div className={className}>
|
||||
<span className="font-16 color-grey-6">邀请码</span>
|
||||
<div>
|
||||
<span id="devitecode">{code}</span>
|
||||
<Tooltip title={<p className="edu-txt-center">可以通过邀请码邀请成员加入项目<br/>点击复制邀请码。</p>} placement={"bottom"}>
|
||||
<i className="iconfont icon-fuzhi2 font-16 color-blue ml8" onClick={()=>jsCopy("#devitecode")}></i>
|
||||
</Tooltip>
|
||||
<CopyTool timeOut={true} beforeText={<p className="edu-txt-center">可以通过邀请码邀请成员加入项目<br/>点击复制邀请码。</p>} className="ml8 font-16" inputId="devitecode"/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -8,6 +8,7 @@ import MergeItem from "./MergeItem";
|
|||
import './Index.scss';
|
||||
|
||||
import axios from "axios";
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const Search = Input.Search;
|
||||
/**
|
||||
|
@ -256,9 +257,9 @@ class merge extends Component {
|
|||
</div>
|
||||
{
|
||||
data && data.user_admin_or_developer &&
|
||||
<a className="topWrapper_btn ml10" onClick={() => this.checkOperation()}>
|
||||
<CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={() => this.checkOperation()}>
|
||||
+ 新建合并请求
|
||||
</a>
|
||||
</CheckProfile>
|
||||
}
|
||||
</div>
|
||||
<div className="f-wrap-between screenWrap">
|
||||
|
|
|
@ -4,6 +4,7 @@ import { Dropdown, Icon, Menu, Pagination, Typography, Popconfirm, Spin } from '
|
|||
import NoneData from '../Nodata';
|
||||
import axios from 'axios';
|
||||
import './order.css';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
|
@ -187,7 +188,7 @@ class Milepost extends Component {
|
|||
</ul>
|
||||
{
|
||||
data && data.user_admin_or_member ?
|
||||
<Link to={`/${owner}/${projectsId}/milestones/new`} className="topWrapper_btn">新的里程碑</Link>
|
||||
<CheckProfile {...this.props} className="topWrapper_btn" sureFunc={() => {this.props.history.push(`/${owner}/${projectsId}/milestones/new`)}}>新的里程碑</CheckProfile>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,8 @@ import React, { Component } from "react";
|
|||
import { Link } from 'react-router-dom';
|
||||
import { Dropdown, Menu, Icon, Pagination, Spin } from 'antd';
|
||||
import './order.css';
|
||||
import { FlexAJ } from '../Component/layout'
|
||||
import { FlexAJ } from '../Component/layout';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import NoneData from '../Nodata';
|
||||
import OrderItem from './OrderItem';
|
||||
|
@ -239,7 +240,7 @@ class MilepostDetail extends Component {
|
|||
</span>
|
||||
<div className="milepostdiv">
|
||||
<Link to={`/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
||||
<Link to={`/${owner}/${projectsId}/issues/${meilid}/new`} className="topWrapper_btn">创建易修</Link>
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建易修</CheckProfile>
|
||||
</div>
|
||||
</FlexAJ>
|
||||
</div>
|
||||
|
|
|
@ -44,6 +44,7 @@ class OrderItem extends Component {
|
|||
render() {
|
||||
const { item , checkbox , mile , user_admin_or_member } = this.props;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { orderid , isdisplay } = this.state;
|
||||
const { current_user } = this.props;
|
||||
return (
|
||||
item &&
|
||||
|
@ -91,12 +92,21 @@ class OrderItem extends Component {
|
|||
<Link to={`/${owner}/${projectsId}/issues/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link>
|
||||
{
|
||||
user_admin_or_member ?
|
||||
<div id="hoverBox" style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}>
|
||||
<div style={{ display: orderid === item.id && isdisplay ? 'flex' : 'none' }}>
|
||||
<div className="mr8 ml8 color-grey-9">
|
||||
<Link to={`/${owner}/${projectsId}/issues/${item.id}/updatedetail`} className="color-grey-9"><i className="iconfont icon-bianji3 font-14 mr5"></i></Link>
|
||||
<Link to={`/${owner}/${projectsId}/issues/${item.id}/updatedetail`} className="color-grey-9">
|
||||
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="color-grey-9">
|
||||
<Popconfirm placement="bottom" overlayClassName="overlayBox" getPopupContainer={()=>document.getElementById("hoverBox")} title={'您确定要删除当前易修吗?'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
|
||||
<Popconfirm
|
||||
placement="bottom"
|
||||
overlayClassName={orderid === item.id && isdisplay ? "overlayBox" : "overlayBox hideOverlay" }
|
||||
title={'您确定要删除当前易修吗?'}
|
||||
okText="是"
|
||||
cancelText="否"
|
||||
onConfirm={() => this.deletedetail(item.id)}
|
||||
>
|
||||
<i className="iconfont icon-yiguanbi1 font-14"></i>
|
||||
</Popconfirm>
|
||||
</div>
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
.overlayBox{
|
||||
width: 230px;
|
||||
}
|
||||
.hideOverlay{
|
||||
display: none;
|
||||
}
|
||||
.topmilepost {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import React, { Component } from "react";
|
||||
import { Input, Dropdown, Menu, Icon, Pagination, Spin, DatePicker, Checkbox } from "antd";
|
||||
import { Link } from 'react-router-dom';
|
||||
import "./order.css";
|
||||
import './index.scss';
|
||||
import moment from 'moment';
|
||||
|
||||
import NoneData from "../Nodata";
|
||||
import OrderItem from "./OrderItem";
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import axios from "axios";
|
||||
|
||||
|
@ -351,9 +351,9 @@ class order extends Component {
|
|||
if(data && data.user_admin_or_member){
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
return(
|
||||
<Link className="topWrapper_btn ml10" target="_blank" to={`/${owner}/${projectsId}/issues/new`}>
|
||||
<CheckProfile {...this.props} className="topWrapper_btn ml10" sureFunc={()=>{window.open(`/${owner}/${projectsId}/issues/new`,'_blank')}}>
|
||||
+ 创建易修
|
||||
</Link>
|
||||
</CheckProfile>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,10 @@ const SSHNew = Loadable({
|
|||
loader: () => import("./sub/New"),
|
||||
loading: Loading,
|
||||
});
|
||||
const Profile = Loadable({
|
||||
loader: () => import("../users/Material/Index"),
|
||||
loading: Loading,
|
||||
});
|
||||
const SSHIndex = Loadable({
|
||||
loader: () => import("./sub/SSH"),
|
||||
loading: Loading,
|
||||
|
@ -39,6 +43,10 @@ function Index(props){
|
|||
<li>安全设置</li>
|
||||
<li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i>SSH密钥</Link></li>
|
||||
</ul>
|
||||
<ul className="securityUl">
|
||||
<li>个人信息</li>
|
||||
<li className={pathname.indexOf("/settings/profile")>-1 ?"active":""}><Link to={`/settings/profile`}><i className="iconfont icon-gerenziliao mr5 font-14"></i>基本资料</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
<LongWidth>
|
||||
<Gap>
|
||||
|
@ -49,6 +57,12 @@ function Index(props){
|
|||
<SSHNew {...props} {...p}/>
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/settings/profile"
|
||||
render={(p) => (
|
||||
<Profile {...props} {...p}/>
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/settings/SSH"
|
||||
render={(p) => (
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
.securityUl{
|
||||
padding:20px 16px;
|
||||
color: #333;
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
li{
|
||||
margin-bottom: 10px;
|
||||
height: 27px;
|
||||
|
@ -124,7 +126,6 @@
|
|||
}
|
||||
.deleteBox{
|
||||
.ant-modal-header{
|
||||
background-color: rgba(223, 0, 2, 0.06);
|
||||
border-bottom: none;
|
||||
.ant-modal-title{
|
||||
text-align: left;
|
||||
|
|
|
@ -221,10 +221,14 @@ class Setting extends Component {
|
|||
}
|
||||
// 确定转移仓库
|
||||
onSuccess=(owner)=>{
|
||||
if(owner){
|
||||
this.setState({
|
||||
is_transfering:true,
|
||||
transfer:owner
|
||||
})
|
||||
}
|
||||
this.setState({
|
||||
is_transfering:true,
|
||||
divertVisible:false,
|
||||
transfer:owner
|
||||
divertVisible:false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import './Index.scss';
|
|||
import Item from './ListItem';
|
||||
import Right from './RightBox';
|
||||
import NoData from '../Nodata';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import { Menu , Pagination , Dropdown , Spin } from 'antd';
|
||||
import axios from 'axios';
|
||||
|
@ -61,8 +62,12 @@ function List(props){
|
|||
)
|
||||
const menu_new=(
|
||||
<Menu>
|
||||
<Menu.Item key="updated_on"><Link to={`/projects/deposit/new/${OIdentifier}`}>新建托管项目</Link></Menu.Item>
|
||||
<Menu.Item key="created_on"><Link to={`/projects/mirror/new/${OIdentifier}`}>新建镜像项目</Link></Menu.Item>
|
||||
<Menu.Item key="updated_on">
|
||||
<CheckProfile {...props} sureFunc={()=>{props.history.push(`/projects/deposit/new/${OIdentifier}`)}}>新建托管项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="created_on">
|
||||
<CheckProfile {...props} sureFunc={()=>{props.history.push(`/projects/mirror/new/${OIdentifier}`)}}>新建镜像项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
|
||||
|
@ -106,7 +111,13 @@ function List(props){
|
|||
</div>
|
||||
}
|
||||
</div>
|
||||
<Right admin={organizeDetail && organizeDetail.is_admin} OIdentifier={OIdentifier} history={props.history}/>
|
||||
<Right
|
||||
admin={organizeDetail && organizeDetail.is_admin}
|
||||
OIdentifier={OIdentifier}
|
||||
showCompeleteDialog={props.showCompeleteDialog}
|
||||
completeProfile={props.completeProfile}
|
||||
history={props.history}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React , { useEffect , useState } from 'react';
|
||||
import { Button } from 'antd';
|
||||
import styled from 'styled-components';
|
||||
import Box from './Box';
|
||||
import axios from 'axios';
|
||||
|
@ -7,6 +6,8 @@ import { getImageUrl } from 'educoder';
|
|||
import { Link } from 'react-router-dom';
|
||||
import Nodata from '../Nodata';
|
||||
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const Span = styled.span`{
|
||||
color:#888;
|
||||
font-size:12px;
|
||||
|
@ -36,7 +37,7 @@ const Img = styled.img`{
|
|||
height:45px;
|
||||
margin-right:12px;
|
||||
}`
|
||||
function RightBox({ OIdentifier , history , admin }) {
|
||||
function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,completeProfile }) {
|
||||
const [ memberData, setMemberData ] = useState(undefined);
|
||||
const [ groupData, setGroupData ] = useState(undefined);
|
||||
|
||||
|
@ -87,7 +88,15 @@ function RightBox({ OIdentifier , history , admin }) {
|
|||
<Box
|
||||
name="组织团队"
|
||||
count={groupData && groupData.total_count}
|
||||
bottom={admin && <Button type={'primary'} onClick={()=>history.push(`/${OIdentifier}/teams/new`)}>新建团队</Button>}
|
||||
bottom={
|
||||
admin &&
|
||||
<CheckProfile
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
completeProfile={completeProfile}
|
||||
sureFunc={()=>history.push(`/${OIdentifier}/teams/new`)}
|
||||
className={"ant-btn ant-btn-primary"}
|
||||
>新建团队</CheckProfile>
|
||||
}
|
||||
url={`/${OIdentifier}/teams`}
|
||||
>
|
||||
{
|
||||
|
|
|
@ -19,7 +19,9 @@ function FocusButton({is_watch , fontClass, starText, is_block , id , successFun
|
|||
}).then((result) => {
|
||||
if (result && result.data.status === 0) {
|
||||
successFunc && successFunc();
|
||||
setWatchFlag(!watchFlag);
|
||||
if(!flag){
|
||||
setWatchFlag(!watchFlag);
|
||||
}
|
||||
}
|
||||
setIsSpin(false);
|
||||
})
|
||||
|
|
|
@ -76,6 +76,8 @@ class comments extends Component {
|
|||
content: "",
|
||||
reply_content: undefined,
|
||||
});
|
||||
this.state.new_journal_id = result.data.id;
|
||||
this.getjournalslist(page, limit);
|
||||
this.setState({
|
||||
showFiles: false,
|
||||
content: "",
|
||||
|
@ -86,10 +88,13 @@ class comments extends Component {
|
|||
journal_spin: false,
|
||||
attachment_clean: false,
|
||||
});
|
||||
this.state.new_journal_id = result.data.id;
|
||||
this.getjournalslist(page, limit);
|
||||
}
|
||||
this.props.showNotification(result.data.message);
|
||||
this.setState({
|
||||
journal_spin: false
|
||||
});
|
||||
if(result && result.data.status !== 411){
|
||||
this.props.showNotification(result.data.message);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
|
|
|
@ -218,6 +218,7 @@ ul.ant-menu.menuStyle{
|
|||
border-bottom: 2px solid transparent!important;
|
||||
position: relative;
|
||||
a{
|
||||
font-size: 16px;
|
||||
& >i{
|
||||
font-size: 15px!important;
|
||||
margin-right: 8px;
|
||||
|
|
|
@ -221,7 +221,7 @@ class Infos extends Component {
|
|||
{user && user.description}
|
||||
</div>
|
||||
<div>
|
||||
{user && current_user && user.login === current_user.login && (
|
||||
{/* {user && current_user && user.login === current_user.login && (
|
||||
<div className="user-info-star-button ">
|
||||
<Button
|
||||
block
|
||||
|
@ -234,7 +234,7 @@ class Infos extends Component {
|
|||
修改资料
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
)} */}
|
||||
{current_user && user && user.login !== current_user.login && (
|
||||
<div className="user-info-star-button ">
|
||||
<FocusButton
|
||||
|
@ -349,18 +349,18 @@ class Infos extends Component {
|
|||
return <Organize {...this.props} {...this.state} />;
|
||||
}}
|
||||
></Route>
|
||||
<Route
|
||||
{/* <Route
|
||||
path="/:username/info"
|
||||
render={() => {
|
||||
return <UpdateInfo {...this.props} {...this.state} resetUser={this.resetUser}/>;
|
||||
}}
|
||||
></Route>
|
||||
<Route
|
||||
></Route> */}
|
||||
{/* <Route
|
||||
path="/:username/password"
|
||||
render={() => {
|
||||
return <UpdateInfo {...this.props} {...this.state}/>;
|
||||
}}
|
||||
></Route>
|
||||
></Route> */}
|
||||
|
||||
<Route
|
||||
path="/:username/statistics"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Menu, Input, Spin, Pagination, Popover, Button, Divider } from "antd";
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import axios from "axios";
|
||||
import ListItem from "../Main/IndexItem";
|
||||
|
@ -74,6 +74,7 @@ class InfosUser extends Component {
|
|||
|
||||
//切换种类
|
||||
changeCategory = (cate) => {
|
||||
this.state.page = 1;
|
||||
this.state.category = cate.target.value;
|
||||
this.get_projects();
|
||||
};
|
||||
|
@ -115,14 +116,15 @@ class InfosUser extends Component {
|
|||
newItem =()=> (
|
||||
<Menu>
|
||||
<Menu.Item key="created_mirror">
|
||||
<Link to={`/projects/mirror/new`}>新建镜像项目</Link>
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/mirror/new')}}>新建镜像项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="created_deposit">
|
||||
<Link to={`/projects/deposit/new`}>新建托管项目</Link>
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/deposit/new')}} >新建托管项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
||||
category_button=(category)=>{
|
||||
const { current_user, user } = this.props;
|
||||
const button_lists =
|
||||
|
@ -187,7 +189,7 @@ class InfosUser extends Component {
|
|||
{current_user && user && current_user.login === user.login && (
|
||||
<Popover
|
||||
content={this.newItem()}
|
||||
trigger={["click"]}
|
||||
trigger={["hover"]}
|
||||
placement="bottom"
|
||||
className="mr50"
|
||||
>
|
||||
|
@ -235,7 +237,7 @@ class InfosUser extends Component {
|
|||
<div className="edu-txt-center pt30 mb30 border-top-grey">
|
||||
<Pagination
|
||||
simple
|
||||
defaultCurrent={page}
|
||||
current={page}
|
||||
total={total}
|
||||
pageSize={limit}
|
||||
onChange={this.changePage}
|
||||
|
|
|
@ -9,8 +9,9 @@ const { TextArea } = Input;
|
|||
export default Form.create()(
|
||||
forwardRef((props)=>{
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = props && props.form;
|
||||
const { username } = props && props.match && props.match.params;
|
||||
const { user , resetUser , current_user } = props;
|
||||
// const { username } = props && props.match && props.match.params;
|
||||
const { resetUserInfo , current_user } = props;
|
||||
console.log(props);
|
||||
|
||||
useEffect(()=>{
|
||||
if(current_user && current_user.login){
|
||||
|
@ -30,10 +31,10 @@ export default Form.create()(
|
|||
}
|
||||
|
||||
function submitFunc(values) {
|
||||
const url = `/users/${username}.json`;
|
||||
const url = `/users/${current_user && current_user.login}.json`;
|
||||
const params={
|
||||
user: {
|
||||
nickname: values.real_name,
|
||||
nickname: values.nickname,
|
||||
user_extension_attributes: {
|
||||
province: values.location && values.location[0],
|
||||
city: values.location && values.location[1],
|
||||
|
@ -44,8 +45,7 @@ export default Form.create()(
|
|||
Axios.put(url,params).then(result=>{
|
||||
if(result && result.data){
|
||||
props.showNotification("资料修改成功!")
|
||||
resetUser && resetUser(result.data);
|
||||
props.history.push(`/${username}`)
|
||||
resetUserInfo && resetUserInfo();
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ export default Form.create()(
|
|||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="姓名">
|
||||
{getFieldDecorator("real_name",{
|
||||
{getFieldDecorator("nickname",{
|
||||
rules:[{required:true,message:"请输入姓名"}]
|
||||
})(
|
||||
<Input placeholder="请输入您的姓名" maxLength={20} style={{width:"400px"}}/>
|
||||
|
@ -126,7 +126,7 @@ export default Form.create()(
|
|||
<AlignCenter>
|
||||
<span className="ant-form-item-label"></span>
|
||||
<Button type={"primary"} onClick={submit}>提交</Button>
|
||||
<Button type={"default"} onClick={()=>props.history.push(`/${username}`)} className="ml20">取消</Button>
|
||||
{/* <Button type={"default"} onClick={()=>props.history.push(`/${current_user && current_user.login}`)} className="ml20">取消</Button> */}
|
||||
</AlignCenter>
|
||||
</Form>
|
||||
)
|
||||
|
|
|
@ -6,21 +6,16 @@ import Base from './Base';
|
|||
import Password from './Password';
|
||||
|
||||
function Index(props){
|
||||
const { username } = props && props.match && props.match.params;
|
||||
// const { username } = props && props.match && props.match.params;
|
||||
const { pathname } = props && props.location;
|
||||
const { current_user } = props;
|
||||
// const { current_user } = props;
|
||||
|
||||
useEffect(()=>{
|
||||
if((username && current_user && (current_user.login !== username))){
|
||||
props.history.push(`/${username}`);
|
||||
}
|
||||
},[current_user,username])
|
||||
|
||||
const [ key , setKey ] = useState("0");
|
||||
|
||||
useEffect(()=>{
|
||||
if(pathname){
|
||||
if(pathname === `/${username}/info`){
|
||||
if(pathname === `/settings/profile`){
|
||||
setKey("0");
|
||||
}else{
|
||||
setKey("1");
|
||||
|
@ -32,7 +27,7 @@ function Index(props){
|
|||
return(
|
||||
<div>
|
||||
<Menu selectedKeys={[key]} mode={'horizontal'} className="infosRightMenu">
|
||||
<Menu.Item key="0"><Link to={`/${username}/info`}>基本资料</Link></Menu.Item>
|
||||
<Menu.Item key="0"><Link to={`/settings/profile`}>基本资料</Link></Menu.Item>
|
||||
{/* <Menu.Item key="1"><Link to={`/${username}/password`}>密码管理</Link></Menu.Item> */}
|
||||
</Menu>
|
||||
<div style={{padding:"20px"}}>
|
||||
|
|
|
@ -6,9 +6,19 @@
|
|||
.ant-form-explain{
|
||||
position: absolute;
|
||||
}
|
||||
.ant-row.ant-form-item{
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
.formBase.passMan{
|
||||
.ant-form-item-label{
|
||||
width: 92px;
|
||||
}
|
||||
}
|
||||
.infosRightMenu{
|
||||
.ant-menu-item{
|
||||
a{
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ import Search from '../Component/Search';
|
|||
import Item from './Team-item';
|
||||
import Nodata from '../Nodata';
|
||||
import axios from 'axios';
|
||||
import { Link } from 'react-router-dom';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const limit = 15;
|
||||
function Team(props){
|
||||
|
@ -48,6 +48,7 @@ function Team(props){
|
|||
</Menu>
|
||||
)
|
||||
|
||||
|
||||
return(
|
||||
<div>
|
||||
<div className="headerbox">
|
||||
|
@ -57,7 +58,7 @@ function Team(props){
|
|||
<p>
|
||||
{
|
||||
checkIfLogin() &&
|
||||
<Link to={`/organize/new`}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</Link>
|
||||
<CheckProfile {...props} sureFunc={()=>{props.history.push('/organize/new')}}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</CheckProfile>
|
||||
}
|
||||
<Dropdown overlay={menu}>
|
||||
<a>排序<i className="iconfont icon-sanjiaoxing-down ml3 font-14"></i></a>
|
||||
|
|
|
@ -4,9 +4,13 @@ class WatcherUsers extends Component {
|
|||
render() {
|
||||
const {user, current_user , fetchUser } = this.props;
|
||||
return (
|
||||
<div className="minH-650">
|
||||
{user && user.login && <CommonLists userType="watch_users" login={user.login} current_user={current_user} fetchUser={fetchUser}/>}
|
||||
</div>
|
||||
user && user.login &&
|
||||
<CommonLists
|
||||
userType="watch_users"
|
||||
login={user.login}
|
||||
current_user={current_user}
|
||||
fetchUser={fetchUser}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import { Spin } from 'antd';
|
|||
import './TPMIndex.css';
|
||||
import LoginDialog from '../login/LoginDialog';
|
||||
import EducoderAccount from '../../forge/Component/EducoderAccount';
|
||||
import ProfileModal from '../../forge/Component/ProfileModal/Index';
|
||||
|
||||
export function TPMIndexHOC(WrappedComponent) {
|
||||
return class II extends React.Component {
|
||||
|
@ -24,7 +25,9 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
isloginCancel: undefined,
|
||||
mygetHelmetapi: null,
|
||||
giteaVisible:false,
|
||||
email:undefined
|
||||
email:undefined,
|
||||
completeProfile:false,
|
||||
showCP:false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,7 +154,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
if (response && response.data) {
|
||||
this.initCommonState(response.data)
|
||||
this.setState({
|
||||
tpmLoading: false
|
||||
tpmLoading: false,
|
||||
completeProfile:response.data.profile_completed
|
||||
})
|
||||
if (this.props.match.path === "/" && response.data.login) {
|
||||
this.props.history.push(`/${response.data.login}`);
|
||||
|
@ -204,23 +208,35 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
showCompeleteDialog=()=>{
|
||||
this.setState({
|
||||
showCP:true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
let { isRender , current_user , giteaVisible , email } = this.state;
|
||||
let { isRender , current_user , giteaVisible , email , completeProfile , showCP } = this.state;
|
||||
const common = {
|
||||
showLoginDialog: this.showLoginDialog,
|
||||
checkIfLogin: this.checkIfLogin,
|
||||
resetUserInfo:this.fetchUsers
|
||||
resetUserInfo:this.fetchUsers,
|
||||
showCompeleteDialog:this.showCompeleteDialog
|
||||
};
|
||||
return (
|
||||
<div className="indexHOC">
|
||||
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
|
||||
<ProfileModal
|
||||
visible={!completeProfile && showCP}
|
||||
onCancel={()=>{this.setState({showCP:false})}}
|
||||
history={this.props.history}
|
||||
/>
|
||||
{isRender === true ? <LoginDialog
|
||||
Modifyloginvalue={() => this.hideLoginDialog()}
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
/> : ""}
|
||||
<Header {...this.state} {...this.props}></Header>
|
||||
<Header {...this.state} {...this.props} {...common}></Header>
|
||||
<Spin spinning={this.state.globalLoading} delay={0} className="globalSpin"
|
||||
size="large" tip={this._gLoadingTip || "加载中..."}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue