Compare commits

..

107 Commits

Author SHA1 Message Date
caishi 00402ef13d Merge branch 'master' of https://git.trustie.net/jasder/forgeplus-react
# Conflicts:
#	src/forge/Main/sub/UpdateDescModal.jsx
2021-08-09 10:37:23 +08:00
caishi 8f2df90555 代码style 2021-08-09 10:36:15 +08:00
caishi 7530d3f9c4 Merge branch 'develop' 2021-08-06 17:07:54 +08:00
caishi 001cb8da53 issue 2021-08-06 15:06:23 +08:00
caishi d09e6e2bc6 issue 2021-08-06 14:07:59 +08:00
caishi e2ad3b1308 issue-同步镜像项目不能对仓库进行操作(新建合并请求、新建发行版等) 2021-08-05 17:13:57 +08:00
caishi 14f80d56ad Merge branch 'develop' of https://git.trustie.net/jasder/forgeplus-react into develop 2021-08-05 11:12:11 +08:00
caishi 65e7025035 Merge branch 'develop' of https://git.trustie.net/jasder/forgeplus-react into develop
# Conflicts:
#	src/forge/Main/sub/UpdateDescModal.jsx
2021-08-05 11:11:51 +08:00
hc1913847458 aa786f0cf0 限制字符 2021-08-05 10:57:43 +08:00
hc1913847458 2aad9c67f5 限制字符 2021-08-05 10:53:29 +08:00
hc1913847458 b7869e5203 Merge branch 'develop' of https://git.trustie.net/jasder/forgeplus-react 2021-08-05 10:48:43 +08:00
hc1913847458 b238bb51ca 限制字符 2021-08-05 10:47:22 +08:00
hc1913847458 de636eed6d 限制字符 2021-08-05 10:42:08 +08:00
caishi 4bde5da97c markdown-issue 2021-08-05 10:30:04 +08:00
caishi f944ebad6f issue 2021-08-04 17:12:29 +08:00
hc1913847458 ad7ab189b1 限制字符 2021-08-04 14:42:08 +08:00
caishi 5140bfbe77 issue修改 2021-08-03 17:37:14 +08:00
caishi affbe87dfd 新增流水线弹框z-index 2021-08-03 10:38:39 +08:00
caishi dd1beb3116 合并请求-已拒绝的不能编辑 2021-08-03 09:34:11 +08:00
caishi d67862156c update issue 2021-08-02 15:32:51 +08:00
caishi c9802c26a4 Merge branch 'develop' 2021-08-02 10:35:49 +08:00
caishi 47365c0bed webhook-修改一版 2021-08-02 10:35:36 +08:00
caishi 4ec840f252 Merge branch 'develop' 2021-07-30 20:13:49 +08:00
caishi b1ec068663 webhook自动填充 2021-07-30 20:13:34 +08:00
caishi 44a8f806e0 Merge branch 'develop' 2021-07-30 17:44:17 +08:00
caishi 51d34a7667 同上-password-webhook 2021-07-30 17:35:53 +08:00
caishi 9408ad7dcb Merge branch 'develop' 2021-07-30 17:03:19 +08:00
caishi 2b47c1ff9a 同上-修改bug 2021-07-30 17:02:44 +08:00
caishi f7698334ab webhook上线测试版-1 2021-07-30 15:06:32 +08:00
caishi 810ea37bed Merge branch 'develop' 2021-07-26 09:38:44 +08:00
caishi f100875b0f ssh翻页 2021-07-26 09:38:21 +08:00
caishi 6679fe8a48 Merge branch 'develop' 2021-07-22 17:44:30 +08:00
caishi 4f9f5649a9 设置模块-测试版第一版 2021-07-22 17:44:12 +08:00
caishi d31b932efe Merge branch 'develop' 2021-07-21 10:10:53 +08:00
caishi f90243243f 新建项目跳转后的地址 2021-07-21 10:09:48 +08:00
caishi 7a5db58a03 appconfig 2021-07-15 14:46:22 +08:00
caishi 0889ee69c5 未登录时:路由/不显示顶部和底部 2021-07-13 10:42:56 +08:00
caishi 876ee66a05 详情:复刻按钮不能连续点击 2021-07-13 09:58:08 +08:00
caishi cb514315a6 新建合并请求:切换目标分支或者源分支时不用调用check_can_merge接口 2021-07-12 18:22:36 +08:00
caishi c5b729038c 邀请码位置,页面整体的加载 2021-07-09 17:10:55 +08:00
caishi a6d713d1f6 代码库:增加文件类型submodule 不允许点击 2021-07-09 11:28:51 +08:00
caishi ee1217e171 本地版:replaceAll无替换时报错 2021-07-09 11:05:19 +08:00
caishi 967ff385aa 代码库根目录:点击readme文件的编辑按钮时要显示编辑状态 2021-07-07 11:16:07 +08:00
caishi e6e0546e27 permission有为空的情况 2021-07-06 14:40:23 +08:00
caishi 1bb339bfb1 新建:拥有者默认选中当前登录用户,默认路由 2021-07-06 11:54:57 +08:00
caishi 07852b204c Merge branch 'develop' 2021-07-05 20:35:59 +08:00
caishi 275b7d2015 数据为0时不显示 2021-07-05 20:35:29 +08:00
caishi 9e9e4c07bf 合并请求详情:发布合并请求者跳转链接错误 2021-07-05 15:04:17 +08:00
caishi 934ac61b77 Merge branch 'develop' 2021-07-02 18:19:02 +08:00
caishi f854d2164c 工作流-构建列表-头像地址错误 2021-07-02 18:18:49 +08:00
caishi 95091d0e08 Merge branch 'develop' 2021-07-02 15:37:43 +08:00
caishi e48628389e 镜像地址增加跳转链接 2021-07-02 15:35:43 +08:00
caishi e31ff9bdf3 Merge branch 'develop' 2021-07-01 17:00:43 +08:00
caishi 62b9abedbb index.html lang="zh-cN"禁止浏览器翻译 2021-07-01 16:45:47 +08:00
caishi f97ca92e41 update 2021-07-01 15:48:04 +08:00
caishi 84bbf5fd52 易修批量修改:非项目协作者不能操作 2021-07-01 13:56:09 +08:00
caishi ff60cf11e1 update issue 2021-06-30 10:43:22 +08:00
caishi 45f188e6f4 fork项目不能修改可见性(公有私有) 2021-06-29 17:29:35 +08:00
caishi 4b832f40c0 项目详情:顶部信息排版调整,修改显示bug 2021-06-29 14:03:53 +08:00
caishi eba6ed0876 搜索的接口改用正式版对应的服务器地址 2021-06-28 10:44:42 +08:00
caishi db682ace86 Merge branch 'develop' 2021-06-25 18:34:19 +08:00
caishi 1cdf316852 合并请求:冲突文件的显示换行 2021-06-25 18:33:54 +08:00
caishi 777dbd0f43 Merge branch 'develop' 2021-06-25 18:21:48 +08:00
caishi 79996bd185 权限:易修和合并请求的新建修改等操作权限 2021-06-25 18:21:31 +08:00
caishi 2d312b6176 路由:tree后面的参数branch内容含有/ 2021-06-25 14:10:13 +08:00
caishi b44b6530e5 Merge branch 'develop' 2021-06-25 09:14:50 +08:00
caishi bad4f79a0c 易修:批量删除和批量修改issue状态要更新数量 2021-06-22 10:22:00 +08:00
caishi fad42414dc 代码库:提交信息的显示和隐藏 2021-06-21 17:52:48 +08:00
caishi c10799b6d0 Merge branch 'develop_search' into develop 2021-06-21 10:00:35 +08:00
caishi b808bcee99 Merge branch 'develop' 2021-06-18 16:56:18 +08:00
caishi cb95e50a82 代码库:从文件详情切换到文件列表时,上传文件和新建文件的按钮没有显示 2021-06-18 16:55:52 +08:00
caishi 5eaebd4e42 上传文件显示: ADD file via upload
创建新文件显示: Add 文件名
修改文件: Update 文件名
2021-06-18 14:23:46 +08:00
caishi e9badf0d7c 合并请求默认选中开启中的 2021-06-18 09:59:33 +08:00
caishi e72e817bb1 复刻自,如果是组织要跳转到组织界面 2021-06-17 16:28:27 +08:00
caishi b5835145f7 个人中心性别icon不显示 2021-06-17 11:38:53 +08:00
caishi d4e1b2f414 详情banner数量,显示开启中的数量,且执行关闭或者拒绝等修改状态的操作时要更新数量 2021-06-16 15:51:47 +08:00
caishi f4b3afde6a 项目详情和个人中心的项目列表,增加私有标识 2021-06-16 11:17:46 +08:00
caishi 5806f60491 右侧按钮-帮助弹框 2021-06-16 09:17:33 +08:00
caishi 8298aef72f forked from 文案 2021-06-15 11:36:42 +08:00
caishi c0f7c489fb Merge branch 'develop' 2021-06-11 18:11:43 +08:00
caishi bc64cbb415 Merge branch 'develop' 2021-06-08 14:56:20 +08:00
caishi fa169b27cd Merge branch 'develop' 2021-05-26 16:48:35 +08:00
caishi 3e0814344f Merge branch 'develop' 2021-05-25 11:25:04 +08:00
caishi eb58f91dbf Merge branch 'develop' 2021-05-21 19:21:32 +08:00
caishi 513255428c Merge branch 'develop'
# Conflicts:
#	package-lock.json
2021-05-14 17:04:57 +08:00
caishi 8baf2cb49c install babel-polyfill 2021-05-08 17:28:14 +08:00
caishi 705bfb07bd Merge branch 'develop' 2021-05-08 16:53:26 +08:00
caishi d783d998fc 编辑合并请求-url地址错误 2021-05-08 14:36:12 +08:00
caishi 51925542b8 Merge branch 'develop'
# Conflicts:
#	public/css/edu-purge.css
2021-05-07 16:37:21 +08:00
caishi ff06efe109 merge develop 2021-05-06 17:15:43 +08:00
caishi c33561c212 新建项目-maxlength 2021-05-06 17:14:42 +08:00
caishi 2deb6f8f9d 设置所有标签的marginbottom为0 2021-05-06 17:14:30 +08:00
caishi 63d69a955e 代码库-提交描述未换行 2021-05-06 17:14:19 +08:00
caishi 4d652d238d 不能修改组织账号 2021-04-27 17:25:00 +08:00
caishi 6da4dbc165 组织团队-无数据显示错误 2021-04-27 09:45:14 +08:00
caishi f65f4c273a 组织基本设置-正则和新建的页面不一致 2021-04-26 16:32:12 +08:00
caishi 1af504825c 代码库编辑文件-切换到其它目录后要重新将编辑状态改为显示状态 2021-04-25 18:00:05 +08:00
caishi e94cf68cc5 样式覆盖 2021-04-23 18:04:49 +08:00
caishi 5fa2fd99b9 Merge branch 'develop' 2021-04-23 14:51:04 +08:00
caishi 20ab8a6683 Merge branch 'develop' 2021-04-23 14:47:50 +08:00
caishi a7f709a663 Merge branch 'develop' 2021-04-23 14:16:30 +08:00
caishi 63c2cfed70 Merge branch 'develop' 2021-04-22 10:58:30 +08:00
caishi 80cd6fbae0 md文件要用Markdown渲染 2021-04-20 15:33:21 +08:00
caishi 49d3db6746 合并请求-提出申请者头像显示问题 2021-04-20 11:18:44 +08:00
caishi bc11ec68e3 注释 2021-04-20 10:57:46 +08:00
caishi 2d2deec224 Merge branch 'develop' 2021-04-20 10:56:50 +08:00
caishi 8c58f77afb 去掉右侧悬浮手册按钮 2021-04-09 14:18:44 +08:00
102 changed files with 3139 additions and 2418 deletions

200
package-lock.json generated
View File

@ -2377,6 +2377,12 @@
}
}
},
"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",
@ -3869,6 +3875,23 @@
"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",
@ -6214,6 +6237,41 @@
"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",
@ -6243,6 +6301,12 @@
}
}
},
"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",
@ -6687,6 +6751,42 @@
"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",
@ -10330,6 +10430,12 @@
"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",
@ -10340,6 +10446,12 @@
"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",
@ -13970,6 +14082,12 @@
"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",
@ -14741,6 +14859,18 @@
"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",
@ -15106,6 +15236,18 @@
"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",
@ -15294,6 +15436,34 @@
"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",
@ -18389,6 +18559,12 @@
"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",
@ -18898,6 +19074,30 @@
"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,6 +193,7 @@
"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",
@ -203,6 +204,7 @@
"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;
margin-bottom: 15px!important;
}
.mb16 {
@ -2424,10 +2424,16 @@ 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;
@ -3409,7 +3415,7 @@ a.user_bluebg_btn {
}
.cdefault {
cursor: default
cursor: default!important;
}
@ -3908,6 +3914,17 @@ html>body #ajax-indicator {
max-height: 340px;
}/*头部导航条样式---2018-03-19--by-cs*/
.privateTag{
display: block;
padding:0px 6px;
border-radius: 12px;
border:1px solid #2FC25B;
height: 18px;
line-height: 18px;
font-size: 12px;
margin-left: 10px;
color: #2FC25B;
}
.head-nav {
text-align: center;
height: 70px;
@ -6674,4 +6691,10 @@ 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=1622517296245') format('woff2'),
url('iconfont.woff?t=1622517296245') format('woff'),
url('iconfont.ttf?t=1622517296245') format('truetype');
src: url('iconfont.woff2?t=1627870211301') format('woff2'),
url('iconfont.woff?t=1627870211301') format('woff'),
url('iconfont.ttf?t=1627870211301') format('truetype');
}
.iconfont {
@ -13,6 +13,210 @@
-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";
}

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,363 @@
"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": "邮箱",

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 733 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -60,12 +60,13 @@ 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;
}
@ -87,6 +88,10 @@ 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,6 +39,11 @@ 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'),
@ -78,6 +83,10 @@ const Search = Loadable({
loading: Loading,
})
const ProjectIndex = Loadable({
loader: () => import("./forge/Index"),
loading: Loading,
});
class App extends Component {
constructor(props) {
super(props);
@ -103,30 +112,9 @@ 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();
@ -204,6 +192,8 @@ class App extends Component {
};
render() {
const { mygetHelmetapi } = this.state;
let personal = mygetHelmetapi && mygetHelmetapi.personal;
return (
<Provider store={store}>
<ConfigProvider locale={zhCN}>
@ -221,6 +211,14 @@ class App extends Component {
}
}>
</Route>
<Route
path={"/settings"}
render={
(props) => {
return (<Security {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/*项目*/}
<Route
path={"/projects"}
@ -265,7 +263,10 @@ class App extends Component {
<Route exact path="/"
render={
(props) => (
<Projects {...this.props} {...props} {...this.state}></Projects>
personal && personal.length > 0 ?
<InfosIndex {...this.props} {...props} />
:
<ProjectIndex {...this.props} {...props} />
)
}
/>

View File

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

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.css';
import '../Branch/branch.scss';
import './activity.css';
import NoneData from '../Nodata';

View File

@ -1,39 +1,35 @@
import React, { Component } from 'react';
import { Dropdown, Icon, Tooltip } from 'antd';
import "./branch.css";
import React, { useState } from 'react';
import { Dropdown, Menu, Tooltip } from 'antd';
import "./branch.scss";
class CloneAddress extends Component {
function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
const [ key , setKey ] = useState("HTTP");
// 点击按钮复制功能
jsCopy = () => {
function jsCopy(){
var e = document.getElementById("copy_rep_content");
e.select();
document.execCommand("Copy");
}
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>
}
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>
</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.css';
import './branch.scss';
import { getBranch , getTag } from '../GetData/getData';

View File

@ -81,4 +81,25 @@
.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: 220px;
max-height: 230px;
overflow-y: auto;
li{
background: #F5F5F5;

View File

@ -0,0 +1,35 @@
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

@ -0,0 +1,45 @@
.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,6 +4,12 @@ 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);
@ -71,7 +77,8 @@ function DrawerPanel({visible,onClose,branch,owner,projectsId,history, name , li
let dataref = event.node.props.dataRef;
if(dataref.type==="file"){
onClose();
history.push(`/projects/${owner}/${projectsId}/tree/${branch}/${dataref.path}`);
let value = turnbar(branch);
history.push(`/projects/${owner}/${projectsId}/tree/${value}/${dataref.path}`);
}
}

View File

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

View File

@ -0,0 +1,62 @@
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}){
function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}){
return(
<div>
@ -10,10 +10,10 @@ function Releases({owner,projectsId,releaseVersions}){
<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 ?
{ (releaseVersions && releaseVersions.total_count > 0) || projectType ===2 ?
<Link className="font-12 color-grey-9" to={`/projects/${owner}/${projectsId}/releases`}>全部</Link>
:
<Link className="font-12 color-blue" to={`/projects/${owner}/${projectsId}/releases/new`}>新建</Link>
baseOperate && <Link className="font-12 color-blue" to={`/projects/${owner}/${projectsId}/releases/new`}>新建</Link>
}
</FlexAJ>
{

View File

@ -10,6 +10,12 @@ 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":
@ -65,8 +71,9 @@ 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/${item.branch}/${value}`} className="color-blue">{value}</Link>
<Link to={`/projects/${owner}/${projectsId}/tree/${v}/${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"}} onChange={(e)=>setBranchValue(e)}>
<Select value={branchValue} style={{width:"150px"}} dropdownClassName="chooseCon" 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} style={{width:"180px",marginLeft:"10px"}} onChange={(e)=>{console.log(e);setEventValue(e)}}>
<Select mode="multiple" allowClear value={eventValue} dropdownClassName="chooseCon" 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 {getUrl} from 'educoder';
import { getImageUrl } 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 && getUrl(`/images/${item.image_url}`)}`} />
<img style={{borderRadius:"50%",marginRight:"10px",width:"25px",height:"25px"}} alt="" src={`${item.image_url && getImageUrl(`/${item.image_url}`)}`} />
<div className="task-hide ml5" style={{ maxWidth: "300px" }}>
{meg.message}
</div>

View File

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

View File

@ -152,20 +152,21 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
</Form.Item>
}
<Form.Item label="仓库名称:">
<Form.Item label="仓库标识:" style={{marginBottom:"0px"}}>
{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:"483px"}}></div>
<div style={{height:"497px"}}></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,36 +79,6 @@ 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: "提示",
@ -117,8 +87,6 @@ class NewHeader extends Component {
});
};
componentWillReceiveProps(newProps, oldProps) {
this.setState({
user: newProps.user
@ -128,7 +96,6 @@ class NewHeader extends Component {
}
}
educoderlogin = () => {
//登录账号
this.setState({
@ -166,13 +133,11 @@ class NewHeader extends Component {
})
};
// 关闭
cancelModulationModels = () => {
this.setState({ isRenders: false })
}
setevaluatinghides = () => {
this.setState({
setevaluatinghides: true
@ -289,6 +254,7 @@ class NewHeader extends Component {
)
})
}
<li><Link to={`/settings/SSH`}>设置</Link></li>
<Menu.Item><a onClick={() => this.educoderloginysl()}>退出</a></Menu.Item>
</Menu>
)
@ -297,17 +263,13 @@ class NewHeader extends Component {
render() {
const { match} = this.props;
let current_user = this.props.user;
let { Addcoursestypes,
tojoinitemtype,
tojoinclasstitle,
code_notice,
let {
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;
padding:0px!important;
cursor: default;
&:hover{
background-color: #fff;

View File

@ -26,10 +26,6 @@ const ProjectDetail = Loadable({
loading: Loading,
});
const Infos = Loadable({
loader: () => import("./users/Infos"),
loading: Loading,
});
class Index extends Component {
componentDidUpdate=()=>{
@ -74,12 +70,8 @@ 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,12 +19,27 @@ 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);
@ -46,13 +61,33 @@ 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 [ defaultBranch , setDefaultBranch ] = useState(undefined);
const [ editReadme , setEditReadme ] = useState(false);
const [ pullsFlag , setPullsFlag ] = useState(true);
const [ issuesFlag , setIssuesFlag ] = useState(true);
const owner = props.match.params.owner;
const projectsId = props.match.params.projectsId;
const branchName = props.match.params.branchName;
let branchName = props.match.params.branchName;
branchName = returnbar(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){
@ -61,6 +96,7 @@ function CoderDepot(props){
setWebsite(details.website);
setLessonUrl(details.lesson_url);
setDefaultBranch(details.default_branch);
setInviteCode(details.invite_code);
}
},[details])
@ -75,13 +111,16 @@ function CoderDepot(props){
useEffect(()=>{
if (projectsId && owner && defaultBranch){
if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${branchName}/`) > -1) {
let url = pathname.split(`/tree/${branchName}/`)[1];
let b = turnbar(branchName) ;
if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${b}/`) > -1) {
let url = pathname.split(`/tree/${b}/`)[1];
setTreeValue(url);
getFileInfo(url,branchName);
setType("file");
}else{
setTreeValue(undefined);
getDirInfo(branchName || defaultBranch);
setType("dir");
}
}
},[projectsId,owner,pathname,defaultBranch])
@ -90,6 +129,7 @@ function CoderDepot(props){
function getDirInfo(branch){
setIsSpin(true);
const url = `/${owner}/${projectsId}/entries.json`;
axios.get(url, {
params: { ref: branch }
}).then((result) => {
@ -105,6 +145,8 @@ function CoderDepot(props){
setMainFlag(true);
setReadOnly(true);
setReadme(result.data.readme);
setEditReadme(false);
setHide(true);
}
setTimeout(function(){setIsSpin(false);},500);
}).catch(error=>{setIsSpin(false);})
@ -116,7 +158,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])
@ -146,7 +188,8 @@ function CoderDepot(props){
setLastCommit(c && c.commit);
setLastCommitAuthor(c && c.committer);
setMainFlag(false);
setReadOnly(true);
setReadOnly(!editReadme);
setHide(true);
}
setTimeout(function(){setIsSpin(false);},500)
}).catch(error=>{setIsSpin(false);})
@ -154,17 +197,22 @@ function CoderDepot(props){
//
function changeBranch(value){
let url = `/projects/${owner}/${projectsId}${value && `/tree/${value}`}${treeValue ? `/${treeValue}`:""}`;
let checkvalue = turnbar(value);
let url = `/projects/${owner}/${projectsId}${value && `/tree/${checkvalue}`}${treeValue ? `/${treeValue}`:""}`;
props.history.push(url);
}
//
const fileMenu =(
function fileMenu(){
let b = branchName || defaultBranch;
let checkvalue = turnbar(b);
return (
<Menu>
<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.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>
)
)
}
function getPathUrl(array,index){
if(array && array.length>0 && index){
@ -179,26 +227,35 @@ function CoderDepot(props){
function returnMain(){
setTreeValue(undefined);
let branch = branchName || defaultBranch;
props.history.push(`/projects/${owner}/${projectsId}/tree/${branch}`);
let checkvalue = turnbar(branch);
props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}`);
};
//
function returnUlr(url){
props.history.push(`/projects/${owner}/${projectsId}/tree${branchName?`/${branchName}`:""}/${url}`);
let enBranch = turnbar(branchName);
props.history.push(`/projects/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
}
//
function goToSubRoot(path,type,filename){
setType(type);
props.history.push(`/projects/${owner}/${projectsId}${`/tree/${branchName || defaultBranch}`}${path?`/${path}`:""}`);
if(type!=="submodule"){
let enBranch = branchName || defaultBranch;
let checkvalue = turnbar(enBranch);
setType(type);
props.history.push(`/projects/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`);
}
}
function onEdit(readOnly){
setReadOnly(readOnly);
setEditReadme(false);
}
function ChangeFile(path, readOnly){
//
props.history.push(`/projects/${owner}/${projectsId}/tree/${branchName || defaultBranch}/${path}`);
let enBranch = branchName || defaultBranch;
let checkvalue = turnbar(enBranch);
props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}/${path}`);
setType("file");
setReadOnly(readOnly);
setEditReadme(true);
};
function changeHide(hide){
@ -214,17 +271,12 @@ function CoderDepot(props){
}
const downloadMenu = (
<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>
<CloneAddress
http_url={projectDetail && projectDetail.clone_url}
ssh_url = {projectDetail && projectDetail.ssh_url}
zip_url={zip_url}
tar_url={tar_url}
showNotification={props.showNotification}/>
)
// website
function okUpdate(d,w,l){
@ -243,8 +295,8 @@ function CoderDepot(props){
const mdFlag = n && n.substring(n.length-3,n.length) === ".md";
const { current_user } = props;
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && (projectDetail.permission !=="Reporter" || (current_user && current_user.admin));
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));
return(
<WhiteBack>
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
@ -306,15 +358,21 @@ function CoderDepot(props){
</AlignCenter>
</AlignCenter>
<AlignCenter>
<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>
{
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>
}
{ 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>
}
@ -331,11 +389,15 @@ 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 hide" :"ellipsistxt"}><pre id="ptxt">{lastCommit && lastCommit.message}</pre></div>
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"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`} 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/branch/${turnbar(branchName || defaultBranch)}`} className="ml12 color-grey-9">
<i className="iconfont icon-tijiao mr3 font-17 color-grey-9"></i>{commitCount}次提交
</Link>:"" }
</div>
}
<ul className="listtablebody">
@ -417,12 +479,19 @@ 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"}}>{lesson_url}</a>
<a href={lesson_url} target="_blank" className="color-grey-6" style={{textDecoration:"underline",wordBreak:"break-all"}}>{lesson_url}</a>
</div>
}
{/* 发布 */}
@ -430,7 +499,14 @@ function CoderDepot(props){
projectDetail && projectDetail.release_versions &&
<React.Fragment>
<Divider />
<Releases owner={owner} projectsId={projectsId} releaseVersions={projectDetail.release_versions} history={props.history}/>
<Releases
owner={owner}
projectsId={projectsId}
releaseVersions={projectDetail.release_versions}
history={props.history}
baseOperate={baseOperate}
projectType={projectDetail.type}
/>
</React.Fragment>
}
{/* 贡献者 */}

View File

@ -2,12 +2,18 @@ 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)}>
<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 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>
</span>
<span title="init project">

View File

@ -1,5 +1,6 @@
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.$;
@ -47,11 +48,16 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
}
return(
<div className="commonBox" id="readme">
<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>
<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>
{
operate ?
<a className="ml20 pull-right" onClick={() =>ChangeFile(readme && readme.path, false)}>

View File

@ -6,12 +6,18 @@ 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])
@ -32,7 +38,7 @@ export default ((props)=>{
return(
<li key={key}>
<div>
<Link to={`/projects/${owner}/${projectsId}/tree/${item.name}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
<Link to={`/projects/${owner}/${projectsId}/tree/${turnbar(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>
@ -40,7 +46,10 @@ export default ((props)=>{
</p>
</div>
<span>
<Link to={`/projects/${owner}/${projectsId}/pulls/new/${item.name}`} className="mr20 color-blue mr30">创建合并请求</Link>
{
(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
<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>
@ -64,6 +73,7 @@ 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,12 +2,19 @@ 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)
@ -56,11 +63,12 @@ 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:branch,
sha:returnbar(branch),
page,
limit
}
@ -105,7 +113,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 = branchName || defaultBranch;
let branch = returnbar(branchName || defaultBranch);
return(
<React.Fragment>
<div className={"main"}style={{padding:"0px",border:"none"}}>
@ -132,10 +140,10 @@ class CoderRootCommit extends Component{
commitDatas && commitDatas.length > 0 && commitDatas.map((item,k)=>{
return(
<div key={k}>
<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>
<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 mt15">
{
item.id ?

View File

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

View File

@ -102,6 +102,11 @@ 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,9 +1,8 @@
import React, { Component } from 'react';
import { Spin, Tooltip , message } from 'antd';
import { Spin, Tooltip , Button } from 'antd';
import { Link, Route, Switch } from 'react-router-dom';
import { Content , FlexAJ } from '../Component/layout';
import { Content , AlignTop } from '../Component/layout';
import DetailBanner from './sub/DetailBanner';
import Invite from './sub/Invite';
import '../css/index.scss'
import './list.css';
@ -177,6 +176,7 @@ class Detail extends Component {
firstSync:false,
secondSync:false,
open_devops:false,
forkSpin:false,
// 默认分支
defaultBranch:undefined,
@ -359,6 +359,9 @@ 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`;
@ -367,8 +370,13 @@ 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 => {
console.log(error);
this.setState({
forkSpin:false
})
})
}
@ -391,12 +399,13 @@ 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">
<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>
<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>
<span> / </span>
<Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6">{fork_info.fork_form_name}</Link>
<Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6 task-hide flex1" style={{maxWidth:"400px"}} title={fork_info.fork_form_name}>{fork_info.fork_form_name}</Link>
</div> : ""
}
@ -405,7 +414,7 @@ class Detail extends Component {
const { projectDetail, watchers_count, praises_count,
forked_count, firstSync , secondSync ,
isManager, watched, praised,
project , open_devops , platform , defaultBranch , bannerList } = this.state;
project , open_devops , platform , defaultBranch , bannerList , forkSpin } = this.state;
const url = this.props.history.location.pathname;
const urlArr = url.split("/");
const urlFlag = (urlArr.length === 3);
@ -425,102 +434,91 @@ class Detail extends Component {
<div>
<div className="detailHeader-wrapper">
<div className="normal">
<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>
<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.type && projectDetail.type !== 0 ?
projectDetail.type === 2 ?
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
<i className="iconfont icon-banbenku font-18 mt6" style={{ color: "#8D90E3" }}/>
</Tooltip>
:
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
<i className="iconfont icon-jingxiang font-18 color-green mt6" />
</Tooltip>
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
:""
}
</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> : ""
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>
:""
}
<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>
</div>
<div>
{
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
:""
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>
}
</div>
{
projectDetail && projectDetail.invite_code &&
<Invite code={projectDetail.invite_code} />
}
</FlexAJ>
</AlignTop>
{
firstSync ? "" :
<DetailBanner

View File

@ -102,7 +102,6 @@
}
}
}
// coderDepot
.Panels{
max-width: 1200px;
@ -201,35 +200,39 @@
.listtablehead{
display: flex;
justify-content: space-between;
align-items: center;
align-items: flex-start;
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;
&>p{
word-break:break-all;
}
&.hide{
&.hidetxt{
height: 18px;
overflow: hidden;
position: relative;
padding-right:8px;
}
&.hide::after{
position: absolute;
right: 0px;
bottom: 0px;
content:"...";
&::after{
position: absolute;
right: 0px;
bottom: 0px;
content:"...";
}
}
}
.ellipsis{
@ -316,6 +319,7 @@
}
}
.downMenu{
width: 330px;
box-shadow: 0px 0px 9px rgba(134, 134, 134,0.4);
background-color: #fff;
.ant-menu-vertical .ant-menu-item:hover{
@ -341,4 +345,29 @@
.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,9 +35,10 @@ class IndexItem extends Component {
<div className="p-r-Infos">
<div className="p-r-name">
<AlignCenter>
<Link to={`/projects/${item.author.login}/${item.identifier}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 490 }}>
<Link to={`/projects/${item.author.login}/${item.identifier}`} title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
{item.author.name}/{item.name}
</Link>
{ !item.is_public && <span className="privateTag">私有</span> }
{
item.forked_from_project_id ?
<span className="ml5">
@ -59,8 +60,18 @@ class IndexItem extends Component {
}
</AlignCenter>
<span className="p-r-tags">
<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>
{
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>
</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.css"
import "../Branch/branch.scss"

View File

@ -264,7 +264,10 @@
border:1px solid #f1f1f1;
display: flex;
align-items: center;
margin-left: 30px
margin-left: 30px;
padding:0px;
background-color: transparent;
box-shadow: none;
}
.ant-tooltip {
max-width: fit-content!important;
@ -564,6 +567,10 @@
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,7 +1,8 @@
import React from 'react';
import { Tooltip , message } from 'antd';
import './sub.scss';
function Invite({code}) {
function Invite({code,className}) {
function jsCopy(id) {
const copyEle = document.querySelector(id); //
@ -13,11 +14,14 @@ function Invite({code}) {
message.success('复制成功');
}
return(
<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 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>
)
}

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,4 +22,9 @@
height: 20px;
line-height: 20px;
}
}
.detailsCode{
display: flex;
justify-content: space-between;
}

View File

@ -5,6 +5,12 @@ 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);
@ -43,7 +49,7 @@ class MergeItem extends Component {
};
render() {
const { issues, project_name, project_author_name } = this.props;
const { issues, project_name, project_author_name , user_admin_or_member} = this.props;
const { projectsId , owner } = this.props.match.params;
const { current_user } = this.props;
const renderList = () => {
@ -99,33 +105,43 @@ class MergeItem extends Component {
</span>
<span className="color-grey-8">{item.pr_time}</span>
<span className="ml15">
<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>
{
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>
}
</span>
</AlignCenter>
</p>
@ -167,7 +183,7 @@ class MergeItem extends Component {
) : (
""
)}
{current_user && current_user.login ? (
{user_admin_or_member && item.pull_request_status === 0 ? (
<div
className="milepostleft"
style={{

View File

@ -24,6 +24,12 @@ 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);
@ -41,6 +47,7 @@ class MessageCount extends Component {
edit_spin: false,
pr_status: undefined,
pull_request:undefined,
conflict_files:[],
copyVisible:false,
};
@ -75,7 +82,8 @@ 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
pull_request:result.data.pull_request,
conflict_files:result.data.conflict_files
});
} else {
this.setState({ SpinFlag: false });
@ -102,6 +110,8 @@ class MessageCount extends Component {
isSpin: false,
pr_status: 2,
});
const { getDetail } = this.props;
getDetail && getDetail();
} else {
this.setState({
isSpin: false,
@ -138,6 +148,8 @@ class MessageCount extends Component {
SpinMerge: false,
pr_status: 1,
});
const { getDetail } = this.props;
getDetail && getDetail();
} else {
this.setState({ SpinMerge: false });
}
@ -259,13 +271,28 @@ class MessageCount extends Component {
</div>
)
}
mergeabledDesc=(base,head)=>{
mergeabledDesc=(base,head,conflict_files)=>{
return(
<ul id="descContent">
<li>git fetch origin</li>
<li>git checkout -b {`${base}`} origin/{`${base}`}</li>
<li>git merge {`${head}`}</li>
</ul>
<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>
)
}
@ -280,7 +307,8 @@ class MessageCount extends Component {
ismesrge,
SpinFlag,
copyVisible,
pull_request
pull_request,
conflict_files
} = this.state;
const { current_user, projectDetail } = this.props;
const menu = (
@ -333,10 +361,10 @@ class MessageCount extends Component {
<div className="mt15">
<Tag className="pr-branch-tag">
<Link
to={`/projects/${owner}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${data.pull_request.head}`}
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)}`}
className="ver-middle"
>
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}:{data.pull_request.head}
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: {turnbar(data.pull_request && data.pull_request.head)}
</Link>
</Tag>
<span className="mr8 ver-middle">
@ -471,17 +499,16 @@ class MessageCount extends Component {
: !ismesrge ? "block" : "none",
}}
>
<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>
<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>
{pull_request && pull_request.mergeable
?
<Alert
@ -492,7 +519,7 @@ class MessageCount extends Component {
<Alert
message={this.mergeabledMes()}
type="error"
description={this.mergeabledDesc(pull_request.base,pull_request.head)}
description={this.mergeabledDesc(pull_request.base,pull_request.head,conflict_files)}
showIcon
/>
}

View File

@ -42,9 +42,10 @@ 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,"master","master");
this.compareProject(this.state.id,pull,"master");
}
}
// 页面销毁取消监听
@ -78,7 +79,8 @@ class NewMerge extends Component {
this.set_default_pull(result.data.branches);
this.set_default_merge(result.data.merge_projects);
}
this.compareProject(result.data.id,"master","master");
const { pull } = this.state;
this.compareProject(result.data.id,pull||"master","master");
this.setState({isSpin: false})
})
.catch((error) => {
@ -105,6 +107,18 @@ 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
})
@ -143,7 +157,7 @@ class NewMerge extends Component {
merge:"master"
})
}
this.ischeckmerge();
// this.ischeckmerge();
}
}
@ -169,7 +183,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}`)
@ -199,7 +213,6 @@ 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: undefined,
status_type: "1",
//设置选择高亮
openselect: 1,
closeselect: undefined,
@ -48,7 +48,7 @@ class merge extends Component {
paix: "排序",
priority_ids: "优先级",
select_params: {
status_type: undefined, //开启中和关闭中,默认为开启中的
status_type: "1", //开启中和关闭中,默认为开启中的
assigned_to_id: undefined, // 指派人
fixed_version_id: undefined,
priority_id: undefined,
@ -155,18 +155,14 @@ class merge extends Component {
renderMenu = (array, name, id) => {
return (
<Menu>
<Menu className="orderCondition">
<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 (
<Menu.Item
key={item.id}
onClick={(e) => this.getOption(e, id, item.name)}
>
((!item.permission) || (item.permission && item.permission !== "Reporter")) &&
<Menu.Item key={item.id} onClick={(e) => this.getOption(e, id, item.name)}>
{item.name}
</Menu.Item>
);
@ -207,23 +203,16 @@ class merge extends Component {
paix: "排序",
priority_ids: "优先级",
});
this.state.select_params = {
status_type: type,
search: undefined,
page: 1,
limit: 15,
};
this.state.select_params.status_type = type;
this.state.select_params.page=1;
this.state.select_params.limit=15;
this.getIssueList();
};
islogin() {
checkOperation() {
const { projectsId,owner } = this.props.match.params;
if (this.props.checkIfLogin() === false) {
this.props.showLoginDialog();
return;
} else {
this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new`);
}
this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new`);
}
render() {
const { projectsId , owner } = this.props.match.params;
@ -265,9 +254,12 @@ class merge extends Component {
style={{ width: 300 }}
/>
</div>
<a className="topWrapper_btn ml10" onClick={() => this.islogin()}>
+&nbsp;新建合并请求
</a>
{
data && data.user_admin_or_member &&
<a className="topWrapper_btn ml10" onClick={() => this.checkOperation()}>
+&nbsp;新建合并请求
</a>
}
</div>
<div className="f-wrap-between screenWrap">
<div className="df">
@ -404,6 +396,7 @@ 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="标题" />)}
})(<Input placeholder="标题" maxLength={50} />)}
</Form.Item>
<MDEditor
placeholder={"请输入合并请求的描述..."}
@ -346,19 +346,21 @@ class MergeForm extends Component {
</Select>
)}
</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>
{/* <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> */}
</div>
</div>
</div>

View File

@ -68,24 +68,30 @@ 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
})
owner && this.setState({
owners_id:owner[0].id,
owners_name:owner[0].name
}else if(user_id){
owner = owner.filter(item=>item.id === user_id);
this.props.form.setFieldsValue({
user_id:owner && owner[0].name
})
}
this.setOptionsList(owner, 'owners');
this.setState({
OwnerList: owner,
owner && this.setState({
owners_id:owner[0].id,
owners_name:owner[0].name
})
this.setOptionsList(owner, 'owners');
}
}).catch(error=>{})
}
@ -175,14 +181,12 @@ class Index extends Component {
ignore_id,
user_id:owners_id
}).then((result) => {
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}`);
}
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}`);
}
}).catch((error) => {
this.setState({

View File

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

View File

@ -6,6 +6,20 @@ 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);
@ -16,6 +30,24 @@ class UserSubmitComponent extends Component {
};
}
componentDidMount=()=>{
const { descName } = this.props;
if(descName){
this.props.form.setFieldsValue({
desc:descName
})
}
}
componentDidUpdate=(preProps)=>{
const { descName } = this.props;
if(preProps && descName && preProps.descName !== descName ){
this.props.form.setFieldsValue({
desc:descName
})
}
}
changeSubmittype = (e) => {
this.setState({
submitType: e.target.value,
@ -41,7 +73,7 @@ class UserSubmitComponent extends Component {
const url = `/${owner}/${projectsId}/create_file.json`;
axios.post(url, {
filepath: filename ? filename : path,
branch: branch,
branch: returnbar(branch),
new_branch: submitType === "1" ? values.branchname : undefined,
content,
message: values.desc,
@ -54,7 +86,7 @@ class UserSubmitComponent extends Component {
const { getTopCount } = this.props;
getTopCount && getTopCount(values.branchname);
}
let url = `/projects/${owner}/${projectsId}${values.branchname ? `/tree/${values.branchname}`: (branch ? `/tree/${branch}` : "")}`;
let url = `/projects/${owner}/${projectsId}${values.branchname ? `/tree/${turnbar(values.branchname)}`: (branch ? `/tree/${turnbar(branch)}` : "")}`;
this.props.history.push(url);
}
})
@ -75,12 +107,13 @@ 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 : (currentBranch || branch),
branch: submitType === "1" ? undefined : returnbar(b),
new_branch: submitType === "1" ? values.branchname : undefined,
content: content,
sha: detail.sha,
@ -89,7 +122,8 @@ class UserSubmitComponent extends Component {
.then((result) => {
this.setState({ isSpin: false });
if (result.data && result.data.status === 1) {
let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/tree/${values.branchname}` : ((currentBranch || branch) ? `/tree/${currentBranch || branch}`:""))}`;
let b = currentBranch || branch;
let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/tree/${turnbar(values.branchname)}` : (b ? `/tree/${turnbar(b)}`:""))}`;
this.props.history.push(url);
this.props.showNotification("文件修改成功!");
}
@ -112,6 +146,7 @@ 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" }}>
@ -170,7 +205,7 @@ class UserSubmitComponent extends Component {
>
<Radio value="0" className="mb10">
<i className="iconfont icon-banbenku font-16 mr5"></i>
直接提交至<span className="color-orange">{currentBranch || branch}</span>
直接提交至<span className="color-orange">{returnbar(b)}</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 } = this.props;
const { readOnly, editorType, language , currentBranch , descName } = this.props;
const editor_options = {
lineNumbers: "on",
wordWrap: true, //强制换行
@ -72,6 +72,7 @@ class m_editor extends Component {
content={editorValue}
editor_type={editorType}
currentBranch={currentBranch}
descName={descName}
></UserSubmitComponent>
</div>
)}

View File

@ -60,6 +60,7 @@ 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"){
setApplyCount(applyCount-count);
setTransferCount(transferCount-count);
}else if(type==="undo"){
setTransferCount(applyCount-count);
setApplyCount(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("undo",1);
props && props.deleteEvent("apply",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">
<span className="pull-right 123123">
<a className="color-blue fr" onClick={this.copydetail}>
复制
</a>

View File

@ -89,8 +89,9 @@ class Milepost extends Component {
closeselect: status === "closed" ? current_user.user_id : undefined,
openselect: status === "closed" ? undefined : current_user.user_id
})
this.getList(1, status, 'desc')
this.getList(1, status, 'desc');
const { getDetail } = this.props;
getDetail && getDetail();
}
}).catch(error => {
console.log(error);
@ -107,7 +108,9 @@ class Milepost extends Component {
}
}).then((result) => {
if (result) {
this.getList(1, this.state.status, 'desc')
this.getList(1, this.state.status, 'desc');
const { getDetail } = this.props;
getDetail && getDetail();
}
}).catch((error) => {
console.log(error);
@ -150,11 +153,11 @@ class Milepost extends Component {
const { data, limit, page, openselect, closeselect, spinings } = this.state;
const { projectsId , owner } = this.props.match.params;
const menu = (
<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 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.Item key={'issues_count'} value="desc">任务从多到少</Menu.Item>
<Menu.Item key={'issues_count'} value="asc">任务从少到多</Menu.Item>
</Menu>
@ -228,8 +231,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="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>
<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>
</div>
<div className="grid-item ml15 color-grey-9">
<i className="iconfont icon-lajitong font-14 mr5" ></i>

View File

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

View File

@ -42,10 +42,9 @@ class OrderItem extends Component {
})
}
render() {
const { item , checkbox , mile } = this.props;
const { item , checkbox , mile , user_admin_or_member } = this.props;
const { projectsId , owner } = this.props.match.params;
const { current_user } = this.props
const { current_user } = this.props;
return (
item &&
<div className="issueItem">
@ -91,13 +90,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>
{
current_user && current_user.login ?
<div style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}>
user_admin_or_member ?
<div id="hoverBox" 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" title={'您确定要删除吗'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
<Popconfirm placement="bottom" overlayClassName="overlayBox" getPopupContainer={()=>document.getElementById("hoverBox")} title={'您确定要删除当前易修'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
<i className="iconfont icon-yiguanbi1 font-14"></i>
</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,6 +64,8 @@ class NewMilepost extends Component {
if (result) {
this.setState({ isSpin: false })
this.props.history.push(`/projects/${owner}/${projectsId}/milestones`);
const { getDetail } = this.props;
getDetail && getDetail();
}
}).catch(error => {
this.setState({ isSpin: false })
@ -100,7 +102,7 @@ class NewMilepost extends Component {
required: true, message: '请输入标题'
}],
})(
<Input placeholder="标题" autoComplete="off"/>
<Input placeholder="标题" autoComplete="off" maxLength="30" />
)}
</Form.Item>
</div>
@ -111,7 +113,7 @@ class NewMilepost extends Component {
required: true, message: '请输入描述内容'
}],
})(
<TextArea placeholder="请输入描述内容..." style={{ height: "150px" }} />
<TextArea placeholder="请输入描述内容..." style={{ height: "150px" }} maxLength={500} />
)}
</Form.Item>

View File

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

View File

@ -201,7 +201,7 @@ class order extends Component {
renderMenu = (array, name, id, toGet) => {
return (
<Menu>
<Menu className="orderCondition">
<Menu.Item key={"all"} onClick={(e) => this.getOption(e, id, name, toGet)}>
{name}
</Menu.Item>
@ -268,11 +268,8 @@ class order extends Component {
checkedValue:[],
all:undefined
});
this.state.select_params = {
search: undefined,
page: 1,
limit: 15,
};
this.state.select_params.page = 1;
this.state.select_params.limit = 15;
this.getIssueList(type);
};
@ -337,6 +334,8 @@ class order extends Component {
const { status_type } = this.state;
this.getIssueList(status_type);
const { getDetail } = this.props;
getDetail && getDetail();
}
})
.catch((error) => {
@ -348,17 +347,14 @@ class order extends Component {
this.props.showLoginDialog();
}
renderNew =()=>{
const { projectsId , owner } = this.props.match.params;
if (this.props.checkIfLogin()) {
const { data } = this.state;
if(data && data.user_admin_or_member){
const { projectsId , owner } = this.props.match.params;
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>
)
}
}
@ -577,7 +573,7 @@ class order extends Component {
<div className="f-wrap-between screenWrap">
<div className="df">
{
current_user && current_user.login ?
((current_user && current_user.login) && (data && data.user_admin_or_member)) ?
<Checkbox value="0" style={{ lineHeight: "50px", marginRight: "15px" }} checked={all} onChange={this.changeAll}></Checkbox>
: ""
}
@ -822,13 +818,14 @@ class order extends Component {
<OrderItem
key={key}
item={item}
checkbox={current_user ? <Checkbox value={item.id} key={item.id} style={{ margin: '4px 15px 0px 0px' }}></Checkbox> : ""}
checkbox={current_user &&(data && data.user_admin_or_member) ? <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) {
if (result && result.data) {
this.setState({
issue_chosen: result.data.issue_chosen,
branches: result.data.branches,
branches: result.data.issue_chosen.branches,
isSpin:false
});
@ -193,13 +193,14 @@ class order_form extends Component {
if (result) {
this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`);
this.props.showNotification("任务更新成功!");
const { getDetail } = this.props;
getDetail && getDetail();
}
})
.catch((error) => {
this.setState({
isSpin: false,
});
console.log(error);
});
}
}

View File

@ -0,0 +1,68 @@
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

@ -0,0 +1,192 @@
.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.

After

Width:  |  Height:  |  Size: 900 B

View File

@ -0,0 +1,28 @@
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

@ -0,0 +1,59 @@
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

@ -0,0 +1,96 @@
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

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

View File

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

View File

@ -20,6 +20,14 @@ 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,
@ -65,6 +73,18 @@ 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" : ""
@ -103,8 +123,27 @@ class Index extends Component {
</ul>
</Short>
<Long>
<Gap className="list-r-Info">
<Gap>
<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,13 +30,15 @@ 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 = () => {
@ -75,6 +77,7 @@ class Setting extends Component {
project_units:units
});
this.setState({
projectName:result.data.project_name,
private_check: result.data.private,
loading:false,
project_units:units,
@ -169,10 +172,11 @@ class Setting extends Component {
// 删除本仓库
deleteProject = () => {
const { projectsId , owner } = this.props.match.params;
const { projectName } = this.state;
this.props.confirm({
content: "删除后无法恢复,是否确认删除本仓库?",
content: <span style={{display:"block",textAlign:"left"}}>该操作无法撤销且将会一并删除相关的易修合并请求工作流里程碑动态等数据<br/>是否确认删除 <span style={{fontWeight:"bold"}}>{owner}/{projectName}({projectsId})</span></span>,
onOk: () => {
const { projectsId , owner } = this.props.match.params;
const url = `/${owner}/${projectsId}.json`;
axios
.delete(url)
@ -233,6 +237,7 @@ 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
@ -265,8 +270,12 @@ 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

@ -0,0 +1,113 @@
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

@ -0,0 +1,171 @@
.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

@ -0,0 +1,337 @@
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.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

View File

@ -0,0 +1,82 @@
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

@ -0,0 +1,144 @@
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="标签名字" maxLength="20" />)}
})(<Input placeholder="名称10字以内" maxLength="10" />)}
</Form.Item>
<Form.Item className="inputcount">
@ -507,8 +507,8 @@ class NewTags extends Component {
>
<div className="dialogdiv">
<Input
placeholder="标签名字"
maxLength="20"
placeholder="称,10以内"
maxLength="10"
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,6 +58,9 @@ 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) => {
@ -74,7 +77,10 @@ class version extends Component {
<div className="versionInfo_right">
<span className="versionName">
<span className="task-hide">{item.name}</span>
<Link to={`/projects/${owner}/${projectsId}/releases/${item.version_id}/update`} className="color-blue ml3 font-12">编辑</Link>
{
(isManager || isDeveloper) && type !==2 &&
<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>
@ -100,14 +106,14 @@ class version extends Component {
render() {
const { projectsId ,owner } = this.props.match.params;
const { data , releases , isSpin } = this.state
const { data , releases , isSpin } = this.state;
const type = this.props.projectDetail && this.props.projectDetail.type;
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 ?
data && data.user_permission && type !== 2 ?
<Link to={`/projects/${owner}/${projectsId}/releases/new`} className="topWrapper_btn_new">+ 发布新版</Link>
: ''
}

View File

@ -7,6 +7,18 @@ 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;
@ -74,6 +86,14 @@ 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;
@ -237,4 +257,17 @@ 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,6 +105,7 @@ $flex:flex;
word-break: break-all;
text-align: justify;
font-size: 16px;
text-align: center;
}
.focusBox,.infoBox{
width: 100%!important;
@ -148,12 +149,12 @@ $flex:flex;
i{
font-size: 25px!important;
border-radius: 50%;
background-color: #fff;
&.icon-nan{
color: #1890FF;
color: #fff;
&.icon-nan1{
background-color: #1890FF;
}
&.icon-nv{
color: pink;
&.icon-nv1{
background-color: pink;
}
}
}

View File

@ -207,9 +207,9 @@ class Infos extends Component {
<span>
{
user && user.gender===1?
<i className="iconfont icon-nan"></i>
<i className="iconfont icon-nan1"></i>
:
<i className="iconfont icon-nv"></i>
<i className="iconfont icon-nv1"></i>
}
</span>
</span>
@ -285,7 +285,11 @@ 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><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>
{undo_events && undo_events >0 ? <span className="menuNum">({undo_events})</span>:""}</Link>
</Menu.Item>
:""
}
{
@ -293,7 +297,12 @@ 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><span className="menuNum">({user && 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>
{ user && user.user_org_count && user.user_org_count > 0 ? <span className="menuNum">({user.user_org_count})</span>:""}
</Link>
</Menu.Item>
</Menu>
}
{user && (

View File

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

View File

@ -477,9 +477,6 @@ 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,9 +325,6 @@ 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,10 +1158,6 @@ body #root {
position: absolute;
}
.ant-input,
.ant-input .ant-input-suffix {
background-color: #fafafa !important;
}
.ant-input:focus,
.ant-input:focus .ant-input-suffix {
@ -1479,9 +1475,6 @@ 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