diff --git a/client/components/ProjectCard/ProjectCard.js b/client/components/ProjectCard/ProjectCard.js index 7021b46f..6a53faaf 100644 --- a/client/components/ProjectCard/ProjectCard.js +++ b/client/components/ProjectCard/ProjectCard.js @@ -1,6 +1,6 @@ import './ProjectCard.scss'; import React, { Component } from 'react'; -import { Card, Icon, Tooltip, message } from 'antd'; +import { Card, Icon, Tooltip } from 'antd'; import { connect } from 'react-redux' import { delFollow, addFollow } from '../../reducer/modules/follow'; // import { Link } from 'react-router-dom'; @@ -42,7 +42,7 @@ class ProjectCard extends Component { this.props.delFollow(id).then((res) => { if (res.payload.data.errcode === 0) { this.props.callbackResult(); - message.success('已取消关注!'); + // message.success('已取消关注!'); // 星号已做出反馈 无需重复提醒用户 } }); } @@ -53,30 +53,24 @@ class ProjectCard extends Component { uid, projectid: projectData._id, projectname: projectData.name, - icon: 'star', - color: '#2395f1' + icon: projectData.icon, + color: projectData.color } this.props.addFollow(param).then((res) => { console.log(res); if (res.payload.data.errcode === 0) { this.props.callbackResult(); - message.success('已添加关注!'); + // message.success('已添加关注!'); // 星号已做出反馈 无需重复提醒用户 } }); } - // - // - // - // } onConfirm={confirm} okText="确认" cancelText="取消"> - // - // render() { const { projectData, inFollowPage } = this.props; return (
this.props.history.push('/project/' + projectData._id)}> - +

{projectData.name || projectData.projectname}

diff --git a/client/containers/Group/ProjectList/ProjectList.js b/client/containers/Group/ProjectList/ProjectList.js index d30a6f5d..bd49e109 100644 --- a/client/containers/Group/ProjectList/ProjectList.js +++ b/client/containers/Group/ProjectList/ProjectList.js @@ -104,7 +104,6 @@ class ProjectList extends Component { } render() { - console.log(this.props); const projectData = this.state.projectData; return (
diff --git a/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js b/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js index 1bfd1326..df5ebaf9 100644 --- a/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js +++ b/client/containers/Project/Setting/ProjectMessage/ProjectMessage.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { Form, Input, Icon, Tooltip, Select, Button, Row, Col, message, Card, Radio, Alert, Modal } from 'antd'; +import { Form, Input, Icon, Tooltip, Select, Button, Row, Col, message, Card, Radio, Alert, Modal, Popover } from 'antd'; import PropTypes from 'prop-types'; import { updateProject, delProject, getProjectMsg } from '../../../../reducer/modules/project'; import { fetchGroupMsg } from '../../../../reducer/modules/group'; @@ -176,12 +176,13 @@ class ProjectMessage extends Component { const groupMsg = await this.props.fetchGroupMsg(this.props.projectMsg.group_id); this.setState({ currGroup: groupMsg.payload.data.data.group_name - }) + }); } render () { const { getFieldDecorator, getFieldValue } = this.props.form; const { projectMsg } = this.props; + console.log(projectMsg); let initFormValues = {}; let envMessage = []; const { name, basepath, desc, env, project_type } = projectMsg; @@ -289,8 +290,27 @@ class ProjectMessage extends Component { ); }); + + const colorSelector = ( + + + + + ); return (
+ + + + + + + +

{projectMsg.group_name + ' / ' + projectMsg.name}

+

{projectMsg.desc}

+ +
+
{envSettingItems} diff --git a/client/containers/Project/Setting/Setting.scss b/client/containers/Project/Setting/Setting.scss index 75946bc2..ff4b8d16 100644 --- a/client/containers/Project/Setting/Setting.scss +++ b/client/containers/Project/Setting/Setting.scss @@ -57,3 +57,36 @@ border-top: 1px solid #eee; } } + +.project-setting { + .setting-logo { + text-align: right; + padding: .24rem; + cursor: pointer; + } + .setting-intro { + padding: .24rem; + height: 1.48rem; + display: flex; + align-items: center; + flex-wrap: wrap; + .ui-title { + font-size: .32rem; + font-weight: normal; + width: 100%; + } + .ui-desc { + font-size: .16rem; + } + } + .ui-logo { + width: 1rem; + height: 1rem; + border-radius: 50%; + font-size: .6rem; + color: #fff; + background-color: #2395f1; + line-height: 1rem; + box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08); + } +}