修改-个人主页
This commit is contained in:
parent
40f8f5d872
commit
3cd51d1c72
|
@ -559,7 +559,7 @@ class NewHeader extends Component {
|
|||
</span>
|
||||
:
|
||||
<div className="ml30 edu-menu-panel" style={{ height: "70px", lineHeight: "70px" }}>
|
||||
<a href={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}>
|
||||
<a href={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}`}>
|
||||
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image" src={getImageUrl(`/${user.image_url}`)} width="34">
|
||||
</img>
|
||||
</a>
|
||||
|
|
|
@ -40,7 +40,7 @@ export default ((props)=>{
|
|||
</p>
|
||||
</div>
|
||||
<span>
|
||||
<Link to={`/projects/${owner}/${projectsId}/pulls/new`} className="mr20 color-blue mr30">创建合并请求</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}/pulls/new/${item.name}`} className="mr20 color-blue mr30">创建合并请求</Link>
|
||||
<Dropdown overlay={menu(item.zip_url,item.tar_url)} trigger={['click']} placement="bottomRight" className="color-green-file">
|
||||
<a className="ant-dropdown-link">
|
||||
<Tooltip title={`下载分支${item.name}`}><Icon type="cloud-download" className="font-18"/></Tooltip>
|
||||
|
|
|
@ -74,7 +74,7 @@ function Calendar({ userLogin , time , chooseTime }) {
|
|||
var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
|
||||
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
|
||||
return Y+M+D;
|
||||
}
|
||||
}
|
||||
|
||||
function Init(data,max) {
|
||||
var huan_val = document.getElementById("Calendar");
|
||||
|
@ -137,6 +137,7 @@ function Calendar({ userLogin , time , chooseTime }) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
return(
|
||||
<div id="Calendar" style={{height:"210px"}}></div>
|
||||
)
|
||||
|
|
|
@ -15,14 +15,13 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) {
|
|||
const [ value , setValue ]= useState([]);
|
||||
const [ isSpin , setIsSpin ]= useState(true);
|
||||
const [ disable , setDisable ] = useState(false);
|
||||
const [ loadCount , setLoadCount ]= useState(0);
|
||||
|
||||
useEffect(()=>{
|
||||
if(visible && loadCount === 0){
|
||||
setLoadCount(loadCount+1);
|
||||
if(visible){
|
||||
setIsSpin(true);
|
||||
getProjectList();
|
||||
}
|
||||
setSearch(undefined);
|
||||
},[visible])
|
||||
|
||||
useEffect(()=>{
|
||||
|
@ -57,15 +56,16 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) {
|
|||
const url = `/users/${username}/projects.json`;
|
||||
Axios.get(url,{
|
||||
params:{
|
||||
page:p,limit,is_public: "public",search:s
|
||||
page:p,limit,is_public: "public",search:s,choosed
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
let e = mergeArrayMerge(list,result.data.projects);
|
||||
let e = page > 1 ? mergeArrayMerge(list,result.data.projects) : result.data.projects;
|
||||
setTotal(result.data.count);
|
||||
setList(page > 1 ? e : result.data.projects);
|
||||
setList(e);
|
||||
setIsSpin(false);
|
||||
|
||||
// 查看更多需要页数
|
||||
let s = parseInt(result.data.count/limit,0);
|
||||
let y = result.data.count%limit;
|
||||
setPageSize(y>0?s+1:s);
|
||||
|
@ -91,13 +91,21 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) {
|
|||
setValue([]);
|
||||
}
|
||||
|
||||
function chooseProject(e) {
|
||||
function chooseProject(e,p) {
|
||||
setValue(e);
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function onSearch(params) {
|
||||
setPage(1);
|
||||
setList([]);
|
||||
setSearch(params);
|
||||
// if(params){
|
||||
// setValueCopy(value);
|
||||
// }else{
|
||||
// setValue(valueCopy);
|
||||
// setValueCopy([]);
|
||||
// }
|
||||
}
|
||||
|
||||
return(
|
||||
|
@ -120,6 +128,8 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) {
|
|||
onSearch={onSearch}
|
||||
enterButton="搜索"
|
||||
allowClear
|
||||
value={search}
|
||||
onChange={(e)=>setSearch(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="listbox">
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
}
|
||||
.ConcentrateTip{
|
||||
margin:20px 30px 0px;
|
||||
margin:20px 20px 0px;
|
||||
padding:5px 20px;
|
||||
border:1px solid rgb(248, 56, 56);
|
||||
border-radius: 4px;
|
||||
|
|
|
@ -79,7 +79,7 @@ class Infos extends Component {
|
|||
this.setState({menuKey:"1",route_type:undefined});
|
||||
}else if(pathname.indexOf(`/users/${username}/projects`)>-1){
|
||||
this.setState({menuKey:"2",route_type:undefined});
|
||||
}else if(pathname === `/users/${username}/notice`){
|
||||
}else if(pathname.indexOf(`/users/${username}/notice`)>-1){
|
||||
this.setState({menuKey:"3",route_type:undefined});
|
||||
}else if(pathname.indexOf(`/users/${username}/devops`)>-1){
|
||||
this.setState({menuKey:"4",route_type:undefined});
|
||||
|
|
|
@ -55,7 +55,7 @@ export default Form.create()(
|
|||
{getFieldDecorator("email",{
|
||||
rules:[{required:true,message:"请输入邮箱账号"}]
|
||||
})(
|
||||
<Input placeholder="请输入您的邮箱账号" style={{width:"400px"}}/>
|
||||
<Input placeholder="请输入您的邮箱账号" disabled style={{width:"400px"}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="">
|
||||
|
|
|
@ -33,7 +33,7 @@ function Index(props){
|
|||
<div>
|
||||
<Menu selectedKeys={[key]} mode={'horizontal'} className="infosRightMenu">
|
||||
<Menu.Item key="0"><Link to={`/users/${username}/info`}>基本资料</Link></Menu.Item>
|
||||
<Menu.Item key="1"><Link to={`/users/${username}/password`}>密码管理</Link></Menu.Item>
|
||||
{/* <Menu.Item key="1"><Link to={`/users/${username}/password`}>密码管理</Link></Menu.Item> */}
|
||||
</Menu>
|
||||
<div style={{padding:"20px"}}>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue