基本资料

This commit is contained in:
caishi 2021-09-01 11:24:37 +08:00
parent 58115f8dae
commit 86f50d4278
14 changed files with 281 additions and 115 deletions

View File

@ -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

View File

@ -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.

View File

@ -222,6 +222,15 @@ class NewHeader extends Component {
}
}
}
checkProfile=(url)=>{
const { showCompeleteDialog , completeProfile } = this.props;
if(completeProfile){
showCompeleteDialog && showCompeleteDialog();
}else{
this.props.history.push(url);
}
}
addMenu=(list)=>{
console.log(this.props);
@ -233,7 +242,7 @@ 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>
<Menu.Item key={item.name+key}><a onClick={this.checkProfile(item.url)}>{item.name}</a></Menu.Item>
)
})
}

View File

@ -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) => (

View File

@ -36,6 +36,8 @@
.securityUl{
padding:20px 16px;
color: #333;
margin-bottom: 0px;
padding-bottom: 0px;
li{
margin-bottom: 10px;
height: 27px;

View File

@ -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"

View File

@ -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,7 +31,7 @@ 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,
@ -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=>{})
}
@ -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>
)

View File

@ -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"}}>

View File

@ -6,6 +6,9 @@
.ant-form-explain{
position: absolute;
}
.ant-row.ant-form-item{
margin-bottom: 12px;
}
}
.formBase.passMan{
.ant-form-item-label{

View File

@ -155,7 +155,7 @@ export function TPMIndexHOC(WrappedComponent) {
this.initCommonState(response.data)
this.setState({
tpmLoading: false,
completeProfile:response.data.profile_completed
completeProfile:!response.data.profile_completed
})
if (this.props.match.path === "/" && response.data.login) {
this.props.history.push(`/${response.data.login}`);