Merge branch 'develop'

This commit is contained in:
caishi 2021-06-18 16:56:18 +08:00
commit b808bcee99
31 changed files with 185 additions and 1954 deletions

View File

@ -3908,6 +3908,17 @@ html>body #ajax-indicator {
max-height: 340px; max-height: 340px;
}/*头部导航条样式---2018-03-19--by-cs*/ }/*头部导航条样式---2018-03-19--by-cs*/
.privateTag{
display: block;
padding:0px 6px;
border-radius: 12px;
border:1px solid #2FC25B;
height: 18px;
line-height: 18px;
font-size: 12px;
margin-left: 10px;
color: #2FC25B;
}
.head-nav { .head-nav {
text-align: center; text-align: center;
height: 70px; height: 70px;

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2340181 */ font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1622517296245') format('woff2'), src: url('iconfont.woff2?t=1623836536204') format('woff2'),
url('iconfont.woff?t=1622517296245') format('woff'), url('iconfont.woff?t=1623836536204') format('woff'),
url('iconfont.ttf?t=1622517296245') format('truetype'); url('iconfont.ttf?t=1623836536204') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-nv1:before {
content: "\e864";
}
.icon-nan1:before {
content: "\e865";
}
.icon-youxiang:before { .icon-youxiang:before {
content: "\e8b2"; content: "\e8b2";
} }

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,20 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "7539612",
"name": "nv",
"font_class": "nv1",
"unicode": "e864",
"unicode_decimal": 59492
},
{
"icon_id": "7539613",
"name": "nan",
"font_class": "nan1",
"unicode": "e865",
"unicode_decimal": 59493
},
{ {
"icon_id": "21936935", "icon_id": "21936935",
"name": "邮箱", "name": "邮箱",

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 733 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -276,7 +276,7 @@ li.ant-menu-item{
} }
.faqUl{ .faqUl{
padding:0px 20px 10px; padding:0px 20px 10px;
max-height: 220px; max-height: 230px;
overflow-y: auto; overflow-y: auto;
li{ li{
background: #F5F5F5; background: #F5F5F5;

View File

@ -79,9 +79,11 @@ function CoderDepot(props){
let url = pathname.split(`/tree/${branchName}/`)[1]; let url = pathname.split(`/tree/${branchName}/`)[1];
setTreeValue(url); setTreeValue(url);
getFileInfo(url,branchName); getFileInfo(url,branchName);
setType("file");
}else{ }else{
setTreeValue(undefined); setTreeValue(undefined);
getDirInfo(branchName || defaultBranch); getDirInfo(branchName || defaultBranch);
setType("dir");
} }
} }
},[projectsId,owner,pathname,defaultBranch]) },[projectsId,owner,pathname,defaultBranch])
@ -244,7 +246,6 @@ function CoderDepot(props){
const { current_user } = props; const { current_user } = props;
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin)); const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin));
return( return(
<WhiteBack> <WhiteBack>
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/> <UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>

View File

@ -285,6 +285,7 @@ class CoderRootFileDetail extends Component {
readOnly={readOnly} readOnly={readOnly}
editorType="update" editorType="update"
currentBranch={currentBranch} currentBranch={currentBranch}
descName={detail && `Update ${detail.name}`}
></Meditor> ></Meditor>
)} )}
</div> </div>

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Spin, Tooltip , message } from 'antd'; import { Spin, Tooltip } from 'antd';
import { Link, Route, Switch } from 'react-router-dom'; import { Link, Route, Switch } from 'react-router-dom';
import { Content , FlexAJ } from '../Component/layout'; import { Content , FlexAJ , AlignCenter } from '../Component/layout';
import DetailBanner from './sub/DetailBanner'; import DetailBanner from './sub/DetailBanner';
import Invite from './sub/Invite'; import Invite from './sub/Invite';
import '../css/index.scss' import '../css/index.scss'
@ -391,10 +391,11 @@ class Detail extends Component {
} }
textFunc = (forked_from_project_id,fork_info)=>{ textFunc = (forked_from_project_id,fork_info)=>{
let type = fork_info && fork_info.fork_project_user_type;
return forked_from_project_id && fork_info ? return forked_from_project_id && fork_info ?
<div className="color-grey-9"> <div className="color-grey-9">
<span>forked from </span> <span>复刻自 </span>
<Link to={`/users/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6">{fork_info.fork_project_user_name}</Link> <Link to={`${type ==="Organization" ? "/organize":'/users'}/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6">{fork_info.fork_project_user_name}</Link>
<span> / </span> <span> / </span>
<Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6">{fork_info.fork_form_name}</Link> <Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6">{fork_info.fork_form_name}</Link>
</div> : "" </div> : ""
@ -425,34 +426,32 @@ class Detail extends Component {
<div> <div>
<div className="detailHeader-wrapper"> <div className="detailHeader-wrapper">
<div className="normal"> <div className="normal">
<div className="f-wrap-between" style={{ position: "relative" }}> <FlexAJ style={{paddingTop:"15px"}}>
<p className="font-22 df flex-1 lineH2 mt15" style={{ alignItems: "center" }}> <AlignCenter>
{project && project.author && <div className="projectallName">
<Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`} className="show-user-link"> {project && project.author &&
{project.author.name} <Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`}>{project.author.name}</Link>
</Link>
}
<span className="ml5 mr5">/</span>
<span className="hide-1 flex-1 df">
<Link to={`/projects/${owner}/${projectsId}`} className="font-22">{project && project.name}</Link>
{
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
projectDetail.type === 2 ?
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
<i className="iconfont icon-banbenku font-18 mt6" style={{ color: "#8D90E3" }}/>
</Tooltip>
:
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
<i className="iconfont icon-jingxiang font-18 color-green mt6" />
</Tooltip>
:""
} }
</span> <span className="ml5 mr5">/</span>
</p> <Link to={`/projects/${owner}/${projectsId}`} className="projectN">{project && project.name}</Link>
</div>
{ projectDetail && projectDetail.private && <span className="privateTag">私有</span>}
{
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
projectDetail.type === 2 ?
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
<i className="iconfont icon-banbenku font-18 mt6" style={{ color: "#8D90E3" }}/>
</Tooltip>
:
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
<i className="iconfont icon-jingxiang font-18 color-green mt6" />
</Tooltip>
:""
}
</AlignCenter>
{ {
firstSync ? "": firstSync ? "":
<span className="df mt25"> <span className="df">
{ {
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ? ((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : "" <a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
@ -507,7 +506,7 @@ class Detail extends Component {
</span> </span>
</span> </span>
} }
</div> </FlexAJ>
<FlexAJ> <FlexAJ>
<div> <div>
{ {

View File

@ -102,7 +102,6 @@
} }
} }
} }
// coderDepot // coderDepot
.Panels{ .Panels{
max-width: 1200px; max-width: 1200px;

View File

@ -35,9 +35,10 @@ class IndexItem extends Component {
<div className="p-r-Infos"> <div className="p-r-Infos">
<div className="p-r-name"> <div className="p-r-name">
<AlignCenter> <AlignCenter>
<Link to={`/projects/${item.author.login}/${item.identifier}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 490 }}> <Link to={`/projects/${item.author.login}/${item.identifier}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
{item.author.name}/{item.name} {item.author.name}/{item.name}
</Link> </Link>
{ !item.is_public && <span className="privateTag">私有</span> }
{ {
item.forked_from_project_id ? item.forked_from_project_id ?
<span className="ml5"> <span className="ml5">

View File

@ -102,6 +102,8 @@ class MessageCount extends Component {
isSpin: false, isSpin: false,
pr_status: 2, pr_status: 2,
}); });
const { getDetail } = this.props;
getDetail && getDetail();
} else { } else {
this.setState({ this.setState({
isSpin: false, isSpin: false,
@ -138,6 +140,8 @@ class MessageCount extends Component {
SpinMerge: false, SpinMerge: false,
pr_status: 1, pr_status: 1,
}); });
const { getDetail } = this.props;
getDetail && getDetail();
} else { } else {
this.setState({ SpinMerge: false }); this.setState({ SpinMerge: false });
} }
@ -471,17 +475,16 @@ class MessageCount extends Component {
: !ismesrge ? "block" : "none", : !ismesrge ? "block" : "none",
}} }}
> >
<p className="mb15"> <Dropdown.Button
<Dropdown.Button overlay={menu}
overlay={menu} type="primary"
type="primary" onClick={this.submitmerge}
onClick={this.submitmerge} className="mb15"
icon={<Icon type="caret-down" />} icon={<Icon type="caret-down" />}
disabled={!pull_request || (pull_request && !pull_request.mergeable) } disabled={!pull_request || (pull_request && !pull_request.mergeable) }
> >
{this.state.mergename} {this.state.mergename}
</Dropdown.Button> </Dropdown.Button>
</p>
{pull_request && pull_request.mergeable {pull_request && pull_request.mergeable
? ?
<Alert <Alert

View File

@ -38,7 +38,7 @@ class merge extends Component {
// page: 1, // page: 1,
search_count: undefined, search_count: undefined,
issue_type: undefined, issue_type: undefined,
status_type: undefined, status_type: "1",
//设置选择高亮 //设置选择高亮
openselect: 1, openselect: 1,
closeselect: undefined, closeselect: undefined,
@ -48,7 +48,7 @@ class merge extends Component {
paix: "排序", paix: "排序",
priority_ids: "优先级", priority_ids: "优先级",
select_params: { select_params: {
status_type: undefined, //开启中和关闭中,默认为开启中的 status_type: "1", //开启中和关闭中,默认为开启中的
assigned_to_id: undefined, // 指派人 assigned_to_id: undefined, // 指派人
fixed_version_id: undefined, fixed_version_id: undefined,
priority_id: undefined, priority_id: undefined,
@ -207,12 +207,10 @@ class merge extends Component {
paix: "排序", paix: "排序",
priority_ids: "优先级", priority_ids: "优先级",
}); });
this.state.select_params = { this.state.select_params.status_type = type;
status_type: type, this.state.select_params.page=1;
search: undefined, this.state.select_params.limit=15;
page: 1,
limit: 15,
};
this.getIssueList(); this.getIssueList();
}; };

View File

@ -73,6 +73,7 @@ class Index extends Component {
content={undefined} content={undefined}
readOnly={false} readOnly={false}
editorType="new" editorType="new"
descName={filename && `Add ${filename}`}
></Meditor> ></Meditor>
</div> </div>
</div> </div>

View File

@ -16,6 +16,24 @@ class UserSubmitComponent extends Component {
}; };
} }
componentDidMount=()=>{
const { descName } = this.props;
if(descName){
this.props.form.setFieldsValue({
desc:descName
})
}
}
componentDidUpdate=(preProps)=>{
const { descName } = this.props;
if(preProps && descName && preProps.descName !== descName ){
this.props.form.setFieldsValue({
desc:descName
})
}
}
changeSubmittype = (e) => { changeSubmittype = (e) => {
this.setState({ this.setState({
submitType: e.target.value, submitType: e.target.value,

View File

@ -27,7 +27,7 @@ class m_editor extends Component {
render() { render() {
const { editorValue } = this.state; const { editorValue } = this.state;
const { readOnly, editorType, language , currentBranch } = this.props; const { readOnly, editorType, language , currentBranch , descName } = this.props;
const editor_options = { const editor_options = {
lineNumbers: "on", lineNumbers: "on",
wordWrap: true, //强制换行 wordWrap: true, //强制换行
@ -72,6 +72,7 @@ class m_editor extends Component {
content={editorValue} content={editorValue}
editor_type={editorType} editor_type={editorType}
currentBranch={currentBranch} currentBranch={currentBranch}
descName={descName}
></UserSubmitComponent> ></UserSubmitComponent>
</div> </div>
)} )}

View File

@ -60,6 +60,7 @@ class UploadFile extends Component {
filepath={file_path} filepath={file_path}
content={editorValue} content={editorValue}
editor_type={"upload"} editor_type={"upload"}
descName={`ADD file via upload`}
></UserSubmitComponent> ></UserSubmitComponent>
</div> </div>
</div> </div>

View File

@ -89,8 +89,9 @@ class Milepost extends Component {
closeselect: status === "closed" ? current_user.user_id : undefined, closeselect: status === "closed" ? current_user.user_id : undefined,
openselect: status === "closed" ? undefined : current_user.user_id openselect: status === "closed" ? undefined : current_user.user_id
}) })
this.getList(1, status, 'desc');
this.getList(1, status, 'desc') const { getDetail } = this.props;
getDetail && getDetail();
} }
}).catch(error => { }).catch(error => {
console.log(error); console.log(error);
@ -107,7 +108,9 @@ class Milepost extends Component {
} }
}).then((result) => { }).then((result) => {
if (result) { if (result) {
this.getList(1, this.state.status, 'desc') this.getList(1, this.state.status, 'desc');
const { getDetail } = this.props;
getDetail && getDetail();
} }
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
@ -228,8 +231,8 @@ class Milepost extends Component {
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link> <Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
</div> </div>
<div className="grid-item ml15 color-grey-9"> <div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i> <i className={item.status === "closed" ? "iconfont icon-gouxuan font-14 mr5":"iconfont icon-yiguanbi1 font-14 mr5"}></i>
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a> <a onClick={() => this.updatestatusemile(item.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
</div> </div>
<div className="grid-item ml15 color-grey-9"> <div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-lajitong font-14 mr5" ></i> <i className="iconfont icon-lajitong font-14 mr5" ></i>

View File

@ -69,6 +69,27 @@ class MilepostDetail extends Component {
}) })
} }
deletedetail = (id) => {
const { projectsId , owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/issues/${id}.json`;
axios.delete(url, {
data: {
project_id: projectsId,
id: id,
},
})
.then((result) => {
if (result) {
const { page } = this.state;
this.getIssueList(page);
const { getDetail } = this.props;
getDetail && getDetail();
}
})
.catch((error) => {
console.log(error);
});
};
// 获取列表数据 // 获取列表数据
getIssueList = ( page , item , value , update , updateValue , type ) => { getIssueList = ( page , item , value , update , updateValue , type ) => {
const { projectsId, meilid , owner } = this.props.match.params; const { projectsId, meilid , owner } = this.props.match.params;
@ -275,7 +296,15 @@ class MilepostDetail extends Component {
: :
issues && issues.length>0 && issues.map((item,key)=>{ issues && issues.length>0 && issues.map((item,key)=>{
return( return(
<OrderItem key={key} mile item={item} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state}></OrderItem> <OrderItem
key={key} mile
item={item}
search_count={search_count}
page={page}
limit={limit}
{...this.props} {...this.state}
deletedetail={this.deletedetail}
></OrderItem>
) )
}) })
} }

View File

@ -92,12 +92,12 @@ class OrderItem extends Component {
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link> <Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link>
{ {
current_user && current_user.login ? current_user && current_user.login ?
<div style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}> <div id="hoverBox" style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}>
<div className="mr8 ml8 color-grey-9"> <div className="mr8 ml8 color-grey-9">
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/updatedetail`} className="color-grey-9"><i className="iconfont icon-bianji3 font-14 mr5"></i></Link> <Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/updatedetail`} className="color-grey-9"><i className="iconfont icon-bianji3 font-14 mr5"></i></Link>
</div> </div>
<div className="color-grey-9"> <div className="color-grey-9">
<Popconfirm placement="bottom" title={'您确定要删除吗'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}> <Popconfirm placement="bottom" overlayClassName="overlayBox" getPopupContainer={()=>document.getElementById("hoverBox")} title={'您确定要删除当前易修'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
<i className="iconfont icon-yiguanbi1 font-14"></i> <i className="iconfont icon-yiguanbi1 font-14"></i>
</Popconfirm> </Popconfirm>
</div> </div>

View File

@ -64,6 +64,8 @@ class NewMilepost extends Component {
if (result) { if (result) {
this.setState({ isSpin: false }) this.setState({ isSpin: false })
this.props.history.push(`/projects/${owner}/${projectsId}/milestones`); this.props.history.push(`/projects/${owner}/${projectsId}/milestones`);
const { getDetail } = this.props;
getDetail && getDetail();
} }
}).catch(error => { }).catch(error => {
this.setState({ isSpin: false }) this.setState({ isSpin: false })

View File

@ -17,7 +17,9 @@
line-height: 18px; line-height: 18px;
color: red; color: red;
} }
.overlayBox{
width: 230px;
}
.topmilepost { .topmilepost {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;

View File

@ -268,11 +268,8 @@ class order extends Component {
checkedValue:[], checkedValue:[],
all:undefined all:undefined
}); });
this.state.select_params = { this.state.select_params.page = 1;
search: undefined, this.state.select_params.limit = 15;
page: 1,
limit: 15,
};
this.getIssueList(type); this.getIssueList(type);
}; };
@ -337,6 +334,8 @@ class order extends Component {
const { status_type } = this.state; const { status_type } = this.state;
this.getIssueList(status_type); this.getIssueList(status_type);
const { getDetail } = this.props;
getDetail && getDetail();
} }
}) })
.catch((error) => { .catch((error) => {

View File

@ -193,13 +193,14 @@ class order_form extends Component {
if (result) { if (result) {
this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`); this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`);
this.props.showNotification("任务更新成功!"); this.props.showNotification("任务更新成功!");
const { getDetail } = this.props;
getDetail && getDetail();
} }
}) })
.catch((error) => { .catch((error) => {
this.setState({ this.setState({
isSpin: false, isSpin: false,
}); });
console.log(error);
}); });
} }
} }

View File

@ -7,6 +7,19 @@ ul,ol,dl{
.color-black{ .color-black{
color: #333; color: #333;
} }
.projectallName{
display: flex;
align-items: center;
font-size: 22px;
font-weight: normal;
.projectN{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1;
max-width: 500px;
}
}
.main{ .main{
width: 1200px; width: 1200px;
padding:20px; padding:20px;

View File

@ -148,12 +148,12 @@ $flex:flex;
i{ i{
font-size: 25px!important; font-size: 25px!important;
border-radius: 50%; border-radius: 50%;
background-color: #fff; color: #fff;
&.icon-nan{ &.icon-nan1{
color: #1890FF; background-color: #1890FF;
} }
&.icon-nv{ &.icon-nv1{
color: pink; background-color: pink;
} }
} }
} }

View File

@ -207,9 +207,9 @@ class Infos extends Component {
<span> <span>
{ {
user && user.gender===1? user && user.gender===1?
<i className="iconfont icon-nan"></i> <i className="iconfont icon-nan1"></i>
: :
<i className="iconfont icon-nv"></i> <i className="iconfont icon-nv1"></i>
} }
</span> </span>
</span> </span>