diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index c8f7c907..047d2bc1 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -3908,6 +3908,17 @@ html>body #ajax-indicator { max-height: 340px; }/*头部导航条样式---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 { text-align: center; height: 70px; diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 7035af05..1c01cded 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1622517296245') format('woff2'), - url('iconfont.woff?t=1622517296245') format('woff'), - url('iconfont.ttf?t=1622517296245') format('truetype'); + src: url('iconfont.woff2?t=1623836536204') format('woff2'), + url('iconfont.woff?t=1623836536204') format('woff'), + url('iconfont.ttf?t=1623836536204') format('truetype'); } .iconfont { @@ -13,6 +13,14 @@ -moz-osx-font-smoothing: grayscale; } +.icon-nv1:before { + content: "\e864"; +} + +.icon-nan1:before { + content: "\e865"; +} + .icon-youxiang:before { content: "\e8b2"; } diff --git a/public/css/iconfont.eot b/public/css/iconfont.eot deleted file mode 100644 index d13e3094..00000000 Binary files a/public/css/iconfont.eot and /dev/null differ diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 068c8e0a..1cae31eb 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -!function(c){var l,a,h,i,o,z,t='',p=(p=document.getElementsByTagName("script"))[p.length-1].getAttribute("data-injectcss");if(p&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}l=function(){var c,l,a;(a=document.createElement("div")).innerHTML=t,t=null,(l=a.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",c=l,(a=document.body).firstChild?(l=a.firstChild).parentNode.insertBefore(c,l):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,(z=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}v()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file +!function(c){var l,a,h,i,o,z,t='',p=(p=document.getElementsByTagName("script"))[p.length-1].getAttribute("data-injectcss");if(p&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}l=function(){var c,l,a;(a=document.createElement("div")).innerHTML=t,t=null,(l=a.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",c=l,(a=document.body).firstChild?(l=a.firstChild).parentNode.insertBefore(c,l):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,(z=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}v()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index 877958d7..243cdd80 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,20 @@ "css_prefix_text": "icon-", "description": "", "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", "name": "邮箱", diff --git a/public/css/iconfont.svg b/public/css/iconfont.svg deleted file mode 100644 index d6d0adbc..00000000 --- a/public/css/iconfont.svg +++ /dev/null @@ -1,1874 +0,0 @@ - - - - - -Created by iconfont - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index 9507b420..e4f56869 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index 5bb7cb80..e1493160 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index 3f6b8561..598c44d6 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss index f34209bf..3a94c375 100644 --- a/src/forge/Component/Component.scss +++ b/src/forge/Component/Component.scss @@ -276,7 +276,7 @@ li.ant-menu-item{ } .faqUl{ padding:0px 20px 10px; - max-height: 220px; + max-height: 230px; overflow-y: auto; li{ background: #F5F5F5; diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index b1c38465..7aaab83d 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -79,9 +79,11 @@ function CoderDepot(props){ let url = pathname.split(`/tree/${branchName}/`)[1]; setTreeValue(url); getFileInfo(url,branchName); + setType("file"); }else{ setTreeValue(undefined); getDirInfo(branchName || defaultBranch); + setType("dir"); } } },[projectsId,owner,pathname,defaultBranch]) @@ -244,7 +246,6 @@ function CoderDepot(props){ const { current_user } = props; const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin)); - return( setOpenModal(false)} onOk={okUpdate}/> diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index deb555a8..f86706e4 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -285,6 +285,7 @@ class CoderRootFileDetail extends Component { readOnly={readOnly} editorType="update" currentBranch={currentBranch} + descName={detail && `Update ${detail.name}`} > )} diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 505cf1d8..c0d0ee72 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -1,7 +1,7 @@ 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 { Content , FlexAJ } from '../Component/layout'; +import { Content , FlexAJ , AlignCenter } from '../Component/layout'; import DetailBanner from './sub/DetailBanner'; import Invite from './sub/Invite'; import '../css/index.scss' @@ -391,10 +391,11 @@ class Detail extends Component { } textFunc = (forked_from_project_id,fork_info)=>{ + let type = fork_info && fork_info.fork_project_user_type; return forked_from_project_id && fork_info ?
- forked from - {fork_info.fork_project_user_name} + 复刻自 + {fork_info.fork_project_user_name} / {fork_info.fork_form_name}
: "" @@ -425,34 +426,32 @@ class Detail extends Component {
-
-

- {project && project.author && - - {project.author.name} - - } - / - - {project && project.name} - - { - projectDetail && projectDetail.type && projectDetail.type !== 0 ? - projectDetail.type === 2 ? - - - - : - - - - :"" + + +

+ {project && project.author && + {project.author.name} } - -

+ / + {project && project.name} +
+ { projectDetail && projectDetail.private && 私有} + { + projectDetail && projectDetail.type && projectDetail.type !== 0 ? + projectDetail.type === 2 ? + + + + : + + + + :"" + } + { firstSync ? "": - + { ((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ? 同步镜像 : "" @@ -507,7 +506,7 @@ class Detail extends Component { } -
+
{ diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index ef3cbc0f..368d6c2d 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -102,7 +102,6 @@ } } } - // coderDepot .Panels{ max-width: 1200px; diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index f11ee717..4a1b126e 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -35,9 +35,10 @@ class IndexItem extends Component {
- + {item.author.name}/{item.name} + { !item.is_public && 私有 } { item.forked_from_project_id ? diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index 9c526d6d..064e3444 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -102,6 +102,8 @@ class MessageCount extends Component { isSpin: false, pr_status: 2, }); + const { getDetail } = this.props; + getDetail && getDetail(); } else { this.setState({ isSpin: false, @@ -138,6 +140,8 @@ class MessageCount extends Component { SpinMerge: false, pr_status: 1, }); + const { getDetail } = this.props; + getDetail && getDetail(); } else { this.setState({ SpinMerge: false }); } @@ -471,17 +475,16 @@ class MessageCount extends Component { : !ismesrge ? "block" : "none", }} > -

- } - disabled={!pull_request || (pull_request && !pull_request.mergeable) } - > - {this.state.mergename} - -

+ } + disabled={!pull_request || (pull_request && !pull_request.mergeable) } + > + {this.state.mergename} + {pull_request && pull_request.mergeable ?
diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js index 6c921c9f..3a35467c 100644 --- a/src/forge/Newfile/UserSubmitComponent.js +++ b/src/forge/Newfile/UserSubmitComponent.js @@ -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) => { this.setState({ submitType: e.target.value, diff --git a/src/forge/Newfile/m_editor.js b/src/forge/Newfile/m_editor.js index e342eec3..05a7b2ac 100644 --- a/src/forge/Newfile/m_editor.js +++ b/src/forge/Newfile/m_editor.js @@ -27,7 +27,7 @@ class m_editor extends Component { render() { const { editorValue } = this.state; - const { readOnly, editorType, language , currentBranch } = this.props; + const { readOnly, editorType, language , currentBranch , descName } = this.props; const editor_options = { lineNumbers: "on", wordWrap: true, //强制换行 @@ -72,6 +72,7 @@ class m_editor extends Component { content={editorValue} editor_type={editorType} currentBranch={currentBranch} + descName={descName} >
)} diff --git a/src/forge/Newfile/upload_file.js b/src/forge/Newfile/upload_file.js index 1a9b1da0..2e2f49b6 100644 --- a/src/forge/Newfile/upload_file.js +++ b/src/forge/Newfile/upload_file.js @@ -60,6 +60,7 @@ class UploadFile extends Component { filepath={file_path} content={editorValue} editor_type={"upload"} + descName={`ADD file via upload`} >
diff --git a/src/forge/Order/Milepost.js b/src/forge/Order/Milepost.js index 0ae88ddf..e6e63991 100644 --- a/src/forge/Order/Milepost.js +++ b/src/forge/Order/Milepost.js @@ -89,8 +89,9 @@ class Milepost extends Component { closeselect: status === "closed" ? current_user.user_id : undefined, 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 => { console.log(error); @@ -107,7 +108,9 @@ class Milepost extends Component { } }).then((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) => { console.log(error); @@ -228,8 +231,8 @@ class Milepost extends Component { 编辑
diff --git a/src/forge/Order/MilepostDetail.js b/src/forge/Order/MilepostDetail.js index 7954630d..38303e5d 100644 --- a/src/forge/Order/MilepostDetail.js +++ b/src/forge/Order/MilepostDetail.js @@ -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 ) => { const { projectsId, meilid , owner } = this.props.match.params; @@ -275,7 +296,15 @@ class MilepostDetail extends Component { : issues && issues.length>0 && issues.map((item,key)=>{ return( - + ) }) } diff --git a/src/forge/Order/OrderItem.js b/src/forge/Order/OrderItem.js index 150b95d2..f7589c9c 100644 --- a/src/forge/Order/OrderItem.js +++ b/src/forge/Order/OrderItem.js @@ -92,12 +92,12 @@ class OrderItem extends Component { {item.journals_count} { current_user && current_user.login ? -
+
- this.deletedetail(item.id)}> + document.getElementById("hoverBox")} title={'您确定要删除当前易修吗?'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
diff --git a/src/forge/Order/newMilepost.js b/src/forge/Order/newMilepost.js index 965e5a6a..5d7b090f 100644 --- a/src/forge/Order/newMilepost.js +++ b/src/forge/Order/newMilepost.js @@ -64,6 +64,8 @@ class NewMilepost extends Component { if (result) { this.setState({ isSpin: false }) this.props.history.push(`/projects/${owner}/${projectsId}/milestones`); + const { getDetail } = this.props; + getDetail && getDetail(); } }).catch(error => { this.setState({ isSpin: false }) diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css index dd592aca..7a357d4f 100644 --- a/src/forge/Order/order.css +++ b/src/forge/Order/order.css @@ -17,7 +17,9 @@ line-height: 18px; color: red; } - +.overlayBox{ + width: 230px; +} .topmilepost { box-sizing: border-box; display: flex; diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index 5cd17054..2443d105 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -268,11 +268,8 @@ class order extends Component { checkedValue:[], all:undefined }); - this.state.select_params = { - search: undefined, - page: 1, - limit: 15, - }; + this.state.select_params.page = 1; + this.state.select_params.limit = 15; this.getIssueList(type); }; @@ -337,6 +334,8 @@ class order extends Component { const { status_type } = this.state; this.getIssueList(status_type); + const { getDetail } = this.props; + getDetail && getDetail(); } }) .catch((error) => { diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index 89a5766b..45433631 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -193,13 +193,14 @@ class order_form extends Component { if (result) { this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`); this.props.showNotification("任务更新成功!"); + const { getDetail } = this.props; + getDetail && getDetail(); } }) .catch((error) => { this.setState({ isSpin: false, }); - console.log(error); }); } } diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index c1241e67..7f905ef5 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -7,6 +7,19 @@ ul,ol,dl{ .color-black{ 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{ width: 1200px; padding:20px; diff --git a/src/forge/users/Index.scss b/src/forge/users/Index.scss index fa8bc294..b087fa2f 100644 --- a/src/forge/users/Index.scss +++ b/src/forge/users/Index.scss @@ -148,12 +148,12 @@ $flex:flex; i{ font-size: 25px!important; border-radius: 50%; - background-color: #fff; - &.icon-nan{ - color: #1890FF; + color: #fff; + &.icon-nan1{ + background-color: #1890FF; } - &.icon-nv{ - color: pink; + &.icon-nv1{ + background-color: pink; } } } diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index 9b292d2e..34c6808e 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -207,9 +207,9 @@ class Infos extends Component { { user && user.gender===1? - + : - + }