Compare commits

..

1 Commits

Author SHA1 Message Date
caishi ea58ae62bb 易修:批量删除和批量修改issue状态要更新数量 2021-06-22 10:21:31 +08:00
102 changed files with 2419 additions and 3140 deletions

200
package-lock.json generated
View File

@ -2377,12 +2377,6 @@
}
}
},
"base16": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/base16/download/base16-1.0.0.tgz",
"integrity": "sha1-4pf2DX7BAUp6lxo568ipjAtoHnA=",
"dev": true
},
"base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
@ -3875,23 +3869,6 @@
"warning": "^4.0.3"
}
},
"cross-fetch": {
"version": "3.1.4",
"resolved": "https://registry.nlark.com/cross-fetch/download/cross-fetch-3.1.4.tgz",
"integrity": "sha1-lyPzo6JHv4uJA586OAqSROj6Lzk=",
"dev": true,
"requires": {
"node-fetch": "2.6.1"
},
"dependencies": {
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.nlark.com/node-fetch/download/node-fetch-2.6.1.tgz?cache=0&sync_timestamp=1626684741221&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-fetch%2Fdownload%2Fnode-fetch-2.6.1.tgz",
"integrity": "sha1-BFvTI2Mfdu0uK1VXM5RBa2OaAFI=",
"dev": true
}
}
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
@ -6237,41 +6214,6 @@
"bser": "2.1.1"
}
},
"fbemitter": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/fbemitter/download/fbemitter-3.0.0.tgz",
"integrity": "sha1-ALKhr1QRJUqrQWzXX55iib7kv/M=",
"dev": true,
"requires": {
"fbjs": "^3.0.0"
},
"dependencies": {
"fbjs": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/fbjs/download/fbjs-3.0.0.tgz?cache=0&sync_timestamp=1602048313843&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffbjs%2Fdownload%2Ffbjs-3.0.0.tgz",
"integrity": "sha1-CQcGf7P1enj0XZXx6s/8rNYjwWU=",
"dev": true,
"requires": {
"cross-fetch": "^3.0.4",
"fbjs-css-vars": "^1.0.0",
"loose-envify": "^1.0.0",
"object-assign": "^4.1.0",
"promise": "^7.1.1",
"setimmediate": "^1.0.5",
"ua-parser-js": "^0.7.18"
}
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz",
"integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
"dev": true,
"requires": {
"asap": "~2.0.3"
}
}
}
},
"fbjs": {
"version": "0.8.17",
"resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz",
@ -6301,12 +6243,6 @@
}
}
},
"fbjs-css-vars": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/fbjs-css-vars/download/fbjs-css-vars-1.0.2.tgz",
"integrity": "sha1-IWVRE2rgL+JVkyw+yHdfGOLAeLg=",
"dev": true
},
"fecha": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz",
@ -6751,42 +6687,6 @@
"readable-stream": "^2.3.6"
}
},
"flux": {
"version": "4.0.1",
"resolved": "https://registry.npm.taobao.org/flux/download/flux-4.0.1.tgz",
"integrity": "sha1-eENQKwKEHUqqU0rws3MDSh917lw=",
"dev": true,
"requires": {
"fbemitter": "^3.0.0",
"fbjs": "^3.0.0"
},
"dependencies": {
"fbjs": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/fbjs/download/fbjs-3.0.0.tgz?cache=0&sync_timestamp=1602048313843&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffbjs%2Fdownload%2Ffbjs-3.0.0.tgz",
"integrity": "sha1-CQcGf7P1enj0XZXx6s/8rNYjwWU=",
"dev": true,
"requires": {
"cross-fetch": "^3.0.4",
"fbjs-css-vars": "^1.0.0",
"loose-envify": "^1.0.0",
"object-assign": "^4.1.0",
"promise": "^7.1.1",
"setimmediate": "^1.0.5",
"ua-parser-js": "^0.7.18"
}
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz",
"integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
"dev": true,
"requires": {
"asap": "~2.0.3"
}
}
}
},
"flv.js": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/flv.js/-/flv.js-1.5.0.tgz",
@ -10430,12 +10330,6 @@
"resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz",
"integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU="
},
"lodash.curry": {
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/lodash.curry/download/lodash.curry-4.1.1.tgz",
"integrity": "sha1-JI42By7ekGUB11lmIAqG2riyMXA=",
"dev": true
},
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
@ -10446,12 +10340,6 @@
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
"integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
},
"lodash.flow": {
"version": "3.5.0",
"resolved": "https://registry.npm.taobao.org/lodash.flow/download/lodash.flow-3.5.0.tgz",
"integrity": "sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o=",
"dev": true
},
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
@ -14082,12 +13970,6 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"pure-color": {
"version": "1.3.0",
"resolved": "https://registry.npm.taobao.org/pure-color/download/pure-color-1.3.0.tgz",
"integrity": "sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4=",
"dev": true
},
"purgecss": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.1.2.tgz",
@ -14859,18 +14741,6 @@
"prop-types": "^15.6.2"
}
},
"react-base16-styling": {
"version": "0.6.0",
"resolved": "https://registry.npm.taobao.org/react-base16-styling/download/react-base16-styling-0.6.0.tgz",
"integrity": "sha1-7yFW1mz0E5aVyKFniGy2nqZgeSw=",
"dev": true,
"requires": {
"base16": "^1.0.0",
"lodash.curry": "^4.0.1",
"lodash.flow": "^3.3.0",
"pure-color": "^1.2.0"
}
},
"react-beautiful-dnd": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-10.1.1.tgz",
@ -15236,18 +15106,6 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
"react-json-view": {
"version": "1.21.3",
"resolved": "https://registry.npm.taobao.org/react-json-view/download/react-json-view-1.21.3.tgz",
"integrity": "sha1-8YQgnujxvzdPsMQbCBPP9UVJxHU=",
"dev": true,
"requires": {
"flux": "^4.0.1",
"react-base16-styling": "^0.6.0",
"react-lifecycles-compat": "^3.0.4",
"react-textarea-autosize": "^8.3.2"
}
},
"react-jss": {
"version": "8.6.1",
"resolved": "https://registry.npmjs.org/react-jss/-/react-jss-8.6.1.tgz",
@ -15436,34 +15294,6 @@
"prop-types": "^15.5.4"
}
},
"react-textarea-autosize": {
"version": "8.3.3",
"resolved": "https://registry.nlark.com/react-textarea-autosize/download/react-textarea-autosize-8.3.3.tgz?cache=0&sync_timestamp=1622628433420&other_urls=https%3A%2F%2Fregistry.nlark.com%2Freact-textarea-autosize%2Fdownload%2Freact-textarea-autosize-8.3.3.tgz",
"integrity": "sha1-9wkTlFNp2kU/1VTBaPa6rNH6BNg=",
"dev": true,
"requires": {
"@babel/runtime": "^7.10.2",
"use-composed-ref": "^1.0.0",
"use-latest": "^1.0.0"
},
"dependencies": {
"@babel/runtime": {
"version": "7.14.8",
"resolved": "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.14.8.tgz",
"integrity": "sha1-cRmlb0IQGIUmlCkLn5FICXORtEY=",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.nlark.com/regenerator-runtime/download/regenerator-runtime-0.13.9.tgz?cache=0&sync_timestamp=1626993001371&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.13.9.tgz",
"integrity": "sha1-iSV0Kpj/2QgUmI11Zq0wyjsmO1I=",
"dev": true
}
}
},
"react-transition-group": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz",
@ -18559,12 +18389,6 @@
"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==",
"dev": true
},
"ts-essentials": {
"version": "2.0.12",
"resolved": "https://registry.nlark.com/ts-essentials/download/ts-essentials-2.0.12.tgz",
"integrity": "sha1-yTA/PXT3X6dSjD1JuA4ImrCdh0U=",
"dev": true
},
"tslib": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
@ -19074,30 +18898,6 @@
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
"integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
},
"use-composed-ref": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/use-composed-ref/download/use-composed-ref-1.1.0.tgz",
"integrity": "sha1-kiDk6UqXt7AtfSfq6rCzcDRDi7w=",
"dev": true,
"requires": {
"ts-essentials": "^2.0.3"
}
},
"use-isomorphic-layout-effect": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/use-isomorphic-layout-effect/download/use-isomorphic-layout-effect-1.1.1.tgz",
"integrity": "sha1-e7ZYkXDNKYehUgQvkIT57/t1wiU=",
"dev": true
},
"use-latest": {
"version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/use-latest/download/use-latest-1.2.0.tgz",
"integrity": "sha1-pE9lcrgojgly7EEb3QhAraNm8jI=",
"dev": true,
"requires": {
"use-isomorphic-layout-effect": "^1.0.0"
}
},
"user-home": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz",

View File

@ -193,7 +193,6 @@
"babel-core": "^6.26.0",
"babel-plugin-import": "^1.13.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
@ -204,7 +203,6 @@
"node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"purgecss": "^2.1.2",
"react-json-view": "^1.21.3",
"reqwest": "^2.0.5",
"resize-observer-polyfill": "^1.5.1",
"terser-webpack-plugin": "^2.3.5",

View File

@ -1753,7 +1753,7 @@ a.decoration {
}
.mb15 {
margin-bottom: 15px!important;
margin-bottom: 15px;
}
.mb16 {
@ -2424,16 +2424,10 @@ input::-ms-clear {
.color-grey-c {
color: #ccc !important;
}
a.hoverLine:hover{
text-decoration: underline;
}
.color-grey-cd {
color: #cdcdcd !important;
}
.color-grey-d {
color: #ddd;
}
.color-grey-9 {
color: #999999 !important;
@ -3415,7 +3409,7 @@ a.user_bluebg_btn {
}
.cdefault {
cursor: default!important;
cursor: default
}
@ -3914,17 +3908,6 @@ 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;
@ -6691,10 +6674,4 @@ p{
right: 0px;
top:4px;
color: #999;
}
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff!important;
}
.has-error .ant-input{
background-color: #FEF1F0!important;
}

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1627870211301') format('woff2'),
url('iconfont.woff?t=1627870211301') format('woff'),
url('iconfont.ttf?t=1627870211301') format('truetype');
src: url('iconfont.woff2?t=1622517296245') format('woff2'),
url('iconfont.woff?t=1622517296245') format('woff'),
url('iconfont.ttf?t=1622517296245') format('truetype');
}
.iconfont {
@ -13,210 +13,6 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-qingqiuicon:before {
content: "\e871";
}
.icon-xiangyingicon:before {
content: "\e87c";
}
.icon-duoxuanxuanzhong:before {
content: "\e88f";
}
.icon-cuowuicon:before {
content: "\e890";
}
.icon-chenggongicon:before {
content: "\e892";
}
.icon-weixuanzhongxiangyingicon:before {
content: "\e893";
}
.icon-bitianicon:before {
content: "\e895";
}
.icon-weixuanzhongxiangmubiaoqianicon:before {
content: "\e897";
}
.icon-liebiaoicon:before {
content: "\e898";
}
.icon-xialaanniu_icon:before {
content: "\e89a";
}
.icon-weixuanzhongqingqiuicon:before {
content: "\e89b";
}
.icon-xiezuozheguanliicon:before {
content: "\e8a1";
}
.icon-xuanzhongxiangyingicon:before {
content: "\e8a2";
}
.icon-xuanzhongfenzhiicon:before {
content: "\e8a3";
}
.icon-xuanzhongjibenshezhiicon:before {
content: "\e8a5";
}
.icon-xuanzhongxiangmubiaoqianicon:before {
content: "\e8aa";
}
.icon-a-xuanzhongwebhookicon:before {
content: "\e8af";
}
.icon-xinzengmulu_xuantingicon:before {
content: "\e884";
}
.icon-xinzengyemian_morenicon:before {
content: "\e885";
}
.icon-zhankai_morenicon:before {
content: "\e889";
}
.icon-shanchu_tc_icon:before {
content: "\e88c";
}
.icon-wiki_icon:before {
content: "\e88d";
}
.icon-xinzengyemian_shubiaodianjiicon:before {
content: "\e88e";
}
.icon-daorumoban_icon:before {
content: "\e86f";
}
.icon-daochu_xuanfu:before {
content: "\e870";
}
.icon-cuowu:before {
content: "\e872";
}
.icon-chenggong1:before {
content: "\e873";
}
.icon-gengduo_icon:before {
content: "\e874";
}
.icon-fucengguanbi_icon:before {
content: "\e875";
}
.icon-fuzhi_icon:before {
content: "\e876";
}
.icon-shanchuicon:before {
content: "\e877";
}
.icon-a-lajitong_icon3x:before {
content: "\e878";
}
.icon-shouqi_morenicon:before {
content: "\e879";
}
.icon-huanying_icon:before {
content: "\e87a";
}
.icon-sousuo_shanchuicon:before {
content: "\e87b";
}
.icon-sousuo_icon:before {
content: "\e87d";
}
.icon-wendangyulan_icon:before {
content: "\e87e";
}
.icon-wenjianjia_icon:before {
content: "\e87f";
}
.icon-xialaanniu:before {
content: "\e880";
}
.icon-xinzengmulu_morenicon:before {
content: "\e882";
}
.icon-xinzengmulu_shubiaodianjiicon:before {
content: "\e883";
}
.icon-erciqueren_icon:before {
content: "\e867";
}
.icon-xuanzhongssh_icon:before {
content: "\e868";
}
.icon-weixuanzhonganquanshezhi_icon:before {
content: "\e869";
}
.icon-weixuanzhongssh_icon:before {
content: "\e86a";
}
.icon-xuanzhonganquanshezhi_icon:before {
content: "\e86b";
}
.icon-shanchu_icon:before {
content: "\e86c";
}
.icon-liebiaossh_icon:before {
content: "\e86e";
}
.icon-file-submodule:before {
content: "\e866";
}
.icon-nv1:before {
content: "\e864";
}
.icon-nan1:before {
content: "\e865";
}
.icon-youxiang:before {
content: "\e8b2";
}

BIN
public/css/iconfont.eot Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -5,363 +5,6 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "23261798",
"name": "请求icon",
"font_class": "qingqiuicon",
"unicode": "e871",
"unicode_decimal": 59505
},
{
"icon_id": "23261799",
"name": "响应icon",
"font_class": "xiangyingicon",
"unicode": "e87c",
"unicode_decimal": 59516
},
{
"icon_id": "23144143",
"name": "多选选中",
"font_class": "duoxuanxuanzhong",
"unicode": "e88f",
"unicode_decimal": 59535
},
{
"icon_id": "23144144",
"name": "错误icon",
"font_class": "cuowuicon",
"unicode": "e890",
"unicode_decimal": 59536
},
{
"icon_id": "23144146",
"name": "成功icon",
"font_class": "chenggongicon",
"unicode": "e892",
"unicode_decimal": 59538
},
{
"icon_id": "23144147",
"name": "未选中响应icon",
"font_class": "weixuanzhongxiangyingicon",
"unicode": "e893",
"unicode_decimal": 59539
},
{
"icon_id": "23144149",
"name": "必填icon",
"font_class": "bitianicon",
"unicode": "e895",
"unicode_decimal": 59541
},
{
"icon_id": "23144151",
"name": "未选中项目标签icon",
"font_class": "weixuanzhongxiangmubiaoqianicon",
"unicode": "e897",
"unicode_decimal": 59543
},
{
"icon_id": "23144152",
"name": "列表icon",
"font_class": "liebiaoicon",
"unicode": "e898",
"unicode_decimal": 59544
},
{
"icon_id": "23144154",
"name": "下拉按钮_icon",
"font_class": "xialaanniu_icon",
"unicode": "e89a",
"unicode_decimal": 59546
},
{
"icon_id": "23144155",
"name": "未选中请求icon",
"font_class": "weixuanzhongqingqiuicon",
"unicode": "e89b",
"unicode_decimal": 59547
},
{
"icon_id": "23144158",
"name": "协作者管理icon",
"font_class": "xiezuozheguanliicon",
"unicode": "e8a1",
"unicode_decimal": 59553
},
{
"icon_id": "23144159",
"name": "选中响应icon",
"font_class": "xuanzhongxiangyingicon",
"unicode": "e8a2",
"unicode_decimal": 59554
},
{
"icon_id": "23144160",
"name": "选中分支icon",
"font_class": "xuanzhongfenzhiicon",
"unicode": "e8a3",
"unicode_decimal": 59555
},
{
"icon_id": "23144162",
"name": "选中基本设置icon",
"font_class": "xuanzhongjibenshezhiicon",
"unicode": "e8a5",
"unicode_decimal": 59557
},
{
"icon_id": "23144165",
"name": "选中项目标签icon",
"font_class": "xuanzhongxiangmubiaoqianicon",
"unicode": "e8aa",
"unicode_decimal": 59562
},
{
"icon_id": "23144167",
"name": "选中webhook icon",
"font_class": "a-xuanzhongwebhookicon",
"unicode": "e8af",
"unicode_decimal": 59567
},
{
"icon_id": "23046282",
"name": "新增目录_悬停icon",
"font_class": "xinzengmulu_xuantingicon",
"unicode": "e884",
"unicode_decimal": 59524
},
{
"icon_id": "23046283",
"name": "新增页面_默认icon",
"font_class": "xinzengyemian_morenicon",
"unicode": "e885",
"unicode_decimal": 59525
},
{
"icon_id": "23046287",
"name": "展开_默认icon",
"font_class": "zhankai_morenicon",
"unicode": "e889",
"unicode_decimal": 59529
},
{
"icon_id": "23046290",
"name": "shanchu_tc_icon",
"font_class": "shanchu_tc_icon",
"unicode": "e88c",
"unicode_decimal": 59532
},
{
"icon_id": "23046293",
"name": "wiki_icon",
"font_class": "wiki_icon",
"unicode": "e88d",
"unicode_decimal": 59533
},
{
"icon_id": "23046311",
"name": "新增页面_鼠标点击icon",
"font_class": "xinzengyemian_shubiaodianjiicon",
"unicode": "e88e",
"unicode_decimal": 59534
},
{
"icon_id": "23046244",
"name": "导入模版_icon",
"font_class": "daorumoban_icon",
"unicode": "e86f",
"unicode_decimal": 59503
},
{
"icon_id": "23046247",
"name": "导出_悬浮",
"font_class": "daochu_xuanfu",
"unicode": "e870",
"unicode_decimal": 59504
},
{
"icon_id": "23046252",
"name": "错误",
"font_class": "cuowu",
"unicode": "e872",
"unicode_decimal": 59506
},
{
"icon_id": "23046254",
"name": "成功",
"font_class": "chenggong1",
"unicode": "e873",
"unicode_decimal": 59507
},
{
"icon_id": "23046255",
"name": "更多_icon",
"font_class": "gengduo_icon",
"unicode": "e874",
"unicode_decimal": 59508
},
{
"icon_id": "23046258",
"name": "复层关闭_icon",
"font_class": "fucengguanbi_icon",
"unicode": "e875",
"unicode_decimal": 59509
},
{
"icon_id": "23046262",
"name": "复制_icon",
"font_class": "fuzhi_icon",
"unicode": "e876",
"unicode_decimal": 59510
},
{
"icon_id": "23046268",
"name": "删除icon",
"font_class": "shanchuicon",
"unicode": "e877",
"unicode_decimal": 59511
},
{
"icon_id": "23046269",
"name": "垃圾桶_icon@3x",
"font_class": "a-lajitong_icon3x",
"unicode": "e878",
"unicode_decimal": 59512
},
{
"icon_id": "23046270",
"name": "收起_默认icon",
"font_class": "shouqi_morenicon",
"unicode": "e879",
"unicode_decimal": 59513
},
{
"icon_id": "23046271",
"name": "欢迎_icon",
"font_class": "huanying_icon",
"unicode": "e87a",
"unicode_decimal": 59514
},
{
"icon_id": "23046273",
"name": "搜索_删除icon",
"font_class": "sousuo_shanchuicon",
"unicode": "e87b",
"unicode_decimal": 59515
},
{
"icon_id": "23046275",
"name": "搜索_icon",
"font_class": "sousuo_icon",
"unicode": "e87d",
"unicode_decimal": 59517
},
{
"icon_id": "23046276",
"name": "文档预览_icon",
"font_class": "wendangyulan_icon",
"unicode": "e87e",
"unicode_decimal": 59518
},
{
"icon_id": "23046277",
"name": "文件夹_icon",
"font_class": "wenjianjia_icon",
"unicode": "e87f",
"unicode_decimal": 59519
},
{
"icon_id": "23046278",
"name": "下拉按钮",
"font_class": "xialaanniu",
"unicode": "e880",
"unicode_decimal": 59520
},
{
"icon_id": "23046280",
"name": "新增目录_默认icon",
"font_class": "xinzengmulu_morenicon",
"unicode": "e882",
"unicode_decimal": 59522
},
{
"icon_id": "23046281",
"name": "新增目录_鼠标点击icon",
"font_class": "xinzengmulu_shubiaodianjiicon",
"unicode": "e883",
"unicode_decimal": 59523
},
{
"icon_id": "22906287",
"name": "二次确认_icon",
"font_class": "erciqueren_icon",
"unicode": "e867",
"unicode_decimal": 59495
},
{
"icon_id": "22906288",
"name": "选中ssh_icon",
"font_class": "xuanzhongssh_icon",
"unicode": "e868",
"unicode_decimal": 59496
},
{
"icon_id": "22906289",
"name": "未选中安全设置_icon",
"font_class": "weixuanzhonganquanshezhi_icon",
"unicode": "e869",
"unicode_decimal": 59497
},
{
"icon_id": "22906290",
"name": "未选中ssh_icon",
"font_class": "weixuanzhongssh_icon",
"unicode": "e86a",
"unicode_decimal": 59498
},
{
"icon_id": "22906291",
"name": "选中安全设置_icon",
"font_class": "xuanzhonganquanshezhi_icon",
"unicode": "e86b",
"unicode_decimal": 59499
},
{
"icon_id": "22906292",
"name": "删除_icon",
"font_class": "shanchu_icon",
"unicode": "e86c",
"unicode_decimal": 59500
},
{
"icon_id": "22906293",
"name": "列表ssh_icon",
"font_class": "liebiaossh_icon",
"unicode": "e86e",
"unicode_decimal": 59502
},
{
"icon_id": "17575494",
"name": "file-submodule",
"font_class": "file-submodule",
"unicode": "e866",
"unicode_decimal": 59494
},
{
"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": "邮箱",

1874
public/css/iconfont.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 733 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="zh-CN" class="notranslate translated-ltr" translate="no">
<html lang="en">
<head>
<meta charset="utf-8">
<meta name=”Keywords” Content=”trustie,trustieforge,forge,确实让创建更美好,协同开发平台″>

View File

@ -60,13 +60,12 @@ body {
.ant-progress-textno {
color: #f5222d;
}
.CodeMirror pre.CodeMirror-line{
font-size: 16px!important;
}
/* md多空格 */
.markdown-body p {
margin:10px 0px!important;
font-size: 16px !important;
line-height: 2 !important;
white-space: pre-wrap;
}
@ -88,10 +87,6 @@ body {
border-left: 1px solid rgb(221, 221, 221);
/* 某些情况下被cm盖住了 */
z-index: 99;
padding:8px 8px 50px;
}
.editormd-preview .markdown-body{
padding:0px !important;
}
/* 图片点击放大的场景,隐藏图片链接 */

View File

@ -39,11 +39,6 @@ const Projects = Loadable({
loader: () => import('./forge/Index'),
loading: Loading,
})
//forge安全设置
const Security = Loadable({
loader: () => import('./forge/SecuritySetting/Index'),
loading: Loading,
})
//forge项目-devOps详情
const OpsDetail = Loadable({
loader: () => import('./forge/DevOps/opsDetail'),
@ -83,10 +78,6 @@ const Search = Loadable({
loading: Loading,
})
const ProjectIndex = Loadable({
loader: () => import("./forge/Index"),
loading: Loading,
});
class App extends Component {
constructor(props) {
super(props);
@ -112,9 +103,30 @@ class App extends Component {
Addcoursestypes: false
})
};
ModalCancelsy = () => {
this.setState({
mydisplay: false,
})
window.location.href = "/";
};
ModalshowCancelsy = () => {
this.setState({
mydisplay: true,
})
};
disableVideoContextMenu = () => {
window.$("body").on("mousedown", "video", function (event) {
if (event.which === 3) {
window.$('video').bind('contextmenu', function () { return false; });
} else {
window.$('video').unbind('contextmenu');
}
});
}
componentDidMount() {
document.title = "loading...";
this.disableVideoContextMenu();
initAxiosInterceptors(this.props);
this.getAppdata();
@ -192,8 +204,6 @@ class App extends Component {
};
render() {
const { mygetHelmetapi } = this.state;
let personal = mygetHelmetapi && mygetHelmetapi.personal;
return (
<Provider store={store}>
<ConfigProvider locale={zhCN}>
@ -211,14 +221,6 @@ class App extends Component {
}
}>
</Route>
<Route
path={"/settings"}
render={
(props) => {
return (<Security {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/*项目*/}
<Route
path={"/projects"}
@ -263,10 +265,7 @@ class App extends Component {
<Route exact path="/"
render={
(props) => (
personal && personal.length > 0 ?
<InfosIndex {...this.props} {...props} />
:
<ProjectIndex {...this.props} {...props} />
<Projects {...this.props} {...props} {...this.state}></Projects>
)
}
/>

View File

@ -9,7 +9,20 @@ class Loading extends Component {
}
render() {
return ""
return (
<div className="App" style={{ minHeight: '800px', width: "100%" }}>
<style>
{
`
.margintop{
margin-top:20%;
}
`
}
</style>
<Spin size="large" className={"margintop"} />
</div>
);
}
}

View File

@ -1,7 +1,7 @@
import React , { Component } from 'react';
import { Dropdown , Menu , Icon , Pagination , Spin } from 'antd';
import '../css/index.scss';
import '../Branch/branch.scss';
import '../Branch/branch.css';
import './activity.css';
import NoneData from '../Nodata';

View File

@ -1,35 +1,39 @@
import React, { useState } from 'react';
import { Dropdown, Menu, Tooltip } from 'antd';
import "./branch.scss";
import React, { Component } from 'react';
import { Dropdown, Icon, Tooltip } from 'antd';
import "./branch.css";
function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
const [ key , setKey ] = useState("HTTP");
class CloneAddress extends Component {
// 点击按钮复制功能
function jsCopy(){
jsCopy = () => {
var e = document.getElementById("copy_rep_content");
e.select();
document.execCommand("Copy");
}
return (
<div className="downMenu">
<div style={{padding:"10px 20px 20px 20px",borderBottom:"1px solid #eee"}}>
<Menu className="urlMenu" selectedKeys={[key]} mode={"horizontal"}>
<Menu.Item key="HTTP" onClick={(e)=>{setKey(e.key)}}>HTTP</Menu.Item>
<Menu.Item key="SSH" onClick={(e)=>{setKey(e.key)}}>SSH</Menu.Item>
</Menu>
<div className="gitAddressClone">
<input type="text" id="copy_rep_content" value={key==="HTTP" ? http_url:ssh_url} />
<Tooltip title="复制链接">
<span className="color-blue" onClick={jsCopy}><i className="iconfont icon-fuzhi"></i></span>
</Tooltip>
</div>
render() {
const { http_url, downloadUrl } = this.props;
return (
<div className="gitAddressClone">
{/* <p className="addressTips"><span>版本库地址已变更,请基于新地址提交代码</span></p> */}
{
http_url && <span>HTTP</span>
}
<input type="text" id="copy_rep_content" value={http_url} />
<Tooltip title="复制链接">
<span className="color-blue" onClick={() => this.jsCopy()}><i className="iconfont icon-fuzhi"></i></span>
</Tooltip>
{
downloadUrl &&
<span>
<Dropdown overlay={downloadUrl} trigger={['click']} placement="bottomRight">
<a className="ant-dropdown-link">
<Icon type="cloud-download" className="font-18 fl color-blue" />
</a>
</Dropdown>
</span>
}
</div>
<Menu className="edu-txt-center">
<Menu.Item><a href={zip_url}>下载 ZIP</a></Menu.Item>
<Menu.Item><a href={tar_url}>下载 TAR.GZ</a></Menu.Item>
</Menu>
</div>
)
)
}
}
export default CloneAddress;

View File

@ -1,6 +1,6 @@
import React , { useState , useEffect } from 'react';
import { Popover , Input , Spin } from 'antd';
import './branch.scss';
import './branch.css';
import { getBranch , getTag } from '../GetData/getData';

View File

@ -81,25 +81,4 @@
.listTips{
padding:20px 0px;
text-align: center;
}
.urlMenu{
line-height: 30px;
margin-bottom: 10px;
border-bottom: none;
li.ant-menu-item{
height: 30px;
line-height: 30px;
padding:0px 5px;
margin-right: 20px!important;
&.ant-menu-item-selected,&.ant-menu-item-active{
color: #333;
}
&.ant-menu-item-selected{
border-color:#1890ff!important;
}
&.ant-menu-item-active{
border-color:transparent ;
}
}
}

View File

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

View File

@ -1,35 +0,0 @@
import React from 'react';
import { AlignCenter } from '../layout';
import { Modal , Button } from 'antd';
import './Index.scss';
function DeleteBox({
visible ,
onCancel ,
onSuccess ,
title ,
subTitle,
content
}) {
return(
<Modal
visible={visible}
onCancel={onCancel}
title={title}
width="600px"
className="deleteBox"
footer={
<div>
<Button size={'large'} onClick={onCancel}>取消</Button>
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
</div>
}
>
<div className="desc">
<AlignCenter className="descMain"><i className="iconfont icon-shanchu_tc_icon mr10"></i>{content}</AlignCenter>
<p>{subTitle}</p>
</div>
</Modal>
)
}
export default DeleteBox;

View File

@ -1,45 +0,0 @@
.deleteBox{
.ant-modal-header{
background-color: #f8f8f8;
border-bottom: none;
.ant-modal-title{
text-align: left;
font-size: 20px;
}
}
.ant-modal-body{
padding:30px 50px;
p{
font-size: 16px;
line-height: 26px;
color:#666;
word-break: break-all;
}
.desc{
.descMain{
align-items: center;
justify-content: center;
font-size: 20px;
margin-bottom: 10px;
i{
font-size: 38px!important;
color:#DF0002
}
}
}
}
.ant-modal-footer{
border-top: none;
text-align: center;
padding-bottom: 40px;
button{
width: 120px;
margin:0px 20px;
&.ant-btn-danger{
background-color: #fff;
color: #DF0002;
border-color: #D0D0D0;
}
}
}
}

View File

@ -4,12 +4,6 @@ import './Component.scss';
import axios from 'axios';
const { TreeNode , DirectoryTree } = Tree;
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
return str.replaceAll('/','%2F');
}
return str;
}
function DrawerPanel({visible,onClose,branch,owner,projectsId,history, name , list}){
const [ treeData , setTreeData ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true);
@ -77,8 +71,7 @@ function DrawerPanel({visible,onClose,branch,owner,projectsId,history, name , li
let dataref = event.node.props.dataRef;
if(dataref.type==="file"){
onClose();
let value = turnbar(branch);
history.push(`/projects/${owner}/${projectsId}/tree/${value}/${dataref.path}`);
history.push(`/projects/${owner}/${projectsId}/tree/${branch}/${dataref.path}`);
}
}

View File

@ -3,4 +3,7 @@
}
.ant-modal-wrap{
z-index: 1002;
.ant-form-explain{
position: absolute;
}
}

View File

@ -1,62 +0,0 @@
import React, {useEffect, useRef, useState} from 'react';
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
import './Component.scss';
function Monaco(props) {
const {
style = { // dom
height: '400px',
},
value = '', //
onChange = () => { //
},
fontSize = 14, //
monacoOptions = {
scrollBeyondLastLine: false,
lineNumbers: "off",
wordWrap: true,
overviewRulerBorder: true,
lineHeight: 24,
readOnly:true
}, // monaco
language = 'html', // js ts sql css json html
} = props;
const editOrRef = useRef();
const ThisEditor = useRef();
useEffect(() => {
ThisEditor.current = monaco.editor.create(editOrRef.current, {
value: value || '',
language,
theme: "vs-grey",
fontSize: fontSize + 'px',
minimap: { //
enabled: false,
},
...monacoOptions,
});
ThisEditor.current.onDidChangeModelContent((e) => {
let newValue = ThisEditor.current.getValue();
onChange(newValue);
});
return () => {
ThisEditor.current.dispose();
ThisEditor.current = undefined; //
}
}, []);
useEffect(() => {
if (ThisEditor.current) {
ThisEditor.current.updateOptions({
fontSize: fontSize + 'px',
})
}
}, [fontSize]);
return (
<div style={style} ref={editOrRef}>
</div>
);
}
export default Monaco;

View File

@ -2,7 +2,7 @@ import React from 'react';
import { AlignCenter , AlignTop , FlexAJ } from '../Component/layout';
import { Link } from 'react-router-dom';
function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}){
function Releases({owner,projectsId,releaseVersions}){
return(
<div>
@ -10,10 +10,10 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}
<AlignCenter><span className="font-16 color-grey-6">发行版</span>
{ releaseVersions && releaseVersions.total_count > 0 && <span className="infoCount">{releaseVersions.total_count}</span>}
</AlignCenter>
{ (releaseVersions && releaseVersions.total_count > 0) || projectType ===2 ?
{ releaseVersions && releaseVersions.total_count > 0 ?
<Link className="font-12 color-grey-9" to={`/projects/${owner}/${projectsId}/releases`}>全部</Link>
:
baseOperate && <Link className="font-12 color-blue" to={`/projects/${owner}/${projectsId}/releases/new`}>新建</Link>
<Link className="font-12 color-blue" to={`/projects/${owner}/${projectsId}/releases/new`}>新建</Link>
}
</FlexAJ>
{

View File

@ -10,12 +10,6 @@ import { Link } from 'react-router-dom';
// killed:"",
// pending:""
// }
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
return str.replaceAll('/','%2F');
}
return str;
}
function renderTableStatus(status) {
switch (status) {
case "running":
@ -71,9 +65,8 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){
width:"15%",
ellipsis:true,
render:(value,item)=>{
let v = turnbar(item.branch);
return(
<Link to={`/projects/${owner}/${projectsId}/tree/${v}/${value}`} className="color-blue">{value}</Link>
<Link to={`/projects/${owner}/${projectsId}/tree/${item.branch}/${value}`} className="color-blue">{value}</Link>
)
}
},

View File

@ -42,7 +42,7 @@ function PipelineName({visible,onCancel,onOk,value ,branchList}){
</div>
<div className="choosenList mt20">
<span>触发条件:</span>
<Select value={branchValue} style={{width:"150px"}} dropdownClassName="chooseCon" onChange={(e)=>setBranchValue(e)}>
<Select value={branchValue} style={{width:"150px"}} onChange={(e)=>setBranchValue(e)}>
{
branchList && branchList.length>0 && branchList.map((item,key)=>{
return(
@ -51,7 +51,7 @@ function PipelineName({visible,onCancel,onOk,value ,branchList}){
})
}
</Select>
<Select mode="multiple" allowClear value={eventValue} dropdownClassName="chooseCon" style={{width:"180px",marginLeft:"10px"}} onChange={(e)=>{console.log(e);setEventValue(e)}}>
<Select mode="multiple" allowClear value={eventValue} style={{width:"180px",marginLeft:"10px"}} onChange={(e)=>{console.log(e);setEventValue(e)}}>
{
EVENT.map((item,key)=>{
return(

View File

@ -2,7 +2,7 @@ import React, { useState, useEffect , useImperativeHandle ,forwardRef } from "re
import { FlexAJ, AlignCenter , Banner } from "../Component/layout";
import { Table, Pagination, Popconfirm } from "antd";
import { truncateCommitId } from "../common/util";
import { getImageUrl } from 'educoder';
import {getUrl} from 'educoder';
import axios from "axios";
import { Link } from 'react-router-dom';
@ -245,7 +245,7 @@ function Structure(props,ref){
{meg.sha && <span className="color-orange">{meg.sha}</span>}
</div>
<AlignCenter>
<img style={{borderRadius:"50%",marginRight:"10px",width:"25px",height:"25px"}} alt="" src={`${item.image_url && getImageUrl(`/${item.image_url}`)}`} />
<img style={{borderRadius:"50%",marginRight:"10px",width:"25px",height:"25px"}} alt="" src={`${item.image_url && getUrl(`/images/${item.image_url}`)}`} />
<div className="task-hide ml5" style={{ maxWidth: "300px" }}>
{meg.message}
</div>

View File

@ -391,9 +391,6 @@
}
}
}
.chooseCon.ant-select-dropdown{
z-index: 100001;
}
.choosenList{
display: flex;

View File

@ -152,21 +152,20 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
</Form.Item>
}
<Form.Item label="仓库标识:" style={{marginBottom:"0px"}}>
<Form.Item label="仓库名称:">
{getFieldDecorator("identifier",
{
rules:[
{required:true,message:"请输入仓库标识!"},
{required:true,message:"请输入仓库名称"},
{
validator:checkIdentifier
}
]
}
)(
<Input placeholder="请输入仓库标识" autoComplete={"off"}/>
<Input placeholder="请输入仓库名称" autoComplete={"off"}/>
)}
</Form.Item>
<span className="color-grey-9" style={{marginLeft:"120px"}}>请输入当前项目的标识<span className="ml5 mr5 color-grey-3">{repo}</span>进行确认</span>
</Form>
</div>
</Modal>

View File

@ -19,7 +19,7 @@ function Footer(){
return(
<div>
<div style={{height:"497px"}}></div>
<div style={{height:"483px"}}></div>
<div className="newFooter edu-txt-center">
{value && showhtml(value)}
{/* <div className="footerInfos">

View File

@ -3,9 +3,9 @@ import AccountProfile from "../../modules/user/AccountProfile";
import { getImageUrl } from 'educoder'
import axios from 'axios';
import { Input , notification , Dropdown , Menu } from 'antd';
import { Link } from 'react-router-dom';
import LoginDialog from '../../modules/login/LoginDialog';
import GotoQQgroup from '../../modal/GotoQQgroup';
import HeadSearch from '../Component/HeadSearch';
import AddProjectModal from './AddProjectModal';
@ -79,6 +79,36 @@ class NewHeader extends Component {
} catch (e) {}
}
// SearchInput = (open,item)=>{
// if(open){
// return(
// <div
// onBlur={() => {
// setTimeout(() => {
// this.setState({
// openSearch:false
// })
// }, 300)
// }}
// >
// <Search placeholder="实践课程/教学课堂/实践项目/交流问答"
// className={`search-input mr20`}
// onSearch={(value)=>this.onGlobalSearch(value,item)}
// autoFocus={true}
// />
// </div>
// )
// }else{
// return <i className="iconfont icon-sousuo font-18 color-grey-6 ml30" onClick={() => {
// this.setState({openSearch:true})
// }} />
// }
// }
// onGlobalSearch=(value,item)=>{
// window.location.href=`${item}?value=` + value;
// }
openNotification = (messge) => {
notification.open({
message: "提示",
@ -87,6 +117,8 @@ class NewHeader extends Component {
});
};
componentWillReceiveProps(newProps, oldProps) {
this.setState({
user: newProps.user
@ -96,6 +128,7 @@ class NewHeader extends Component {
}
}
educoderlogin = () => {
//登录账号
this.setState({
@ -133,11 +166,13 @@ class NewHeader extends Component {
})
};
// 关闭
cancelModulationModels = () => {
this.setState({ isRenders: false })
}
setevaluatinghides = () => {
this.setState({
setevaluatinghides: true
@ -254,7 +289,6 @@ class NewHeader extends Component {
)
})
}
<li><Link to={`/settings/SSH`}>设置</Link></li>
<Menu.Item><a onClick={() => this.educoderloginysl()}>退出</a></Menu.Item>
</Menu>
)
@ -263,13 +297,17 @@ class NewHeader extends Component {
render() {
const { match} = this.props;
let current_user = this.props.user;
let {
let { Addcoursestypes,
tojoinitemtype,
tojoinclasstitle,
code_notice,
AccountProfiletype,
user,
isRender,
headtypesonClickbool,
headtypess,
settings,
openSearch,
} = this.state;
/*用户名称 用户头像url*/
let activeIndex = false;

View File

@ -33,7 +33,7 @@
li{
height: 40px;
line-height: 40px;
padding:0px!important;
padding:0px;
cursor: default;
&:hover{
background-color: #fff;

View File

@ -26,6 +26,10 @@ const ProjectDetail = Loadable({
loading: Loading,
});
const Infos = Loadable({
loader: () => import("./users/Infos"),
loading: Loading,
});
class Index extends Component {
componentDidUpdate=()=>{
@ -70,8 +74,12 @@ class Index extends Component {
)}
></Route>
<Route
exact
path="/"
render={(props) => (
this.props.current_user && this.props.current_user.login ?
<Infos {...this.props} {...props} />
:
<ProjectIndex {...this.props} {...props} />
)}
></Route>

View File

@ -19,27 +19,12 @@ import LanguagePower from '../Component/LanguagePower';
import DrawerPanel from '../Component/DrawerPanel';
import UpdateDescModal from './sub/UpdateDescModal';
import Nodata from '../Nodata';
import Invite from './sub/Invite';
/**
* projectDetail.type:0是托管项目1是镜像项目2是同步镜像项目(为2时不支持在线创建在线上传在线修改在线删除创建合并请求等功能)
*/
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
return str.replaceAll('/','%2F');
}
return str;
}
function returnbar(str){
if(str && str.length>0 && str.indexOf("%2F")>-1){
return str.replaceAll('%2F','/');
}
return str;
}
function CoderDepot(props){
const [ projectDetail , setProjectDetail ]= useState(undefined);
const [ inviteCode , setInviteCode ] = useState(undefined);
const [ treeValue , setTreeValue ] = useState(undefined);
const [ treeValuePath , setTreeValuePath ] = useState(undefined);
const [ lastCommit,setLastCommit ] = useState(undefined);
@ -61,33 +46,13 @@ function CoderDepot(props){
const [ website , setWebsite ] = useState(undefined);
const [ lesson_url , setLessonUrl ] = useState(undefined);
const [ readme , setReadme ] = useState(undefined);
const [ defaultBranch , setDefaultBranch ] = useState(undefined);
const [ editReadme , setEditReadme ] = useState(false);
const [ pullsFlag , setPullsFlag ] = useState(true);
const [ issuesFlag , setIssuesFlag ] = useState(true);
const [ defaultBranch , setDefaultBranch ] = useState(undefined)
const owner = props.match.params.owner;
const projectsId = props.match.params.projectsId;
let branchName = props.match.params.branchName;
branchName = returnbar(branchName);
const branchName = props.match.params.branchName;
const details = props.projectDetail;
let pathname = props.history.location.pathname;
const { bannerList } = props;
useEffect(()=>{
if(bannerList && bannerList.length>0){
let a = bannerList.filter(i=>i.menu_name === "pulls");
let i = bannerList.filter(i=>i.menu_name === "issues");
if(a && a.length === 0){
setPullsFlag(false);
}
if(i && i.length === 0){
setIssuesFlag(false);
}
}
},[bannerList])
useEffect(()=>{
if(details){
@ -96,7 +61,6 @@ function CoderDepot(props){
setWebsite(details.website);
setLessonUrl(details.lesson_url);
setDefaultBranch(details.default_branch);
setInviteCode(details.invite_code);
}
},[details])
@ -111,16 +75,13 @@ function CoderDepot(props){
useEffect(()=>{
if (projectsId && owner && defaultBranch){
let b = turnbar(branchName) ;
if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${b}/`) > -1) {
let url = pathname.split(`/tree/${b}/`)[1];
if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${branchName}/`) > -1) {
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])
@ -129,7 +90,6 @@ function CoderDepot(props){
function getDirInfo(branch){
setIsSpin(true);
const url = `/${owner}/${projectsId}/entries.json`;
axios.get(url, {
params: { ref: branch }
}).then((result) => {
@ -145,8 +105,6 @@ function CoderDepot(props){
setMainFlag(true);
setReadOnly(true);
setReadme(result.data.readme);
setEditReadme(false);
setHide(true);
}
setTimeout(function(){setIsSpin(false);},500);
}).catch(error=>{setIsSpin(false);})
@ -158,7 +116,7 @@ function CoderDepot(props){
let ele = document.getElementById("ptxt");
if(ele){
let h = ele.offsetHeight;
if( h > 18 ) setHideBtn(true);
if( h > 18 ) setHideBtn(true)
}
}
},[projectDetail,lastCommit])
@ -188,8 +146,7 @@ function CoderDepot(props){
setLastCommit(c && c.commit);
setLastCommitAuthor(c && c.committer);
setMainFlag(false);
setReadOnly(!editReadme);
setHide(true);
setReadOnly(true);
}
setTimeout(function(){setIsSpin(false);},500)
}).catch(error=>{setIsSpin(false);})
@ -197,22 +154,17 @@ function CoderDepot(props){
//
function changeBranch(value){
let checkvalue = turnbar(value);
let url = `/projects/${owner}/${projectsId}${value && `/tree/${checkvalue}`}${treeValue ? `/${treeValue}`:""}`;
let url = `/projects/${owner}/${projectsId}${value && `/tree/${value}`}${treeValue ? `/${treeValue}`:""}`;
props.history.push(url);
}
//
function fileMenu(){
let b = branchName || defaultBranch;
let checkvalue = turnbar(b);
return (
const fileMenu =(
<Menu>
<Menu.Item><a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</a></Menu.Item>
<Menu.Item><a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</a></Menu.Item>
<Menu.Item><a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/${branchName || defaultBranch}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</a></Menu.Item>
<Menu.Item><a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/${branchName || defaultBranch}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</a></Menu.Item>
</Menu>
)
}
)
function getPathUrl(array,index){
if(array && array.length>0 && index){
@ -227,35 +179,26 @@ function CoderDepot(props){
function returnMain(){
setTreeValue(undefined);
let branch = branchName || defaultBranch;
let checkvalue = turnbar(branch);
props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}`);
props.history.push(`/projects/${owner}/${projectsId}/tree/${branch}`);
};
//
function returnUlr(url){
let enBranch = turnbar(branchName);
props.history.push(`/projects/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
props.history.push(`/projects/${owner}/${projectsId}/tree${branchName?`/${branchName}`:""}/${url}`);
}
//
function goToSubRoot(path,type,filename){
if(type!=="submodule"){
let enBranch = branchName || defaultBranch;
let checkvalue = turnbar(enBranch);
setType(type);
props.history.push(`/projects/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`);
}
setType(type);
props.history.push(`/projects/${owner}/${projectsId}${`/tree/${branchName || defaultBranch}`}${path?`/${path}`:""}`);
}
function onEdit(readOnly){
setReadOnly(readOnly);
setEditReadme(false);
}
function ChangeFile(path, readOnly){
//
let enBranch = branchName || defaultBranch;
let checkvalue = turnbar(enBranch);
props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}/${path}`);
props.history.push(`/projects/${owner}/${projectsId}/tree/${branchName || defaultBranch}/${path}`);
setType("file");
setEditReadme(true);
setReadOnly(readOnly);
};
function changeHide(hide){
@ -271,12 +214,17 @@ function CoderDepot(props){
}
const downloadMenu = (
<CloneAddress
http_url={projectDetail && projectDetail.clone_url}
ssh_url = {projectDetail && projectDetail.ssh_url}
zip_url={zip_url}
tar_url={tar_url}
showNotification={props.showNotification}/>
<div className="downMenu">
<div style={{padding:"20px",borderBottom:"1px solid #eee"}}>
<CloneAddress
http_url={projectDetail && projectDetail.clone_url}
showNotification={props.showNotification}/>
</div>
<Menu className="edu-txt-center">
<Menu.Item><a href={zip_url}>下载 ZIP</a></Menu.Item>
<Menu.Item><a href={tar_url}>下载 TAR.GZ</a></Menu.Item>
</Menu>
</div>
)
// website
function okUpdate(d,w,l){
@ -295,8 +243,8 @@ function CoderDepot(props){
const mdFlag = n && n.substring(n.length-3,n.length) === ".md";
const { current_user } = props;
const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter";
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && 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(
<WhiteBack>
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
@ -358,21 +306,15 @@ function CoderDepot(props){
</AlignCenter>
</AlignCenter>
<AlignCenter>
{
baseOperate && ((projectDetail.type !== 2 && pullsFlag) || issuesFlag )&&
<div className="mr20 addOptionBtn">
{
projectDetail.type !== 2 && pullsFlag &&
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</a>
}
{
issuesFlag &&
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务</a>
}
</div>
}
<div className="mr20 addOptionBtn">
{
projectDetail.type !== 2 &&
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</a>
}
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务</a>
</div>
{ fileOperate &&
<Dropdown overlay={fileMenu()} className="mr20" trigger={['click']}>
<Dropdown overlay={fileMenu} className="mr20" trigger={['click']}>
<Button type="default">文件 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-grey-9"></i></Button>
</Dropdown>
}
@ -389,15 +331,11 @@ function CoderDepot(props){
lastCommit &&
<div className="listtablehead">
<User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/>
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}>
<pre id="ptxt">{lastCommit && lastCommit.message}</pre>
</div>
<div className={hideBtn && hide ? "ellipsistxt hide" :"ellipsistxt"}><pre id="ptxt">{lastCommit && lastCommit.message}</pre></div>
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }
<span className="ml12 color-grey-9 mt3">{lastCommit && lastCommit.time_from_now}</span>
{ commitCount ? <Link to={`/projects/${owner}/${projectsId}/commits/branch/${turnbar(branchName || defaultBranch)}`} className="ml12 color-grey-9">
<i className="iconfont icon-tijiao mr3 font-17 color-grey-9"></i>{commitCount}次提交
</Link>:"" }
{ commitCount ? <Link to={`/projects/${owner}/${projectsId}/commits`} className="ml12 color-grey-9"><i className="iconfont icon-tijiao mr3 font-17 color-grey-9"></i>{commitCount}次提交</Link>:"" }
</div>
}
<ul className="listtablebody">
@ -479,19 +417,12 @@ function CoderDepot(props){
</p>
}
</div>
{
inviteCode &&
<div>
<Divider />
<Invite code={inviteCode} className={"detailsCode"}/>
</div>
}
{
lesson_url &&
<div>
<Divider />
<p className="font-16 color-grey-6">实践课程</p>
<a href={lesson_url} target="_blank" className="color-grey-6" style={{textDecoration:"underline",wordBreak:"break-all"}}>{lesson_url}</a>
<a href={lesson_url} target="_blank" className="color-grey-6" style={{textDecoration:"underline"}}>{lesson_url}</a>
</div>
}
{/* 发布 */}
@ -499,14 +430,7 @@ function CoderDepot(props){
projectDetail && projectDetail.release_versions &&
<React.Fragment>
<Divider />
<Releases
owner={owner}
projectsId={projectsId}
releaseVersions={projectDetail.release_versions}
history={props.history}
baseOperate={baseOperate}
projectType={projectDetail.type}
/>
<Releases owner={owner} projectsId={projectsId} releaseVersions={projectDetail.release_versions} history={props.history}/>
</React.Fragment>
}
{/* 贡献者 */}

View File

@ -2,18 +2,12 @@ import React from 'react';
import { Link } from 'react-router-dom';
import { truncateCommitId } from '../common/util';
const typeIco = {
"submodule":"icon-file-submodule font-17",
"file":'icon-wenjia font-15',
"dir":"icon-wenjianjia1 font-15"
}
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
return(
<li>
<span>
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}>
<i className={`iconfont ${typeIco[`${item.type}`]} color-green-file mr5`}></i>{item.name}
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)}>
<i className={item.type === 'dir' ? "iconfont icon-wenjianjia1 color-green-file font-15 mr5":"iconfont icon-wenjia color-green-file font-15 mr5"}></i>{item.name}
</a>
</span>
<span title="init project">

View File

@ -1,6 +1,5 @@
import React, { useEffect, useState } from 'react';
import RenderHtml from '../../components/render-html';
import { AlignCenter } from '../Component/layout';
import { Dropdown , Menu , Spin } from 'antd';
import { Link } from 'react-router-dom';
const $ = window.$;
@ -48,16 +47,11 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
}
return(
<div className="commonBox" id="readme">
<div className="commonBox-title boxTitle">
<AlignCenter>
<Dropdown overlay={menu()}>
<span className="catelogue">
<i className="iconfont icon-zhangjie1 font-14 mr5"></i>
<span>目录</span>
</span>
</Dropdown>
<span className="commonBox-title-read">README.md</span>
</AlignCenter>
<div className="commonBox-title">
<Dropdown overlay={menu()}>
<i className="iconfont icon-zhangjie1 font-16 color-grey-3 mr10"></i>
</Dropdown>
<span className="commonBox-title-read">README.md</span>
{
operate ?
<a className="ml20 pull-right" onClick={() =>ChangeFile(readme && readme.path, false)}>

View File

@ -6,18 +6,12 @@ import { getBranch } from '../GetData/getData';
import Nodata from '../Nodata';
import './list.css';
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
return str.replaceAll('/','%2F');
}
return str;
}
export default ((props)=>{
const [ data , setData ] =useState(undefined);
const [ isSpin , setIsSpin ] =useState(true);
const { projectsId , owner } = props.match.params;
const { isManager , isDeveloper , projectDetail } = props;
useEffect(()=>{
getBranchs(projectsId, owner);
},[projectsId])
@ -38,7 +32,7 @@ export default ((props)=>{
return(
<li key={key}>
<div>
<Link to={`/projects/${owner}/${projectsId}/tree/${turnbar(item.name)}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
<Link to={`/projects/${owner}/${projectsId}/tree/${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
<p className="f-wrap-alignCenter mt15">
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.last_commit.sha}`)}`} className="mr5 commitKey" style={{marginLeft:0}}>{item.last_commit && truncateCommitId(item.last_commit.sha)}</Link>
<span className="color-grey-3 hide-1 messages leftPoint">{item.last_commit && item.last_commit.message}</span>
@ -46,10 +40,7 @@ export default ((props)=>{
</p>
</div>
<span>
{
(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
<Link to={`/projects/${owner}/${projectsId}/pulls/new/${item.name}`} 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>
@ -73,7 +64,6 @@ export default ((props)=>{
<Menu.Item key={'1'}><a href={tar_url}>TAR.GZ</a></Menu.Item>
</Menu>
)
return(
<React.Fragment>
<div className="main">

View File

@ -2,19 +2,12 @@ import React , { Component } from 'react';
import { Spin , Pagination } from 'antd';
import { getImageUrl } from 'educoder';
import { truncateCommitId } from '../common/util';
import { AlignTop } from '../Component/layout';
import SelectBranch from '../Branch/Select';
import Nodata from '../Nodata';
import axios from 'axios';
import {Link} from "react-router-dom";
function returnbar(str){
if(str && str.length>0 && str.indexOf("%2F")>-1){
return str.replaceAll('%2F','/');
}
return str;
}
class CoderRootCommit extends Component{
constructor(props){
super(props)
@ -63,12 +56,11 @@ class CoderRootCommit extends Component{
this.setState({
isSpining:true
})
console.log(returnbar(branch));
const { projectsId , owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/commits.json`;
axios.get(url,{
params:{
sha:returnbar(branch),
sha:branch,
page,
limit
}
@ -113,7 +105,7 @@ class CoderRootCommit extends Component{
const { commitDatas , dataCount , limit , page , isSpining , branchList } = this.state;
const { projectDetail, commit_class , defaultBranch } = this.props;
const { projectsId , owner , branchName } = this.props.match.params;
let branch = returnbar(branchName || defaultBranch);
let branch = branchName || defaultBranch;
return(
<React.Fragment>
<div className={"main"}style={{padding:"0px",border:"none"}}>
@ -140,10 +132,10 @@ class CoderRootCommit extends Component{
commitDatas && commitDatas.length > 0 && commitDatas.map((item,k)=>{
return(
<div key={k}>
<AlignTop>
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitKey" style={{marginLeft:0,marginTop:"3px"}}>{truncateCommitId(`${item.sha}`)}</Link>
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitDesc">{item.message}</Link>
</AlignTop>
<p className="f-wrap-alignCenter">
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitKey" style={{marginLeft:0}}>{truncateCommitId(`${item.sha}`)}</Link>
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="flex1 ml20 font-16 color-grey-3">{item.message}</Link>
</p>
<p className="f-wrap-alignCenter mt15">
{
item.id ?

View File

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

View File

@ -102,11 +102,6 @@ class CoderRootIndex extends Component{
(props) => (<FileNew {...this.props} {...props} {...this.state} getTopCount={this.getTopCount} />)
}
></Route>
<Route path="/projects/:owner/:projectsId/commits/branch/:branchName"
render={
() => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" getTopCount={this.getTopCount} />)
}
></Route>
<Route path="/projects/:owner/:projectsId/commits/:sha"
render={
(props) => (<Diff {...this.props} {...props} {...this.state}/>)

View File

@ -1,8 +1,9 @@
import React, { Component } from 'react';
import { Spin, Tooltip , Button } from 'antd';
import { Spin, Tooltip , message } from 'antd';
import { Link, Route, Switch } from 'react-router-dom';
import { Content , AlignTop } from '../Component/layout';
import { Content , FlexAJ } from '../Component/layout';
import DetailBanner from './sub/DetailBanner';
import Invite from './sub/Invite';
import '../css/index.scss'
import './list.css';
@ -176,7 +177,6 @@ class Detail extends Component {
firstSync:false,
secondSync:false,
open_devops:false,
forkSpin:false,
// 默认分支
defaultBranch:undefined,
@ -359,9 +359,6 @@ class Detail extends Component {
forkFunc = () => {
const { platform } = this.state;
if(!platform)return;
this.setState({
forkSpin:true
})
const { current_user } = this.props
const { projectsId , owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/forks.json`;
@ -370,13 +367,8 @@ class Detail extends Component {
this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}`);
this.props.showNotification(result.data.message);
}
this.setState({
forkSpin:false
})
}).catch(error => {
this.setState({
forkSpin:false
})
console.log(error);
})
}
@ -399,13 +391,12 @@ 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 ?
<div className="color-grey-9 df">
<span>复刻自</span>
<Link to={`${type ==="Organization" ? "/organize":'/users'}/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6 ml5">{fork_info.fork_project_user_name}</Link>
<div className="color-grey-9">
<span>forked from </span>
<Link to={`/users/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6">{fork_info.fork_project_user_name}</Link>
<span> / </span>
<Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6 task-hide flex1" style={{maxWidth:"400px"}} title={fork_info.fork_form_name}>{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> : ""
}
@ -414,7 +405,7 @@ class Detail extends Component {
const { projectDetail, watchers_count, praises_count,
forked_count, firstSync , secondSync ,
isManager, watched, praised,
project , open_devops , platform , defaultBranch , bannerList , forkSpin } = this.state;
project , open_devops , platform , defaultBranch , bannerList } = this.state;
const url = this.props.history.location.pathname;
const urlArr = url.split("/");
const urlFlag = (urlArr.length === 3);
@ -434,91 +425,102 @@ class Detail extends Component {
<div>
<div className="detailHeader-wrapper">
<div className="normal">
<AlignTop style={{padding:"20px 0px 10px",justifyContent:"space-between"}}>
<div>
<AlignTop>
<div className="projectallName">
{project && project.author &&
<Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`}>{project.author.name}</Link>
}
<span className="ml5 mr5">/</span>
<Link to={`/projects/${owner}/${projectsId}`} className="projectN mt6">{projectDetail && projectDetail.name}</Link>
</div>
{ projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
</AlignTop>
<div className="mt8">
{
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
:""
}
<div className="f-wrap-between" style={{ position: "relative" }}>
<p className="font-22 df flex-1 lineH2 mt15" style={{ alignItems: "center" }}>
{project && project.author &&
<Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`} className="show-user-link">
{project.author.name}
</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 ?
<span className="color-grey-9">镜像自 <a className="color-grey-6" target="_blank" href={projectDetail.mirror_url}>{projectDetail.mirror_url}</a></span>
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>
:""
}
</div>
</div>
</span>
</p>
{
firstSync ? "":
<span className="df mt25">
{
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
}
<span className="detail_tag_btn">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={() => this.focusFunc(watched)}>
<i className={watched ? "iconfont icon-shixing color-orange font-16 mr3":"iconfont icon-kongxing color-grey-9 font-16 mr3"}></i>
<span>{watched ? '取消关注' : '关注'}</span>
</a>
{
watchers_count > 0 ?
platform ?
<Link className="detail_tag_btn_count" style={{color:`${watched?"#2878FF":"#666"}`}} to={platform?{ pathname: `/projects/${owner}/${projectsId}/watchers`, state }:""}>
{watchers_count}
</Link>
:
<span className="detail_tag_btn_count">{watchers_count}</span>
:""
}
</span>
<span className="detail_tag_btn">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={() => this.pariseFunc(praised)}>
<i className={praised ? "iconfont icon-weibiaoti105 color-orange font-14 mr3":"iconfont icon-guanzhu color-grey-9 font-14 mr3"}></i>
<span>{praised ? '取消点赞' : '点赞'}</span>
</a>
{
praises_count > 0 ?
platform ?
<Link className="detail_tag_btn_count" style={{color:`${praised?"#2878FF":"#666"}`}} to={{ pathname: `/projects/${owner}/${projectsId}/stargazers`, state }}>
{praises_count}
</Link>:
<span className="detail_tag_btn_count">{praises_count}</span>
:""
}
</span>
<span className="detail_tag_btn">
<Tooltip title="复刻是fork的中文名即复制代码仓库" placement="bottom">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={this.forkFunc}>
<i className="iconfont icon-fork color-grey-9 mr3"></i>
</a>
</Tooltip>
{
forked_count > 0 ?
platform ?
<Link className="detail_tag_btn_count" to={{ pathname: `/projects/${owner}/${projectsId}/fork_users`, state }}>
{forked_count}
</Link>
:
<span className="detail_tag_btn_count">{forked_count}</span>
:""
}
</span>
</span>
}
</div>
<FlexAJ>
<div>
{
firstSync ? "":
<span className="df">
{
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
}
<Button className="detail_tag_btn">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={() => this.focusFunc(watched)}>
<i className={watched ? "iconfont icon-shixing color-orange font-16 mr3":"iconfont icon-kongxing color-grey-9 font-16 mr3"}></i>
<span>{watched ? '取消关注' : '关注'}</span>
</a>
{
watchers_count > 0 ?
platform ?
<Link className="detail_tag_btn_count" style={{color:`${watched?"#2878FF":"#666"}`}} to={platform?{ pathname: `/projects/${owner}/${projectsId}/watchers`, state }:""}>
{watchers_count}
</Link>
:
<span className="detail_tag_btn_count">{watchers_count}</span>
:""
}
</Button>
<Button className="detail_tag_btn">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={() => this.pariseFunc(praised)}>
<i className={praised ? "iconfont icon-weibiaoti105 color-orange font-14 mr3":"iconfont icon-guanzhu color-grey-9 font-14 mr3"}></i>
<span>{praised ? '取消点赞' : '点赞'}</span>
</a>
{
praises_count > 0 ?
platform ?
<Link className="detail_tag_btn_count" style={{color:`${praised?"#2878FF":"#666"}`}} to={{ pathname: `/projects/${owner}/${projectsId}/stargazers`, state }}>
{praises_count}
</Link>:
<span className="detail_tag_btn_count">{praises_count}</span>
:""
}
</Button>
<Button className="detail_tag_btn" loading={forkSpin}>
<Tooltip title="复刻是fork的中文名即复制代码仓库" placement="bottom">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={this.forkFunc}>
<i className="iconfont icon-fork color-grey-9 mr3"></i>
</a>
</Tooltip>
{
forked_count > 0 ?
platform ?
<Link className="detail_tag_btn_count" to={{ pathname: `/projects/${owner}/${projectsId}/fork_users`, state }}>
{forked_count}
</Link>
:
<span className="detail_tag_btn_count">{forked_count}</span>
:""
}
</Button>
</span>
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
:""
}
</div>
</AlignTop>
{
projectDetail && projectDetail.invite_code &&
<Invite code={projectDetail.invite_code} />
}
</FlexAJ>
{
firstSync ? "" :
<DetailBanner

View File

@ -102,6 +102,7 @@
}
}
}
// coderDepot
.Panels{
max-width: 1200px;
@ -200,39 +201,35 @@
.listtablehead{
display: flex;
justify-content: space-between;
align-items: flex-start;
align-items: center;
border-bottom: 1px solid #d9d9d9;
padding:7px 20px;
border-radius: 4px 4px 0px 0px;
background-color: #FAFBFC;
.ellipsistxt{
margin-top: 6px;
#ptxt{
margin-bottom: 0px;
word-break: break-all;
overflow: unset;
white-space:pre-wrap; /* css3.0 */
white-space:-moz-pre-wrap; /* Firefox */
white-space:-pre-wrap; /* Opera 4-6 */
white-space:-o-pre-wrap; /* Opera 7 */
word-wrap:break-word;
}
margin-left: 13px;
line-height:18px;
flex:1;
width: 0;
color: #666;
&.hidetxt{
&>p{
word-break:break-all;
}
&.hide{
height: 18px;
overflow: hidden;
position: relative;
padding-right:8px;
&::after{
position: absolute;
right: 0px;
bottom: 0px;
content:"...";
}
}
&.hide::after{
position: absolute;
right: 0px;
bottom: 0px;
content:"...";
}
}
.ellipsis{
@ -319,7 +316,6 @@
}
}
.downMenu{
width: 330px;
box-shadow: 0px 0px 9px rgba(134, 134, 134,0.4);
background-color: #fff;
.ant-menu-vertical .ant-menu-item:hover{
@ -345,29 +341,4 @@
.ant-dropdown-menu-item.active{
background-color: #e6f7ff;
}
}
.catelogue{
border:1px solid rgb(211, 211, 211);
font-size: 15px;
font-weight: normal;
border-radius: 5px;
margin-right: 10px;
padding:0px 10px;
height: 30px;
line-height: 30px;
color: #666!important;
display: flex;
align-items: center;
span{
margin-top: 1px;
}
}
.submoduleStyle{
cursor: default;
i{
cursor: default;
}
&:hover{
color: #05101a;
}
}

View File

@ -35,10 +35,9 @@ class IndexItem extends Component {
<div className="p-r-Infos">
<div className="p-r-name">
<AlignCenter>
<Link to={`/projects/${item.author.login}/${item.identifier}`} title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
<Link to={`/projects/${item.author.login}/${item.identifier}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 490 }}>
{item.author.name}/{item.name}
</Link>
{ !item.is_public && <span className="privateTag">私有</span> }
{
item.forked_from_project_id ?
<span className="ml5">
@ -60,18 +59,8 @@ class IndexItem extends Component {
}
</AlignCenter>
<span className="p-r-tags">
{
item.praises_count && item.praises_count>0 ?
<span className="pariseTag">
<img src={img_parise} alt="" className="pariseImg" /> {item.praises_count}
</span>:""
}
{
item.forked_count && item.forked_count>0 ?
<span>
<i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork {item.forked_count}
</span>:""
}
<span className="pariseTag"><img src={img_parise} alt="" className="pariseImg" /> {item.praises_count}</span>
<span><i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork {item.forked_count}</span>
</span>
</div>
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px",lineHeight:"22px" }}>{item.description}</p>

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import "../Branch/branch.scss"
import "../Branch/branch.css"

View File

@ -264,10 +264,7 @@
border:1px solid #f1f1f1;
display: flex;
align-items: center;
margin-left: 30px;
padding:0px;
background-color: transparent;
box-shadow: none;
margin-left: 30px
}
.ant-tooltip {
max-width: fit-content!important;
@ -567,10 +564,6 @@
border-bottom: 1px solid #d9d9d9;
border-radius: 4px 4px 0px 0px;
}
.commonBox .commonBox-title.boxTitle{
display: flex;
justify-content: space-between;
}
.synchronism{
display: block;
height: 26px;

View File

@ -75,7 +75,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
</li>
:""
}
{/* {
{
item.menu_name === "resources" &&
<li className={pathname==="source" ? "active" : ""}>
<Link to={{ pathname: `/projects/${owner}/${projectsId}/source`, state }}>
@ -84,7 +84,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
{projectDetail && projectDetail.source_count ? <span className="num">{projectDetail.source_count}</span> :""}
</Link>
</li>
} */}
}
{
item.menu_name === "versions" &&
<li className={pathname==="milestones" ? "active" : ""}>

View File

@ -1,8 +1,7 @@
import React from 'react';
import { Tooltip , message } from 'antd';
import './sub.scss';
function Invite({code,className}) {
function Invite({code}) {
function jsCopy(id) {
const copyEle = document.querySelector(id); //
@ -14,14 +13,11 @@ function Invite({code,className}) {
message.success('复制成功');
}
return(
<div className={className}>
<span className="font-16 color-grey-6">邀请码</span>
<div>
<span id="devitecode">{code}</span>
<Tooltip title={<p className="edu-txt-center">可以通过邀请码邀请成员加入项目<br/>点击复制邀请码</p>} placement={"bottom"}>
<i className="iconfont icon-fuzhi2 font-16 color-blue ml8" onClick={()=>jsCopy("#devitecode")}></i>
</Tooltip>
</div>
<div>
<span>邀请码: <span id="devitecode">{code}</span></span>
<Tooltip title={<p className="edu-txt-center">可以通过邀请码邀请成员加入项目<br/>点击复制邀请码</p>} placement={"bottom"}>
<i className="iconfont icon-fuzhi2 font-16 color-blue ml8" onClick={()=>jsCopy("#devitecode")}></i>
</Tooltip>
</div>
)
}

View File

@ -53,7 +53,7 @@ function UpdateDescModal({form , visible , onCancel , onOk,desc,website,lesson_u
{getFieldDecorator("lesson_url",{
rules:[]
})(
<Input placeholder="实践课程链接" />
<Input placeholder="实践课程链接"/>
)}
</Form.Item>
</Form>

View File

@ -22,9 +22,4 @@
height: 20px;
line-height: 20px;
}
}
.detailsCode{
display: flex;
justify-content: space-between;
}

View File

@ -5,12 +5,6 @@ import { AlignCenter } from '../Component/layout';
import { getImageUrl } from "educoder";
import "./merge.css";
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
return str.replaceAll('/','%2F');
}
return str;
}
class MergeItem extends Component {
constructor(props) {
super(props);
@ -49,7 +43,7 @@ class MergeItem extends Component {
};
render() {
const { issues, project_name, project_author_name , user_admin_or_member} = this.props;
const { issues, project_name, project_author_name } = this.props;
const { projectsId , owner } = this.props.match.params;
const { current_user } = this.props;
const renderList = () => {
@ -105,43 +99,33 @@ class MergeItem extends Component {
</span>
<span className="color-grey-8">{item.pr_time}</span>
<span className="ml15">
{
item.pull_request_head &&
<Tag className="pr-branch-tag">
<Link
to={`/projects/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/tree/${turnbar(item.pull_request_head)}`}
className="maxW200px hide-1 ver-middle"
>
{item.is_original
? item.fork_project_user
: project_author_name}
:{item.pull_request_head}
</Link>
</Tag>
}
{
item.pull_request_base &&
<span className="mr8 ver-middle">
<i
className={
"iconfont icon-youjiang color-grey-c font-16"
}
></i>
</span>
}
{
item.pull_request_base &&
<Tag className="pr-branch-tag">
<Link
to={`/projects/${owner}/${projectsId}/tree/${turnbar(item.pull_request_base)}`}
className="maxW200px hide-1 ver-middle"
>
{/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */}
{project_author_name}:{item.pull_request_base}
</Link>
</Tag>
}
<Tag className="pr-branch-tag">
<Link
to={`/projects/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/tree/${item.pull_request_head}`}
className="maxW200px hide-1 ver-middle"
>
{item.is_original
? item.fork_project_user
: project_author_name}
:{item.pull_request_head}
</Link>
</Tag>
<span className="mr8 ver-middle">
<i
className={
"iconfont icon-youjiang color-grey-c font-16"
}
></i>
</span>
<Tag className="pr-branch-tag">
<Link
to={`/projects/${owner}/${projectsId}/tree/${item.pull_request_base}`}
className="maxW200px hide-1 ver-middle"
>
{/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */}
{project_author_name}:{item.pull_request_base}
</Link>
</Tag>
</span>
</AlignCenter>
</p>
@ -183,7 +167,7 @@ class MergeItem extends Component {
) : (
""
)}
{user_admin_or_member && item.pull_request_status === 0 ? (
{current_user && current_user.login ? (
<div
className="milepostleft"
style={{

View File

@ -24,12 +24,6 @@ import MergeFooter from "./merge_footer";
const Option = Select.Option;
const TextArea = Input.TextArea;
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
return str.replaceAll('/','%2F');
}
return str;
}
class MessageCount extends Component {
constructor(props) {
super(props);
@ -47,7 +41,6 @@ class MessageCount extends Component {
edit_spin: false,
pr_status: undefined,
pull_request:undefined,
conflict_files:[],
copyVisible:false,
};
@ -82,8 +75,7 @@ class MessageCount extends Component {
data: result.data,
SpinFlag: false,
pr_status: result.data.pull_request && result.data.pull_request.status,
pull_request:result.data.pull_request,
conflict_files:result.data.conflict_files
pull_request:result.data.pull_request
});
} else {
this.setState({ SpinFlag: false });
@ -110,8 +102,6 @@ class MessageCount extends Component {
isSpin: false,
pr_status: 2,
});
const { getDetail } = this.props;
getDetail && getDetail();
} else {
this.setState({
isSpin: false,
@ -148,8 +138,6 @@ class MessageCount extends Component {
SpinMerge: false,
pr_status: 1,
});
const { getDetail } = this.props;
getDetail && getDetail();
} else {
this.setState({ SpinMerge: false });
}
@ -271,28 +259,13 @@ class MessageCount extends Component {
</div>
)
}
mergeabledDesc=(base,head,conflict_files)=>{
mergeabledDesc=(base,head)=>{
return(
<div>
<ul id="descContent">
<li>git fetch origin</li>
<li>git checkout -b {`${base}`} origin/{`${base}`}</li>
<li>git merge {`${head}`}</li>
</ul>
{
conflict_files && conflict_files.length>0 &&
<div>
<p className="mt10 font-16 pt10" style={{borderTop:"1px solid #f9d7d5"}}>如下文件有代码冲突</p>
<p>
{
conflict_files.map((i,k)=>{
return <p>{i}</p>
})
}
</p>
</div>
}
</div>
<ul id="descContent">
<li>git fetch origin</li>
<li>git checkout -b {`${base}`} origin/{`${base}`}</li>
<li>git merge {`${head}`}</li>
</ul>
)
}
@ -307,8 +280,7 @@ class MessageCount extends Component {
ismesrge,
SpinFlag,
copyVisible,
pull_request,
conflict_files
pull_request
} = this.state;
const { current_user, projectDetail } = this.props;
const menu = (
@ -361,10 +333,10 @@ class MessageCount extends Component {
<div className="mt15">
<Tag className="pr-branch-tag">
<Link
to={`/projects/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
to={`/projects/${owner}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${data.pull_request.head}`}
className="ver-middle"
>
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {turnbar(data.pull_request && data.pull_request.head)}
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}:{data.pull_request.head}
</Link>
</Tag>
<span className="mr8 ver-middle">
@ -499,16 +471,17 @@ class MessageCount extends Component {
: !ismesrge ? "block" : "none",
}}
>
<Dropdown.Button
overlay={menu}
type="primary"
onClick={this.submitmerge}
className="mb15"
icon={<Icon type="caret-down" />}
disabled={!pull_request || (pull_request && !pull_request.mergeable) }
>
{this.state.mergename}
</Dropdown.Button>
<p className="mb15">
<Dropdown.Button
overlay={menu}
type="primary"
onClick={this.submitmerge}
icon={<Icon type="caret-down" />}
disabled={!pull_request || (pull_request && !pull_request.mergeable) }
>
{this.state.mergename}
</Dropdown.Button>
</p>
{pull_request && pull_request.mergeable
?
<Alert
@ -519,7 +492,7 @@ class MessageCount extends Component {
<Alert
message={this.mergeabledMes()}
type="error"
description={this.mergeabledDesc(pull_request.base,pull_request.head,conflict_files)}
description={this.mergeabledDesc(pull_request.base,pull_request.head)}
showIcon
/>
}

View File

@ -42,10 +42,9 @@ class NewMerge extends Component {
componentDidUpdate=(preProps)=>{
const { project } = this.props;
const { pull } = this.state;
let oldProject = preProps.project;
if(project && oldProject && (oldProject.id !== project.id)){
this.compareProject(this.state.id,pull,"master");
this.compareProject(this.state.id,"master","master");
}
}
// 页面销毁取消监听
@ -79,8 +78,7 @@ class NewMerge extends Component {
this.set_default_pull(result.data.branches);
this.set_default_merge(result.data.merge_projects);
}
const { pull } = this.state;
this.compareProject(result.data.id,pull||"master","master");
this.compareProject(result.data.id,"master","master");
this.setState({isSpin: false})
})
.catch((error) => {
@ -107,18 +105,6 @@ class NewMerge extends Component {
}
axios.get(url).then(result=>{
if(result){
if (result.data.status === 0) {
this.setState({
isSpin: false,
show_message: false,
});
} else {
this.setState({
isSpin: false,
show_message: true,
default_message: result.data.message,
});
}
this.setState({
comparesData:result.data
})
@ -157,7 +143,7 @@ class NewMerge extends Component {
merge:"master"
})
}
// this.ischeckmerge();
this.ischeckmerge();
}
}
@ -183,7 +169,7 @@ class NewMerge extends Component {
selectBrach = (type, value) => {
const { projectsId , owner } = this.props.match.params;
this.state[type] = value;
// this.ischeckmerge();
this.ischeckmerge();
let { id ,merge , pull } = this.state;
if(type==="pull"){
this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new/${pull}`)
@ -213,6 +199,7 @@ class NewMerge extends Component {
};
//判断2分支是否可以合并
ischeckmerge = () => {
this.setState({ isSpin: true });
const { projectsId , owner } = this.props.match.params;

View File

@ -38,7 +38,7 @@ class merge extends Component {
// page: 1,
search_count: undefined,
issue_type: undefined,
status_type: "1",
status_type: undefined,
//设置选择高亮
openselect: 1,
closeselect: undefined,
@ -48,7 +48,7 @@ class merge extends Component {
paix: "排序",
priority_ids: "优先级",
select_params: {
status_type: "1", //开启中和关闭中,默认为开启中的
status_type: undefined, //开启中和关闭中,默认为开启中的
assigned_to_id: undefined, // 指派人
fixed_version_id: undefined,
priority_id: undefined,
@ -155,14 +155,18 @@ class merge extends Component {
renderMenu = (array, name, id) => {
return (
<Menu className="orderCondition">
<Menu>
<Menu.Item key={"all"} onClick={(e) => this.getOption(e, id, name)}>
{name}
</Menu.Item>
{array && array.length > 0 && array.map((item, key) => {
{array &&
array.length > 0 &&
array.map((item, key) => {
return (
((!item.permission) || (item.permission && item.permission !== "Reporter")) &&
<Menu.Item key={item.id} onClick={(e) => this.getOption(e, id, item.name)}>
<Menu.Item
key={item.id}
onClick={(e) => this.getOption(e, id, item.name)}
>
{item.name}
</Menu.Item>
);
@ -203,16 +207,23 @@ class merge extends Component {
paix: "排序",
priority_ids: "优先级",
});
this.state.select_params.status_type = type;
this.state.select_params.page=1;
this.state.select_params.limit=15;
this.state.select_params = {
status_type: type,
search: undefined,
page: 1,
limit: 15,
};
this.getIssueList();
};
checkOperation() {
islogin() {
const { projectsId,owner } = this.props.match.params;
this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new`);
if (this.props.checkIfLogin() === false) {
this.props.showLoginDialog();
return;
} else {
this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new`);
}
}
render() {
const { projectsId , owner } = this.props.match.params;
@ -254,12 +265,9 @@ class merge extends Component {
style={{ width: 300 }}
/>
</div>
{
data && data.user_admin_or_member &&
<a className="topWrapper_btn ml10" onClick={() => this.checkOperation()}>
+&nbsp;新建合并请求
</a>
}
<a className="topWrapper_btn ml10" onClick={() => this.islogin()}>
+&nbsp;新建合并请求
</a>
</div>
<div className="f-wrap-between screenWrap">
<div className="df">
@ -396,7 +404,6 @@ class merge extends Component {
project_author_name={data.project_author_name}
{...this.props}
{...this.state}
user_admin_or_member={data && data.user_admin_or_member}
></OrderItem>
</div>
):""}

View File

@ -264,7 +264,7 @@ class MergeForm extends Component {
},
],
initialValue: title,
})(<Input placeholder="标题" maxLength={50} />)}
})(<Input placeholder="标题" />)}
</Form.Item>
<MDEditor
placeholder={"请输入合并请求的描述..."}
@ -346,21 +346,19 @@ class MergeForm extends Component {
</Select>
)}
</Form.Item>
{/* <Form.Item label="">
{getFieldDecorator("checkbox-group")(
<Checkbox.Group>
<div>
<Checkbox value="A">必须审查代码</Checkbox>
</div>
<div>
<Checkbox value="B">合并后删除提交分支</Checkbox>
</div>
<div>
<Checkbox value="C">合并后关闭提到的任务</Checkbox>
</div>
</Checkbox.Group>
)}
</Form.Item> */}
<Form.Item name="checkbox-group" label="其他">
<Checkbox.Group>
<div>
<Checkbox value="A">必须审查代码</Checkbox>
</div>
<div>
<Checkbox value="B">合并后删除提交分支</Checkbox>
</div>
<div>
<Checkbox value="C">合并后关闭提到的任务</Checkbox>
</div>
</Checkbox.Group>
</Form.Item>
</div>
</div>
</div>

View File

@ -68,30 +68,24 @@ class Index extends Component {
getOwner=()=>{
const { OIdentifier } = this.props.match.params;
const { user_id } = this.props && this.props.current_user;
const url = `/owners.json`;
axios.get(url).then(result=>{
if(result && result.data){
let owner = result.data.owners;
this.setState({
OwnerList: owner,
})
if(OIdentifier){
owner = owner.filter(item=>item.name === OIdentifier);
this.props.form.setFieldsValue({
user_id:OIdentifier
})
}else if(user_id){
owner = owner.filter(item=>item.id === user_id);
this.props.form.setFieldsValue({
user_id:owner && owner[0].name
owner && this.setState({
owners_id:owner[0].id,
owners_name:owner[0].name
})
}
owner && this.setState({
owners_id:owner[0].id,
owners_name:owner[0].name
})
this.setOptionsList(owner, 'owners');
this.setState({
OwnerList: owner,
})
}
}).catch(error=>{})
}
@ -181,12 +175,14 @@ class Index extends Component {
ignore_id,
user_id:owners_id
}).then((result) => {
if (result && result.data.id) {
this.setState({
isSpin: false
})
this.props.showNotification(`${projectsType && projectsType === "mirror" ? "镜像" : "托管"}项目创建成功!`);
this.props.history.push(`/projects/${result.data.login}/${result.data.identifier}`);
if (result) {
if (result.data.id) {
this.setState({
isSpin: false
})
this.props.showNotification(`${projectsType && projectsType === "mirror" ? "镜像" : "托管"}项目创建成功!`);
this.props.history.push(`/projects/${owners_name}/${result.data.identifier}`);
}
}
}).catch((error) => {
this.setState({

View File

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

View File

@ -6,20 +6,6 @@ import "./index.css";
import axios from "axios";
const TextArea = Input.TextArea;
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
return str.replaceAll('/','%2F');
}
return str;
}
function returnbar(str){
if(str && str.length>0 && str.indexOf("%2F")>-1){
return str.replaceAll('%2F','/');
}
return str;
}
class UserSubmitComponent extends Component {
constructor(props) {
super(props);
@ -30,24 +16,6 @@ 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,
@ -73,7 +41,7 @@ class UserSubmitComponent extends Component {
const url = `/${owner}/${projectsId}/create_file.json`;
axios.post(url, {
filepath: filename ? filename : path,
branch: returnbar(branch),
branch: branch,
new_branch: submitType === "1" ? values.branchname : undefined,
content,
message: values.desc,
@ -86,7 +54,7 @@ class UserSubmitComponent extends Component {
const { getTopCount } = this.props;
getTopCount && getTopCount(values.branchname);
}
let url = `/projects/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`;
let url = `/projects/${owner}/${projectsId}${values.branchname ? `/tree/${values.branchname}`: (branch ? `/tree/${branch}` : "")}`;
this.props.history.push(url);
}
})
@ -107,13 +75,12 @@ class UserSubmitComponent extends Component {
const { projectsId , owner } = this.props.match.params;
const { submitType } = this.state;
const url = `/${owner}/${projectsId}/update_file.json`;
let b = currentBranch || branch;
this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) {
axios
.put(url, {
filepath: detail.path,
branch: submitType === "1" ? undefined : returnbar(b),
branch: submitType === "1" ? undefined : (currentBranch || branch),
new_branch: submitType === "1" ? values.branchname : undefined,
content: content,
sha: detail.sha,
@ -122,8 +89,7 @@ class UserSubmitComponent extends Component {
.then((result) => {
this.setState({ isSpin: false });
if (result.data && result.data.status === 1) {
let b = currentBranch || branch;
let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}`;
let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/tree/${values.branchname}` : ((currentBranch || branch) ? `/tree/${currentBranch || branch}`:""))}`;
this.props.history.push(url);
this.props.showNotification("文件修改成功!");
}
@ -146,7 +112,6 @@ class UserSubmitComponent extends Component {
const { current_user, filepath, projectDetail , currentBranch } = this.props;
const { editor_type } = this.props;
let b = currentBranch || branch;
return (
<div>
<span className="df" style={{ alignItems: "center" }}>
@ -205,7 +170,7 @@ class UserSubmitComponent extends Component {
>
<Radio value="0" className="mb10">
<i className="iconfont icon-banbenku font-16 mr5"></i>
直接提交至<span className="color-orange">{returnbar(b)}</span>
直接提交至<span className="color-orange">{currentBranch || branch}</span>
</Radio>
<Radio value="1">
<Icon type="pull-request" className="mr5" />

View File

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

View File

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

View File

@ -70,9 +70,9 @@ function Index(props){
function deleteEvent(type,count) {
let c = count;
if(type==="apply"){
setTransferCount(transferCount-count);
}else if(type==="undo"){
setApplyCount(applyCount-count);
}else if(type==="undo"){
setTransferCount(applyCount-count);
}else{
setMessagesCount(0);
c = messagesCount;

View File

@ -53,7 +53,7 @@ function UndoEvent(props){
Axios.post(url).then(result=>{
if(result && result.data){
getList();
props && props.deleteEvent("apply",1);
props && props.deleteEvent("undo",1);
}
}).catch(error=>{})
}

View File

@ -249,7 +249,7 @@ class Detail extends Component {
添加于 {data && data.created_at}
</span>
{data && data.user_permission ? (
<span className="pull-right 123123">
<span className="pull-right">
<a className="color-blue fr" onClick={this.copydetail}>
复制
</a>

View File

@ -89,9 +89,8 @@ 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');
const { getDetail } = this.props;
getDetail && getDetail();
this.getList(1, status, 'desc')
}
}).catch(error => {
console.log(error);
@ -108,9 +107,7 @@ class Milepost extends Component {
}
}).then((result) => {
if (result) {
this.getList(1, this.state.status, 'desc');
const { getDetail } = this.props;
getDetail && getDetail();
this.getList(1, this.state.status, 'desc')
}
}).catch((error) => {
console.log(error);
@ -153,11 +150,11 @@ class Milepost extends Component {
const { data, limit, page, openselect, closeselect, spinings } = this.state;
const { projectsId , owner } = this.props.match.params;
const menu = (
<Menu className="orderCondition" onClick={this.arrayList}>
<Menu.Item key={'effective_date'} value="desc">到期日从后到先</Menu.Item>
<Menu.Item key={'effective_date'} value="asc">到期日从先到后</Menu.Item>
<Menu.Item key={'percent'} value="asc">完成度从低到高</Menu.Item>
<Menu.Item key={'percent'} value="desc">完成度从高到低</Menu.Item>
<Menu onClick={this.arrayList}>
<Menu.Item key={'created_on'} value="desc">到期日从近到远</Menu.Item>
<Menu.Item key={'created_on'} value="asc">到期日从远到近</Menu.Item>
<Menu.Item key={'percent'} value="desc">完成度从低到高</Menu.Item>
<Menu.Item key={'percent'} value="asc">完成度从高到低</Menu.Item>
<Menu.Item key={'issues_count'} value="desc">任务从多到少</Menu.Item>
<Menu.Item key={'issues_count'} value="asc">任务从少到多</Menu.Item>
</Menu>
@ -231,8 +228,8 @@ class Milepost extends Component {
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
</div>
<div className="grid-item ml15 color-grey-9">
<i className={item.status === "closed" ? "iconfont icon-gouxuan font-14 mr5":"iconfont icon-yiguanbi1 font-14 mr5"}></i>
<a onClick={() => this.updatestatusemile(item.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
<i className="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>
</div>
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-lajitong font-14 mr5" ></i>

View File

@ -69,27 +69,6 @@ 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;
@ -162,7 +141,7 @@ class MilepostDetail extends Component {
renderMenu = (array, name, id) => {
return (
<Menu className="orderCondition">
<Menu>
<Menu.Item key={"all"} onClick={(e) => this.getOption(e, id, name)}>{name}</Menu.Item>
{
array && array.length > 0 && array.map((item, key) => {
@ -296,15 +275,7 @@ class MilepostDetail extends Component {
:
issues && issues.length>0 && issues.map((item,key)=>{
return(
<OrderItem
key={key} mile
item={item}
search_count={search_count}
page={page}
limit={limit}
{...this.props} {...this.state}
deletedetail={this.deletedetail}
></OrderItem>
<OrderItem key={key} mile item={item} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state}></OrderItem>
)
})
}

View File

@ -42,9 +42,10 @@ class OrderItem extends Component {
})
}
render() {
const { item , checkbox , mile , user_admin_or_member } = this.props;
const { item , checkbox , mile } = this.props;
const { projectsId , owner } = this.props.match.params;
const { current_user } = this.props;
const { current_user } = this.props
return (
item &&
<div className="issueItem">
@ -90,13 +91,13 @@ class OrderItem extends Component {
<div className="milepostleft">
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link>
{
user_admin_or_member ?
<div id="hoverBox" style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}>
current_user && current_user.login ?
<div style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}>
<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>
</div>
<div className="color-grey-9">
<Popconfirm placement="bottom" overlayClassName="overlayBox" getPopupContainer={()=>document.getElementById("hoverBox")} title={'您确定要删除当前易修'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
<Popconfirm placement="bottom" title={'您确定要删除吗'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
<i className="iconfont icon-yiguanbi1 font-14"></i>
</Popconfirm>
</div>

View File

@ -180,8 +180,8 @@ class UpdateMilepost extends Component {
<Row type="flex" justify="space-between">
<Col>
<Group size="small" onChange={e => onTypeChange(e.target.value)} value={type}>
<Button value="month">日期</Button>
<Button value="year"></Button>
<Button value="month">月份</Button>
<Button value="year"></Button>
</Group>
</Col>
<Col>

View File

@ -64,8 +64,6 @@ 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 })
@ -102,7 +100,7 @@ class NewMilepost extends Component {
required: true, message: '请输入标题'
}],
})(
<Input placeholder="标题" autoComplete="off" maxLength="30" />
<Input placeholder="标题" autoComplete="off"/>
)}
</Form.Item>
</div>
@ -113,7 +111,7 @@ class NewMilepost extends Component {
required: true, message: '请输入描述内容'
}],
})(
<TextArea placeholder="请输入描述内容..." style={{ height: "150px" }} maxLength={500} />
<TextArea placeholder="请输入描述内容..." style={{ height: "150px" }} />
)}
</Form.Item>

View File

@ -17,9 +17,7 @@
line-height: 18px;
color: red;
}
.overlayBox{
width: 230px;
}
.topmilepost {
box-sizing: border-box;
display: flex;
@ -592,7 +590,7 @@ a.issue-type-button.active:hover {
}
/* 发布人、指派人数量过多时要出现滚动条 */
.ant-dropdown-menu.orderCondition {
.ant-dropdown-menu {
max-height: 350px;
overflow-y: auto;
}

View File

@ -201,7 +201,7 @@ class order extends Component {
renderMenu = (array, name, id, toGet) => {
return (
<Menu className="orderCondition">
<Menu>
<Menu.Item key={"all"} onClick={(e) => this.getOption(e, id, name, toGet)}>
{name}
</Menu.Item>
@ -268,8 +268,11 @@ class order extends Component {
checkedValue:[],
all:undefined
});
this.state.select_params.page = 1;
this.state.select_params.limit = 15;
this.state.select_params = {
search: undefined,
page: 1,
limit: 15,
};
this.getIssueList(type);
};
@ -334,8 +337,6 @@ class order extends Component {
const { status_type } = this.state;
this.getIssueList(status_type);
const { getDetail } = this.props;
getDetail && getDetail();
}
})
.catch((error) => {
@ -347,14 +348,17 @@ class order extends Component {
this.props.showLoginDialog();
}
renderNew =()=>{
const { data } = this.state;
if(data && data.user_admin_or_member){
const { projectsId , owner } = this.props.match.params;
const { projectsId , owner } = this.props.match.params;
if (this.props.checkIfLogin()) {
return(
<Link className="topWrapper_btn ml10" target="_blank" to={`/projects/${owner}/${projectsId}/issues/new`}>
+&nbsp;创建易修
</Link>
)
}else{
return(
<a className="topWrapper_btn ml10" onClick={this.islogin}>+&nbsp;创建易修</a>
)
}
}
@ -573,7 +577,7 @@ class order extends Component {
<div className="f-wrap-between screenWrap">
<div className="df">
{
((current_user && current_user.login) && (data && data.user_admin_or_member)) ?
current_user && current_user.login ?
<Checkbox value="0" style={{ lineHeight: "50px", marginRight: "15px" }} checked={all} onChange={this.changeAll}></Checkbox>
: ""
}
@ -818,14 +822,13 @@ class order extends Component {
<OrderItem
key={key}
item={item}
checkbox={current_user &&(data && data.user_admin_or_member) ? <Checkbox value={item.id} key={item.id} style={{ margin: '4px 15px 0px 0px' }}></Checkbox> : ""}
checkbox={current_user ? <Checkbox value={item.id} key={item.id} style={{ margin: '4px 15px 0px 0px' }}></Checkbox> : ""}
search_count={search_count}
page={select_params.page}
limit={select_params.limit}
{...this.props}
{...this.state}
deletedetail={this.deletedetail}
user_admin_or_member={data && data.user_admin_or_member}
></OrderItem>
)
})}

View File

@ -92,10 +92,10 @@ class order_form extends Component {
const url = `/${owner}/${projectsId}/issues/new.json`;
axios.get(url).then((result) => {
if (result && result.data) {
if (result) {
this.setState({
issue_chosen: result.data.issue_chosen,
branches: result.data.issue_chosen.branches,
branches: result.data.branches,
isSpin:false
});
@ -193,14 +193,13 @@ 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);
});
}
}

View File

@ -1,68 +0,0 @@
import React from "react";
import { Route, Switch } from "react-router-dom";
import { withRouter } from "react-router";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
import Loadable from "react-loadable";
import Loading from "../../Loading";
import { Box , Gap , LongWidth } from '../Component/layout';
import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
import './Index.scss';
const SSHNew = Loadable({
loader: () => import("./sub/New"),
loading: Loading,
});
const SSHIndex = Loadable({
loader: () => import("./sub/SSH"),
loading: Loading,
});
function Index(props){
const { current_user } = props;
const { pathname } = props.location;
return(
<div className="newMain clearfix whiteBack">
<div className="boies">
<Box>
<div className="shortW">
<div className="userDetail">
<img src={getImageUrl(`/${current_user && current_user.image_url}`)} alt=""/>
<span>{current_user && current_user.username}</span>
</div>
<ul className="securityUl">
<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>
</div>
<LongWidth>
<Gap>
<Switch>
<Route
path="/settings/SSH/new"
render={(p) => (
<SSHNew {...props} {...p}/>
)}
></Route>
<Route
path="/settings/SSH"
render={(p) => (
<SSHIndex {...props} {...p}/>
)}
></Route>
</Switch>
</Gap>
</LongWidth>
</Box>
</div>
</div>
)
}
export default withRouter((CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index))))
);

View File

@ -1,192 +0,0 @@
.whiteBack{
background-color: #fff;
.boies{
width: 1200px;
margin:0px auto;
padding:30px 0px 10px;
.shortW{
width: 198px;
border: 1px solid rgba(153, 153, 153, 0.22);
border-radius: 4px;
min-height: 400px;
margin-bottom: 30px;
.userDetail{
background: rgba(153, 153, 153, 0.05);
border-radius: 4px 4px 0px 0px;
padding:20px 25px;
display: flex;
align-items: center;
justify-content: flex-start;
img{
height: 48px;
width: 48px;
border-radius: 50%;
margin-right: 12px;
}
span{
font-size: 16px;
color: #333;
max-width: 90px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.securityUl{
padding:20px 16px;
color: #333;
li{
margin-bottom: 10px;
height: 27px;
line-height: 27px;
position: relative;
cursor: pointer;
a{
color: #666;
&:hover{
color: #333;
}
}
&.active a{
color: #333;
}
&:first-child{
font-size: 16px;
}
&.active::before{
position: absolute;
left: -16px;
top:0px;
height: 100%;
width: 2px;
content: "";
background-color: #2A61FF;
}
}
}
}
.sshHead{
display: flex;
align-items: center;
padding:15px 20px;
justify-content: space-between;
border-bottom: 1px solid #EEEEEE;
&>span{
font-size: 18px;
}
}
.ant-list-item{
padding:20px;
border-bottom: 1px solid #eee!important;
&>img{
margin-right: 24px;
}
&>div{
flex:1;
width: 0;
margin-right: 20px;
p{
margin-bottom: 8px!important;
}
span{
font-size: 12px;
}
}
.ant-btn.ant-btn-danger{
background-color: #fff;
border-color: #D0D0D0;
color: #DF0002;
&:hover{
background-color: #DF0002;
color: #fff;
border-color: #DF0002;
}
}
}
.questionLink{
padding:15px 20px;
a{
color: #4B7AFF;
&:hover{
text-decoration: underline;
}
}
}
.sshForm{
padding:15px 20px;
.ant-col.ant-form-item-label{
font-size: 16px;
color:#333;
}
}
}
}
.deleteBox{
.ant-modal-header{
background-color: rgba(223, 0, 2, 0.06);
border-bottom: none;
.ant-modal-title{
text-align: left;
font-size: 20px;
}
}
.ant-modal-body{
padding:30px 50px;
p{
font-size: 16px;
line-height: 26px;
color:#666
}
.desc{
.descMain{
align-items: center;
justify-content: center;
font-size: 20px;
margin-bottom: 10px;
i{
font-size: 38px!important;
color:#DF0002
}
}
}
}
.ant-modal-footer{
border-top: none;
text-align: center;
padding-bottom: 40px;
button{
width: 120px;
margin:0px 20px;
&.ant-btn-danger{
background-color: #fff;
color: #DF0002;
border-color: #D0D0D0;
}
}
}
}
.descModal{
.ant-modal-title{
text-align: left;
font-size: 20px;
}
.keyContent{
border:1px solid #eee;
border-radius: 4px;
padding:10px 15px;
margin-top: 10px;
max-height: 200px;
overflow-y: auto;
}
.keysTitle{
display: flex;
align-items: flex-start;
justify-content: flex-start;
flex-wrap: wrap;
span:last-child{
word-break: break-all;
flex:1;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 900 B

View File

@ -1,28 +0,0 @@
import React from 'react';
import { AlignCenter } from '../../Component/layout';
import { Modal , Button } from 'antd';
function DeleteBox({ visible , onCancel ,onSuccess }) {
return(
<Modal
visible={visible}
onCancel={onCancel}
title="删除SSH密钥"
width="600px"
className="deleteBox"
footer={
<div>
<Button size={'large'} onClick={onCancel}>取消</Button>
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
</div>
}
>
<div className="desc">
<AlignCenter className="descMain"><i className="iconfont icon-jinggao1 mr10"></i>您确定要删除此 SSH 密钥吗</AlignCenter>
<p>此操作将永久删除该SSH密钥且不可恢复如果您想再次使用该密钥则需要您重新上传</p>
</div>
</Modal>
)
}
export default DeleteBox;

View File

@ -1,59 +0,0 @@
import React , { forwardRef, useState } from 'react';
import { Link } from 'react-router-dom';
import { Button, Form , Input } from 'antd';
import Axios from 'axios';
const { TextArea } = Input;
function New({ form , showNotification , history }) {
const { getFieldDecorator, validateFields , setFieldsValue } = form;
const [ msg , setMsg ] = useState(undefined);
function submit() {
validateFields((error,values)=>{
if(!error){
const url = `/public_keys.json`;
Axios.post(url,{
...values
}).then(result=>{
if(result){
if(result.data.status === 0){
history.push(`/settings/SSH`);
showNotification("密钥创建成功!");
}
let s = {
status:result.data.status,
message:result.data.message
}
setMsg(s);
}
}).catch(error=>{})
}
})
}
return(
<div>
<div className="sshHead">
<span><Link to={`/settings/SSH`} className="color-blue">SSH密钥</Link><i className="iconfont icon-youjiantou ml5 mr5 font-12"></i>添加SSH密钥</span>
</div>
<Form className="sshForm">
<Form.Item label="标题" validateStatus={msg && msg.status === 10001 ? "error":undefined} help={msg && msg.status === 10001 ? msg.message:undefined}>
{getFieldDecorator("title",{
rules:[{required:true,message:"请输入密钥标题"}]
})(
<Input placeholder="请输入密钥标题" size="large" maxLength="200"/>
)}
</Form.Item>
<Form.Item label="密钥" validateStatus={msg && msg.status === 10002 ? "error":undefined} help={msg && msg.status === 10002 ? msg.message:undefined}>
{getFieldDecorator("key",{
rules:[{required:true,message:"请输入密钥"}]
})(
<TextArea placeholder="支持以'ssh-rsa','ssh-dss','ssh-ed25519','ecdsa-sha2-nistp256','ecdsa-sha2-nistp384','ecdsa-sha2-nistp521'开头" autoSize={{ minRows: 6, maxRows: 6 }}/>
)}
</Form.Item>
<Button type="primary" style={{width:"100px"}} onClick={submit}>确定</Button>
</Form>
</div>
)
}
export default Form.create()(forwardRef(New));

View File

@ -1,96 +0,0 @@
import React, { useState , useEffect } from 'react';
import { Button , List , Pagination , Skeleton } from 'antd';
import miyao from '../img/miyao_middle_icon.png';
import axios from 'axios';
import DeleteBox from './DeleteBox';
import SSHDetail from './SSHDetail';
const limit = 10;
function SSH(props) {
const [ list ,setList ] = useState(undefined);
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(0);
const [ id , setId ] = useState(undefined);
const [ visible , setVisible ] = useState(false);
const [ visibleDesc , setVisibleDesc ] = useState(false);
const [ content , setContent ] = useState(undefined);
useEffect(()=>{
Init();
},[page])
function Init() {
const url = `/public_keys.json`;
axios.get(url,{
params:{
page,limit
}
}).then(result=>{
if(result && result.data){
setList(result.data.public_keys);
setTotal(result.data.total_count);
}
}).catch(error=>{})
}
function onSuccess() {
if(id){
const url = `/public_keys/${id}.json`;
axios.delete(url).then(result=>{
if(result && result.data){
props.showNotification("密钥删除成功!");
setVisible(false);
if(page>1 && (list && list.length===1)){
setPage(page-1);
}else{
Init();
}
}
}).catch(error=>{})
}
}
return(
<div>
<DeleteBox visible={visible} onCancel={()=>setVisible(false)} onSuccess={onSuccess}/>
<SSHDetail visible={visibleDesc} onCancel={()=>setVisibleDesc(false)} desc={content}/>
<div className="sshHead">
<span>SSH密钥</span>
<Button type="primary" size="large" onClick={()=>props.history.push('/settings/SSH/new')}>添加SSH密钥</Button>
</div>
{
list && list.length > 0 &&
<List>
{
list.map((i,k)=>{
return(
<List.Item>
<img src={miyao} alt=""/>
<div>
<p className="color-grey-3"><a className="task-hide" style={{display:"block",fontWeight:"500"}} onClick={()=>{setContent(i);setVisibleDesc(true)}}>{i.name}</a></p>
<p className="task-hide color-grey-6">{i.fingerprint}</p>
<span className="color-grey-6">添加时间{i.created_time}</span>
</div>
<Button type="danger" onClick={()=>{setId(i.id);setVisible(true)}}>删除</Button>
</List.Item>
)
})
}
</List>
}
{
!list && <Skeleton />
}
{
total > limit &&
<div className="edu-txt-center mt15">
<Pagination simple current={page} onChange={(p)=>{setPage(p)}} pageSize={limit} total={total}/>
</div>
}
{ (!list || (list && list.length === 0)) && <p className="mt30 pl20">您还没有添加任何SSH密钥</p> }
<p className="questionLink"><a href={`https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent`} target="_blank">如何生成SSH密钥</a></p>
</div>
)
}
export default SSH;

View File

@ -1,31 +0,0 @@
import React from 'react';
import { Button, Modal } from 'antd';
function SSHDetail({visible , onCancel , desc }) {
return(
<Modal
visible={visible}
onCancel={onCancel}
title={"SSH密钥详情"}
width="600px"
footer={null}
className={"descModal"}
>
<div>
<p className="color-grey-3 font-16 keysTitle">
<span style={{fontWeight:"600"}}>SSH Key</span>
<span>{desc && desc.name}</span>
</p>
<p className="mt5">添加时间{desc && desc.created_time}</p>
<p className="color-grey-3 mt30 keysTitle mb15">
<span style={{fontWeight:"600"}}>公钥指纹</span>
<span>{desc && desc.fingerprint}</span>
</p>
<div className="keyContent">{desc && desc.content}</div>
<div className="edu-txt-center mt30 mb20"><Button type={"primary"} size="large" style={{width:"100px"}} onClick={onCancel}>关闭</Button></div>
</div>
</Modal>
)
}
export default SSHDetail;

View File

@ -23,7 +23,6 @@ export default ((props)=>{
const [ page , setPage ] = useState(1);
let defaultBranch = props.defaultBranch;
useEffect(()=>{
if(defaultBranch){
setBranch(defaultBranch);
@ -77,8 +76,6 @@ export default ((props)=>{
.then((result) => {
if (result) {
props.showNotification(`分支设置成功!`);
const { getDetail } = props;
getDetail && getDetail();
}
})
.catch((error) => {
@ -98,7 +95,7 @@ export default ((props)=>{
return(
<WhiteBack>
<Title><span className="font-18">分支设置</span></Title>
<Title>分支设置</Title>
<Div>
<div className="pb20" style={{borderBottom:"1px dashed #eee"}}>
<p className="color-grey-3 mb10 font-18">默认分支</p>

View File

@ -58,12 +58,8 @@ function CollaboratorMember({projectsId,owner,project_id,author,showNotification
})
.then((result) => {
if (result) {
if(page > 1 && ( listData && listData.length === 1)){
setPage(page-1);
}else{
setListData(result.data.members);
setTotal(result.data.total_count);
}
setListData(result.data.members);
setTotal(result.data.total_count);
setIsSpin(false);
}
})

View File

@ -20,14 +20,6 @@ const Setting = Loadable({
loader: () => import("./Setting"),
loading: Loading,
});
const WebhookNew = Loadable({
loader: () => import("./Webhooks/New"),
loading: Loading,
});
const Webhook = Loadable({
loader: () => import("./Webhooks/Index"),
loading: Loading,
});
const Collaborator = Loadable({
loader: () => import("./Collaborator"),
loading: Loading,
@ -73,18 +65,6 @@ class Index extends Component {
</Link>
</p>
</li>
<li
className={
pathname.indexOf("setting/webhooks") > -1 ? "active" : ""
}
>
<p>
<Link to={`/projects/${owner}/${projectsId}/setting/webhooks`} className="w-100">
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
Webhooks
</Link>
</p>
</li>
<li
className={
pathname.indexOf("setting/branch") > -1 ? "active" : ""
@ -123,27 +103,8 @@ class Index extends Component {
</ul>
</Short>
<Long>
<Gap>
<Gap className="list-r-Info">
<Switch {...this.props}>
{/* webhooks */}
<Route
path="/projects/:owner/:projectsId/setting/webhooks/new"
render={(props) => (
<WebhookNew {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:owner/:projectsId/setting/webhooks/:id"
render={(props) => (
<WebhookNew {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:owner/:projectsId/setting/webhooks"
render={(props) => (
<Webhook {...this.props} {...props} {...this.state} />
)}
></Route>
{/* 协作者 */}
<Route
path="/projects/:owner/:projectsId/setting/collaborator"

View File

@ -15,7 +15,7 @@ const menu = [
{name:"易修 (Issue)",index:"issues"},
{name:"合并请求",index:"pulls"},
{name:"工作流(beta版)",index:"devops"},
// {name:"资源库",index:"resources"},
{name:"资源库",index:"resources"},
{name:"里程碑",index:"versions"},
{name:"动态",index:"activity"},
]
@ -30,15 +30,13 @@ class Setting extends Component {
project_units:['home',"activity","code"],
divertVisible:false,
is_transfering:undefined,
projectName:undefined
};
}
componentDidUpdate=(prevPros)=>{
if(prevPros && this.props && !this.props.checkIfLogin()){
this.props.history.push("/403")
return;
return
}
}
componentDidMount = () => {
@ -77,7 +75,6 @@ class Setting extends Component {
project_units:units
});
this.setState({
projectName:result.data.project_name,
private_check: result.data.private,
loading:false,
project_units:units,
@ -172,11 +169,10 @@ class Setting extends Component {
// 删除本仓库
deleteProject = () => {
const { projectsId , owner } = this.props.match.params;
const { projectName } = this.state;
this.props.confirm({
content: <span style={{display:"block",textAlign:"left"}}>该操作无法撤销且将会一并删除相关的易修合并请求工作流里程碑动态等数据<br/>是否确认删除 <span style={{fontWeight:"bold"}}>{owner}/{projectName}({projectsId})</span></span>,
content: "删除后无法恢复,是否确认删除本仓库?",
onOk: () => {
const { projectsId , owner } = this.props.match.params;
const url = `/${owner}/${projectsId}.json`;
axios
.delete(url)
@ -237,7 +233,6 @@ class Setting extends Component {
const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state;
let mirror = projectDetail && projectDetail.mirror;
let type = projectDetail && projectDetail.type;
const forked_from_project_id = this.props && this.props.projectDetail && this.props.projectDetail.forked_from_project_id;
return (
<div>
<DivertModal
@ -270,12 +265,8 @@ class Setting extends Component {
<Checkbox
checked={private_check}
onChange={this.changePrivate}
disabled={forked_from_project_id}
>
<span className="color-grey-9">将仓库设为私有</span>
<span className="color-grey-6">
{ forked_from_project_id ?`Fork仓库的可见性实时同步自源仓库不支持直接修改`:`修改仓库的可见性将会影响到该仓库下所有Fork仓库的可见性`}
</span>
将仓库设为私有
</Checkbox>
)}
</Form.Item>

View File

@ -1,113 +0,0 @@
import React, { useEffect, useState } from 'react';
import { Banner , FlexAJ } from '../../Component/layout';
import DeleteBox from '../../Component/DeleteModal/Index';
import './Index.scss';
import { Button , List, Pagination } from 'antd';
import { Link } from 'react-router-dom';
import axios from 'axios';
const limit = 15;
function Index(props) {
const [ data , setData ] = useState(undefined);
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(1);
const [ deleteId , setDeleteId ] = useState(undefined);
const [ visible , setVisible ] = useState(false);
const [ url , setUrl ] = useState(undefined);
const { owner , projectsId } = props.match.params;
useEffect(()=>{
if(owner && projectsId){
getData();
}
},[owner,projectsId,page])
function getData() {
const url = `/${owner}/${projectsId}/webhooks.json`;
axios.get(url,{
params:{page,limit}
}).then(result=>{
if(result && result.data){
setData(result.data.webhooks);
setTotal(result.data.total_count);
}
}).catch(error=>{})
}
function deleteFunc(id,url) {
setDeleteId(id);
setUrl(url);
setVisible(true);
}
function onSuccess() {
if(deleteId){
const url = `/${owner}/${projectsId}/webhooks/${deleteId}.json`;
axios.delete(url).then(result=>{
if(result){
props.showNotification("webhook删除成功");
if(page>1 && data.length === 1){
setPage(page-1);
}else{
getData();
}
setVisible(false);
}
}).catch(error=>{})
}
}
function addFunc() {
if(total >= 20){
return props.showNotification("webhooks数量已到上限请删除暂不使用的webhooks以进行添加操作");
}
props.history.push(`/projects/${owner}/${projectsId}/setting/webhooks/new`)
}
return(
<div>
<DeleteBox
visible={visible}
onCancel={()=>setVisible(false)}
onSuccess={onSuccess}
title="删除Webhook"
content="您确定要删除此Webhook吗"
subTitle={`删除后未来事件将不会推送至此Webhook地址${url}`}
/>
<Banner>
<FlexAJ>
<span>Webhooks</span>
<Button type="primary" size="large" onClick={addFunc}>添加Webhook</Button>
</FlexAJ>
</Banner>
<div className="hookpanel">
<p className="color-grey-3">每当特定事件如push代码合并请求被编辑发生时我们将通过webhook给您提供的远程URL发送post请求您可以在我们的<a className="color-blue hoverLine" target="_blank" href="https://forum.trustie.net/forums/3408/detail">webhooks指南</a>中了解更多信息</p>
{
data && data.length> 0 &&
<List>
{data.map((i,k)=>{
return(
<List.Item key={k}>
<i className="iconfont icon-a-xuanzhongwebhookicon color-grey-d mr12 font-17"></i>
<Link to={`/projects/${owner}/${projectsId}/setting/webhooks/${i.id}`} className="webName">{i.url}</Link>
<span>
<Button ghost type={"primary"} onClick={()=>{props.history.push(`/projects/${owner}/${projectsId}/setting/webhooks/${i.id}`)}}>编辑</Button>
<Button ghost className="ml20" type="danger" onClick={()=>{deleteFunc(i.id,i.url)}}>删除</Button>
</span>
</List.Item>
)
})}
</List>
}
{
total > limit &&
<div className="edu-txt-center mt20 mb20">
<Pagination current={page} total={total} onChange={e=>{setPage(e)}} pageSize={limit}/>
</div>
}
</div>
</div>
)
}
export default Index;

View File

@ -1,171 +0,0 @@
.hookpanel{
&>p{
padding:20px 25px 0px 20px;
}
.ant-list{
.ant-list-item{
padding:15px 20px;
&:last-child{
border-bottom: 1px solid #e8e8e8;
}
.webName{
flex:1;
margin-right: 15px;
word-break: break-all;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
.newPanel{
.ant-form .ant-form-item-label label{
font-size: 16px;
}
.has-success .ant-form-explain{
font-size: 12px;
color: #999;
line-height: 20px;
margin-top: 5px;
word-break: break-all;
}
.ant-form{
.ant-row{
padding:0px 194px 0px 20px;
&.topLine{
border-top: 1px solid #EEEEEE;
padding-top:20px;
margin-top: 25px;
}
&.bottomLine{
border-bottom: 1px solid #EEEEEE;
padding-bottom:20px;
margin-bottom: 25px;
.ant-checkbox + span{
font-size: 16px;
}
}
}
}
.eventCb{
padding:0px 194px 0px 45px;
.ant-checkbox-group{
width: 100%;
}
.colSpan{
display: flex;
flex-wrap: wrap;
&>span{
width: 50%;
margin:0px;
display: block;
&>span{
display: block;
padding-left: 24px;
margin-bottom: 20px;
font-size: 12px;
}
}
}
}
.ant-form-item-children{
display: block;
}
.ant-checkbox + span{
color: #333;
&>span{
color: #333333;
height: 20px;
line-height: 20px;
padding-left: 24px;
font-size: 12px;
display: block;
}
}
}
.deschead{
background: #FAFCFF;
border-radius: 4px 4px 0px 0px;
border: 1px solid rgba(42, 97, 255, 0.23);
height: 50px;
padding:0px 20px;
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
.deschead.mg{
margin:20px!important;
padding:0px 12px;
}
.historyColl{
.ant-collapse-header{
background-color: #fff;
}
.panelHeader{
display: flex;
span{
width: 20%;
color: #333;
font-weight: 400;
}
.time{
text-align: right;
}
.name{
flex:1;
}
}
.ant-collapse-content-box{
background-color: #fff;
}
}
.contentMenu{
li{
font-weight: 500;
}
margin-left:14px;
}
.contentPanel{
.retitle{
font-size: 16px;
font-weight: 600;
color: #333333;
margin:20px 0px 10px!important;
}
.con{
background: #EEEEEE;
border-radius: 4px;
padding:15px;
max-height: 400px;
overflow: auto;
p{
font-size: 13px;
color:#333;
line-height: 28px;
&>span:first-child{
font-weight: 500;
}
}
}
.conEditor{
.overflow-guard{
border-radius: 4px;
}
.margin-view-overlays{
background-color: #eee;
&>div{
background-color: #eee;
}
}
.lines-content{
background-color: #eee;
}
.view-lines{
&>div{
background-color: #eee;
}
}
}
}

View File

@ -1,337 +0,0 @@
import React , { forwardRef, useEffect, useState } from 'react';
import { Form , Input , Button , Select , Radio , Checkbox } from 'antd';
import { Banner } from '../../Component/layout';
import { Link } from 'react-router-dom';
import axios from 'axios';
import PushHistory from './sub/PushHistory';
import DeleteBox from '../../Component/DeleteModal/Index';
import './Index.scss';
// ,"issue_assign","issue_label","issue_milestone","issue_comment","issue_only","fork",
//"pull_request_milestone","pull_request_sync","pull_request_comment","repository","pull_request_label"
const eventArray = [
"create","delete","push","pull_request_assign","pull_request_review","pull_request_only"
]
function New({ form , match , showNotification , history }) {
const [ httpValue , setHttpValue ] = useState("POST");
const [ posthttpValue , setPostHttpValue ] = useState("json");
const [ condition , setCondition ] = useState("push");
const [ event , setEvent ] = useState(["push"]);
const [ visible , setVisible ] = useState(false);
const [ data , setData ] = useState(undefined);
const [ eventFlag , setEventFlag ] = useState(false);
const { getFieldDecorator, validateFields , setFieldsValue } = form;
const { id , owner , projectsId } = match.params;
function compareArray(params) {
if(params && params.length > 0){
if(params.length === 1 && params[0] === "push"){
setEvent(['push']);
return "push";
}else if(params.length === eventArray.length){
setEvent(eventArray);
return "all";
}else{
setEvent([]);
return "forevent";
}
}
}
useEffect(()=>{
if(id){
Init();
}else{
let e = compareArray(event);
setCondition(e);
setFieldsValue({
url:"",
secret:"",
http_method:httpValue,
content_type:posthttpValue,
eventCondition:condition,
event:event,
branch_filter:"*",
active:true
})
}
},[id])
function Init() {
const url = `/${owner}/${projectsId}/webhooks/${id}/edit.json`;
axios.get(url).then(result=>{
if(result){
let e = compareArray(result.data.events);
setFieldsValue({
...result.data,
eventCondition:e,
active:result.data.is_active
})
setData(result.data);
setHttpValue(result.data.http_method);
setCondition(e);
setEvent(result.data.events);
}
}).catch(error=>{})
}
function changeHTTP(value) {
setHttpValue(value);
}
function changeCondition(e) {
setCondition(e.target.value);
if(e.target.value === "push"){
setEvent(["push"])
}else if(e.target.value === "all"){
setEvent(eventArray)
}else{
setEvent([])
}
}
function submit() {
validateFields((error,values)=>{
if(!error){
if(values.eventCondition === "forevent" && event.length === 0){
setEventFlag(true);
return;
}
let e = values.eventCondition === "push" ? ['push'] : values.eventCondition === "all" ? eventArray : event;
if(id){
//
const url = `/${owner}/${projectsId}/webhooks/${id}.json`;
axios.patch(url,{
webhook:{
...values,
events:e
}
}).then(result=>{
if(result){
showNotification("webhook更新成功");
history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
}
}).catch(error=>{})
}else{
//
const url = `/${owner}/${projectsId}/webhooks.json`;
axios.post(url,{
webhook:{
...values,
events:e
}
}).then(result=>{
if(result && result.data && result.data.id){
showNotification("webhook新建成功");
history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
}
}).catch(error=>{})
}
}
})
}
function checkAddr(rule, value, callback) {
let reg = /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/;
if(!value){
callback();
}
if (!reg.test(value)){
callback("请输入有效的URL");
}
callback();
}
function deleteFunc() {
if(id){
setVisible(true);
}
}
function onSuccess() {
if(id){
const url = `/${owner}/${projectsId}/webhooks/${id}.json`;
axios.delete(url).then(result=>{
if(result){
showNotification("webhook删除成功");
history.push(`/projects/${owner}/${projectsId}/setting/webhooks`);
}
}).catch(error=>{})
}
}
const radioStyle = {
display: 'block',
height: '30px',
lineHeight: '30px',
};
return(
<div className="newPanel">
<DeleteBox
visible={visible}
onCancel={()=>setVisible(false)}
onSuccess={onSuccess}
title="删除Webhook"
content="您确定要删除此Webhook吗"
subTitle={`删除后未来事件将不会推送至此Webhook地址${data && data.url}`}
/>
<Banner>
<Link to={`/projects/${owner}/${projectsId}/setting/webhooks`} className="color-blue">Webhooks</Link>
<i className="iconfont icon-youjiantou ml5 mr5 font-12"></i>
<span>{id ? "更新" : "添加"}Webhook</span>
</Banner>
<div>
<p className="deschead mg"><span>当webhook被触发时我们将向以下URL发送通知包括已选择事件的详细信息更多信息可查阅<a className="color-blue hoverLine" target="_blank" href="https://forum.trustie.net/forums/3408/detail">webhooks指南</a></span></p>
<Form>
<input type="password" style={{display:"none"}} />
<Form.Item label="目标URL" colon={false}>
{getFieldDecorator("url",{
rules:[
{required:true,message:"请输入目标URL"},
{
validator:checkAddr
}
]
})(
<Input placeholder="请输入目标URL" size="large" autocomplete='off'/>
)}
</Form.Item>
<Form.Item label="Webhook密钥" colon={false}>
{getFieldDecorator("secret",{
rules:[]
})(
<Input.Password placeholder="请输入Webhook密钥" autocomplete='new-password' size="large" maxLength={"50"}/>
)}
</Form.Item>
<Form.Item label="Http请求方法" colon={false}>
{getFieldDecorator("http_method",{
rules:[]
})(
<Select onSelect={changeHTTP} size="large">
<Select.Option value="GET">GET</Select.Option>
<Select.Option value="POST">POST</Select.Option>
</Select>
)}
</Form.Item>
<Form.Item
label="POST请求类型"
colon={false}
style={{display:httpValue === "POST" ?"block":"none"}}
>
{getFieldDecorator("content_type",{
rules:[]
})(
<Select size="large">
<Select.Option value="json">application/json</Select.Option>
<Select.Option value="form">application/x-www-form-urlencoded</Select.Option>
</Select>
)}
</Form.Item>
<Form.Item label="您希望哪些事件触发此webhook" colon={false} className="topLine">
{getFieldDecorator("eventCondition",{
rules:[]
})(
<Radio.Group onChange={changeCondition}>
<Radio style={radioStyle} value="push">只是push事件</Radio>
<Radio style={radioStyle} value="all">所有事件</Radio>
<Radio style={radioStyle} value="forevent">自定义事件</Radio>
</Radio.Group>
)}
</Form.Item>
<div className="eventCb"
style={{display:condition === "forevent" ?"block":"none"}}
>
<Checkbox.Group value={event} onChange={(e)=>{setEvent(e)}}>
<p className="color-grey-3 mb10">代码库事件</p>
<div className="colSpan">
<span>
<Checkbox value="push">推送</Checkbox>
<span>git推送到存储库</span>
</span>
{/* <span>
<Checkbox value="repository">代码库</Checkbox>
<span>创建或删除代码库</span>
</span> */}
<span>
<Checkbox value="create">创建</Checkbox>
<span>创建分支或标签</span>
</span>
<span>
<Checkbox value="delete">删除</Checkbox>
<span>删除分支或标签</span>
</span>
</div>
<p className="color-grey-3 mt10 mb10">合并请求事件</p>
<div className="colSpan">
<span>
<Checkbox value="pull_request_only">合并请求</Checkbox>
<span>合并请求被打开被关闭被重新打开或被编辑</span>
</span>
<span>
<Checkbox value="pull_request_assign">合并请求分配</Checkbox>
<span>合并请求被分配或取消分配</span>
</span>
{/* <span>
<Checkbox value="pull_request_milestone">合并请求收入里程碑</Checkbox>
<span>合并请求被记录或取消记录于里程碑中</span>
</span> */}
{/* <span>
<Checkbox value="pull_request_comment">合并请求被评论</Checkbox>
<span>合并请求评论被创建编辑或删除</span>
</span> */}
{/* <span>
<Checkbox value="pull_request_label">合并请求标签</Checkbox>
<span>合并请求的标签被更新或清除</span>
</span> */}
<span>
<Checkbox value="pull_request_review">合并请求审查</Checkbox>
<span>合并请求被批准拒绝或提出审查意见审查人员的修改审查线程已解决或未解决</span>
</span>
{/* <span>
<Checkbox value="pull_request_sync">合并请求被同步</Checkbox>
<span>合并请求被同步</span>
</span> */}
</div>
</Checkbox.Group>
{ eventFlag && <span style={{color:"#DF0002"}}>请选择自定义事件</span>}
</div>
<Form.Item
label="分支过滤"
className="topLine"
help={<span>推送创建删除分支事件的分支白名单使用 glob 模式匹配指定若为空或 *则将报告所有分支的事件语法文档见<a href="github.com/gobwas/glob" target="_blank" className="hoverLine color-blue">github.com/gobwas/glob</a>示例master,{'{'}master,release*{'}'}</span>}
colon={false}
style={{marginTop:'15px'}}
>
{getFieldDecorator("branch_filter",{
rules:[]
})(
<Input size="large"/>
)}
</Form.Item>
<Form.Item
className="topLine bottomLine"
colon={false}
style={{height:"110px",paddingBottom:"0px"}}
>
{getFieldDecorator("active",{
valuePropName:"checked"
})(
<Checkbox>激活<span className="subCbDesc">激活后触发事件的信息将发送到此Webhook地址</span></Checkbox>
)}
</Form.Item>
<Button type="primary" onClick={submit} className="ml20" style={{width:id?"":"100px"}}>{id ? "更新Webhook":"添加"}</Button>
{
id && <Button type="danger" className="ml20" onClick={deleteFunc}>删除</Button>
}
</Form>
</div>
{ id && <PushHistory id={id} owner={owner} projectsId={projectsId} showNotification={showNotification}/> }
</div>
)
}
export default Form.create()(forwardRef(New));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 778 B

View File

@ -1,82 +0,0 @@
import React, { useEffect, useState } from 'react';
import { Button, Collapse , Tooltip , Spin } from 'antd';
import axios from 'axios';
import Content from './historyContent';
import Fault from '../images/fault.png';
const { Panel } = Collapse;
function PushHistory({id,owner,projectsId,showNotification}) {
const [ list , setList ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(false);
useEffect(()=>{
if(id && owner && projectsId){
Init();
}
},[id,owner,projectsId])
function Init() {
const url = `/${owner}/${projectsId}/webhooks/${id}/tasks.json`;
axios.get(url,{
params:{page:1,limit:10}
}).then(result=>{
if(result && result.data){
setList(result.data.tasks);
setIsSpin(false);
}
}).catch(error=>{})
}
function testFunc() {
setIsSpin(true);
const url = `/${owner}/${projectsId}/webhooks/${id}/test.json`;
axios.post(url).then(result=>{
if(result && result.data){
// Init();
showNotification("测试推送已经加入到队列,请耐心等待数秒再刷新推送记录!");
setIsSpin(false);
}
}).catch(error=>{setIsSpin(false);})
}
return(
<div className="pt30">
<div className="deschead">
<span className="font-16">最近推送历史</span>
<span>
<a className="color-blue" onClick={Init}>刷新</a>
<Button type="primary" className="ml20" onClick={testFunc} loading={isSpin}>测试推送</Button>
</span>
</div>
{
list && list.length>0 &&
<Collapse accordion bordered={false} className="historyColl">
{
list.map((i,k)=>{
return(
<Panel header={
<div className="panelHeader">
{
i.is_succeed ?
<Tooltip title={<span className="pl20 pr20">响应成功类型{i.response_content && i.response_content.status}</span>}>
<i className="iconfont icon-chenggongicon font-14 mr10" style={{color:"#2DB44D"}}></i>
</Tooltip>
:
<img src={Fault} alt="" className="mr10" height="15px" style={{marginTop:"2px"}}/>
}
<span className="name">{i.uuid}</span>
{/* <span>{i.type}</span> */}
<span className="time">{i.delivered_time}</span>
</div>
}>
<Content request_content={i.request_content && i.request_content.headers} payload_content={i.payload_content} response_content={i.response_content}/>
</Panel>
)
})
}
</Collapse>
}
</div>
)
}
export default PushHistory;

View File

@ -1,144 +0,0 @@
import React, { useEffect, useState } from 'react';
import { Menu , Tag } from 'antd';
import Nodata from '../../../Nodata';
import ReactJson from 'react-json-view';
import Editor from "../../../Component/Monaco";
function HistoryContent({request_content,payload_content,response_content}) {
const [ key , setKey ] = useState("request");
const [ requestHeader , setRequestHeader ] = useState(undefined);
const [ responseHeader , setResponseHeader ] = useState(undefined);
useEffect(()=>{
if(request_content){
let arr = [];
Object.keys(request_content).map((item,key)=>{
arr.push({name:item,value:request_content[item],k:key});
})
setRequestHeader(arr);
}
},[request_content])
useEffect(()=>{
if(response_content && response_content.headers){
let arr = [];
Object.keys(response_content.headers).map((item,key)=>{
arr.push({name:item,value:response_content.headers[item],k:key});
})
setResponseHeader(arr);
}
},[response_content])
function isJSON(str) {
if (typeof str === 'string') {
try {
var obj=JSON.parse(str);
if(typeof obj === 'object' && obj ){
return true;
}else{
return false;
}
} catch(e) {
return false;
}
}
}
return(
<div className="contentPanel">
<div>
<Menu selectedKeys={[key]} onSelect={(e)=>setKey(e.key)} mode={"horizontal"} className="contentMenu">
<Menu.Item key={"request"}><i className="iconfont icon-qingqiuicon font-15 mr5"></i>请求内容</Menu.Item>
<Menu.Item key={"response"}><i className="iconfont icon-xiangyingicon font-16 mr5"></i>响应内容
{response_content && <Tag color={response_content.status === 200 ? "#2DB44D":"#CA0002"} style={{margin:"0px",marginLeft:"3px",fontSize:"12px"}}>{response_content.status}</Tag>}
</Menu.Item>
</Menu>
</div>
<div style={{paddingLeft:"16px"}}>
{
key === "request" ?
<div>
{
requestHeader && requestHeader.length > 0 &&
<div>
<p className="retitle">头信息</p>
<div className="con">
{
requestHeader.map((i,k)=>{
return(
<p><span>{i.name}: </span><span>{i.value}</span></p>
)
})
}
</div>
</div>
}
{
payload_content &&
<div>
<p className="retitle">内容</p>
<div className="con">
<ReactJson
src={payload_content}
name={false}
displayObjectSize={false}
displayDataTypes={false}
enableClipboard={false}
/>
</div>
</div>
}
</div>
:
<div>
{
(!responseHeader && ((response_content && !response_content.body) || !response_content))?
<Nodata _html="暂无数据~"/>
:""
}
{
responseHeader && responseHeader.length > 0 &&
<div>
<p className="retitle">头信息</p>
<div className="con">
{
responseHeader.map((i,k)=>{
return(
<p><span>{i.name}: </span><span>{i.value}</span></p>
)
})
}
</div>
</div>
}
{
response_content && response_content.body &&
<div>
<p className="retitle">响应体</p>
{
isJSON(response_content.body) ?
<div className="con">
<ReactJson
enableClipboard={false}
src={JSON.parse(response_content.body)}
name={false}
displayObjectSize={false}
displayDataTypes={false}
/>
</div>
:
<div className="conEditor">
<Editor value={response_content.body}/>
</div>
}
</div>
}
</div>
}
</div>
</div>
)
}
export default HistoryContent;

View File

@ -445,7 +445,7 @@ class NewTags extends Component {
message: "请填写标签名字",
},
],
})(<Input placeholder="名称10字以内" maxLength="10" />)}
})(<Input placeholder="标签名字" maxLength="20" />)}
</Form.Item>
<Form.Item className="inputcount">
@ -507,8 +507,8 @@ class NewTags extends Component {
>
<div className="dialogdiv">
<Input
placeholder="称,10以内"
maxLength="10"
placeholder="标签名字"
maxLength="20"
className="inptwidth"
value={this.state.name}
onChange={this.changmodelname}

View File

@ -202,7 +202,7 @@ export default Form.create()(
[],
<Checkbox checked={check_box} onChange={change_check_box_status} style={OptionStyle}>新建项目<span className="color-grey-8 ml10">(成员可以在组织中新建项目创建者将自动获得新建的项目的管理员权限)</span></Checkbox>, false, 20,onwers ? "hide":""
)}
{/* {helper(
{helper(
'版本库权限:',
"authorize",
[],
@ -211,7 +211,7 @@ export default Form.create()(
<Radio value="write" style={addStyle}>写入权限<span className="color-grey-8 ml10">(成员可以查看和推送提交到团队项目)</span></Radio>
<Radio value="admin" style={OptionStyle}>管理员权限<span className="color-grey-8 ml10">(成员可以拉取和推送到团队项目同时可以添加协作者)</span></Radio>
</Radio.Group>, false, 20,onwers ? "hide":""
)} */}
)}
</Form>
{/* <p className="required">访</p>
<AlignCenter className="mb10">

View File

@ -58,9 +58,6 @@ class version extends Component {
renderList = (releases) => {
const { projectsId , owner } = this.props.match.params;
const { isManager , isDeveloper } = this.props;
const type = this.props.projectDetail && this.props.projectDetail.type;
if (releases && releases.length > 0) {
return (
releases.map((item, key) => {
@ -77,10 +74,7 @@ class version extends Component {
<div className="versionInfo_right">
<span className="versionName">
<span className="task-hide">{item.name}</span>
{
(isManager || isDeveloper) && type !==2 &&
<Link to={`/projects/${owner}/${projectsId}/releases/${item.version_id}/update`} className="color-blue ml3 font-12">编辑</Link>
}
<Link to={`/projects/${owner}/${projectsId}/releases/${item.version_id}/update`} className="color-blue ml3 font-12">编辑</Link>
</span>
<span className="color-grey-3">
<i className={`${item.bodyshow ? "iconfont icon-sanjiaoxing-down color-grey-8 mr3 font-14":"iconfont icon-triangle color-grey-8 mr3 font-14"}`} onClick={()=>this.showBody(key,item.bodyshow)}></i>
@ -106,14 +100,14 @@ class version extends Component {
render() {
const { projectsId ,owner } = this.props.match.params;
const { data , releases , isSpin } = this.state;
const type = this.props.projectDetail && this.props.projectDetail.type;
const { data , releases , isSpin } = this.state
return (
<div className="main" style={{padding:"0px"}}>
<div className="topWrapper" style={{padding:"15px 20px"}}>
<span className="font-18 color-grey-3">版本发布</span>
{
data && data.user_permission && type !== 2 ?
data && data.user_permission ?
<Link to={`/projects/${owner}/${projectsId}/releases/new`} className="topWrapper_btn_new">+ 发布新版</Link>
: ''
}

View File

@ -7,18 +7,6 @@ ul,ol,dl{
.color-black{
color: #333;
}
.projectallName{
font-size: 22px;
font-weight: normal;
line-height: 30px;
max-width: 850px;
.projectN{
word-break: break-all;
}
}
.textRight{
text-align: right;
}
.main{
width: 1200px;
padding:20px;
@ -86,14 +74,6 @@ ul,ol,dl{
flex-wrap: wrap;
align-items: center;
}
.commitDesc{
flex:1;
margin-left:20px;
font-size:16px;
color:#333;
line-height:26px;
word-break: break-all;
}
.normalBox{
border-radius: 4px;
@ -257,17 +237,4 @@ form{
.group-setting-switch{
border: 1px solid #DDDDDD !important;
background-color: #fff !important;
}
.ant-btn.ant-btn-background-ghost{
border-color: #D0D0D0;
}
.ant-btn.ant-btn-background-ghost.ant-btn-primary:hover{
background-color: #1890ff!important;
border-color: #1890ff;
color: #fff;
}
.ant-btn.ant-btn-background-ghost.ant-btn-danger:hover{
background-color: #DF0002!important;
border-color: #DF0002;
color: #fff;
}

View File

@ -105,7 +105,6 @@ $flex:flex;
word-break: break-all;
text-align: justify;
font-size: 16px;
text-align: center;
}
.focusBox,.infoBox{
width: 100%!important;
@ -149,12 +148,12 @@ $flex:flex;
i{
font-size: 25px!important;
border-radius: 50%;
color: #fff;
&.icon-nan1{
background-color: #1890FF;
background-color: #fff;
&.icon-nan{
color: #1890FF;
}
&.icon-nv1{
background-color: pink;
&.icon-nv{
color: pink;
}
}
}

View File

@ -207,9 +207,9 @@ class Infos extends Component {
<span>
{
user && user.gender===1?
<i className="iconfont icon-nan1"></i>
<i className="iconfont icon-nan"></i>
:
<i className="iconfont icon-nv1"></i>
<i className="iconfont icon-nv"></i>
}
</span>
</span>
@ -285,11 +285,7 @@ class Infos extends Component {
<Menu.Item key="2"><Link to={`/users/${user && user.login}/projects/common`}><i className="iconfont icon-xiangmu"></i></Link></Menu.Item>
{
current_user && user && user.login === current_user.login ?
<Menu.Item key="3">
<Link to={`/users/${user && user.login}/notice`}>
<i className="iconfont icon-daibanshixiang"></i>
{undo_events && undo_events >0 ? <span className="menuNum">({undo_events})</span>:""}</Link>
</Menu.Item>
<Menu.Item key="3"><Link to={`/users/${user && user.login}/notice`}><i className="iconfont icon-daibanshixiang"></i><span className="menuNum">({undo_events})</span></Link></Menu.Item>
:""
}
{
@ -297,12 +293,7 @@ class Infos extends Component {
<Menu.Item key="4"><Link to={`/users/${user && user.login}/devops/CIService`}><i className="iconfont icon-gongzuoliu1"></i>DevOps</Link></Menu.Item>
:""
}
<Menu.Item key="5">
<Link to={`/users/${user && user.login}/organizes`}>
<i className="iconfont icon-zuzhi"></i>
{ user && user.user_org_count && user.user_org_count > 0 ? <span className="menuNum">({user.user_org_count})</span>:""}
</Link>
</Menu.Item>
<Menu.Item key="5"><Link to={`/users/${user && user.login}/organizes`}><i className="iconfont icon-zuzhi"></i><span className="menuNum">({user && user.user_org_count})</span></Link></Menu.Item>
</Menu>
}
{user && (

View File

@ -41,6 +41,9 @@
z-index: 1000 !important;
}
.markdown-body p {
margin: 0 !important
}
.markdown-body img{
cursor: pointer;
}

View File

@ -477,6 +477,9 @@ class NewShixunModel extends Component{
<style>
{
`
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
.packinput .ant-input{
border: 1px solid rgba(217,217,217,1) !important;
}

View File

@ -325,6 +325,9 @@ class OneSelfOrderModal extends Component{
<style>
{
`
.ant-input, .ant-input .ant-input-suffix{
background-color: #fff !important;
}
.width300{
width:300px;
display: inline-block;

View File

@ -1158,6 +1158,10 @@ body #root {
position: absolute;
}
.ant-input,
.ant-input .ant-input-suffix {
background-color: #fafafa !important;
}
.ant-input:focus,
.ant-input:focus .ant-input-suffix {
@ -1475,6 +1479,9 @@ samp {
margin-left: 0px !important;
}
.ant-form-explain {
padding-left: 13px;
}
.exercise .ant-form-item-label {
margin-left: 20px;

Some files were not shown because too many files have changed in this diff Show More