forked from Gitlink/forgeplus-react
Compare commits
76 Commits
master
...
pre_develo
Author | SHA1 | Date |
---|---|---|
|
ab85e3972f | |
|
657bfbc6df | |
|
7e1dde4ecd | |
![]() |
3d6136bbbb | |
|
b6ed5d79e7 | |
![]() |
21ce83e537 | |
|
03a8e79382 | |
![]() |
3fce9a99ad | |
![]() |
db18cd41b0 | |
![]() |
7fb7dbe687 | |
|
5e58f349cd | |
|
4e08bf6fe3 | |
![]() |
bc8e513b97 | |
![]() |
4621a75ec8 | |
|
17671a7c87 | |
|
47ecda06ca | |
|
ebd94ed3a1 | |
![]() |
d1128a0dfc | |
|
47f5d98d79 | |
|
a5bdf26f96 | |
|
f6a0c3b33f | |
|
9d2dc3426c | |
![]() |
5abe75d637 | |
|
9e14821125 | |
|
2f3f33d58e | |
![]() |
43b31427d8 | |
|
03d568f5f7 | |
|
24c4c746cd | |
|
3fc0737e43 | |
|
4f39f03b19 | |
![]() |
b475edae74 | |
![]() |
dbb5efdcd5 | |
![]() |
322260c3fc | |
![]() |
375ad38364 | |
|
ef6f334d94 | |
|
559b797c2e | |
![]() |
adc134ec44 | |
![]() |
bf3f404238 | |
|
9b62b3b047 | |
![]() |
c14f06301f | |
![]() |
105e1c61b8 | |
|
80dde2bc97 | |
![]() |
3b03ead3af | |
![]() |
86f50d4278 | |
|
bddc0f2f91 | |
|
30a141c92e | |
![]() |
58115f8dae | |
|
9655cd5105 | |
|
01b3ee8d49 | |
|
662a758980 | |
|
358d236034 | |
|
1ea61fe7ab | |
|
0b64631222 | |
|
eb02b814a9 | |
|
ca9a606e53 | |
|
8adf7f8de6 | |
|
349c2a6f35 | |
|
f096d6db6e | |
|
492e8e067f | |
|
95ae2bbd46 | |
![]() |
a1b5395b8c | |
![]() |
dee7b23f3e | |
![]() |
f7dd67d41a | |
![]() |
e7fd980116 | |
![]() |
d8ab7c0759 | |
![]() |
d64eb738f7 | |
|
55080f93c1 | |
|
e606147d03 | |
![]() |
7851785335 | |
|
52e08e77e5 | |
|
fcac8c782a | |
|
061fa0ee71 | |
|
5d465ec782 | |
|
39fef1ce3c | |
|
d1a3c7b9c3 | |
|
ba263a28f1 |
1190
.idea/workspace.xml
1190
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
|
@ -19,7 +19,8 @@ const getClientEnvironment = require("./env");
|
|||
|
||||
let publicPath = "/react/build/";
|
||||
const publicUrl = publicPath.slice(0, -1);
|
||||
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
|
||||
// const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
|
||||
const shouldUseSourceMap = process.env.NODE_ENV !== "production";
|
||||
const env = getClientEnvironment(publicPath);
|
||||
|
||||
// This is the production configuration.
|
||||
|
@ -54,7 +55,8 @@ module.exports = {
|
|||
},
|
||||
bail: true,
|
||||
mode: "production",
|
||||
devtool: false, //测试版
|
||||
// devtool: false, //测试版
|
||||
devtool: shouldUseSourceMap?'source-map':false,
|
||||
entry: [require.resolve("./polyfills"), paths.appIndexJs],
|
||||
output: {
|
||||
path: paths.appBuild,
|
||||
|
|
|
@ -1273,7 +1273,7 @@
|
|||
},
|
||||
"babel-cli": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-cli/download/babel-cli-6.26.0.tgz",
|
||||
"integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -1296,7 +1296,7 @@
|
|||
"dependencies": {
|
||||
"chokidar": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-1.7.0.tgz?cache=0&sync_timestamp=1602585438968&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-1.7.0.tgz",
|
||||
"integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -1314,7 +1314,7 @@
|
|||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"dev": true
|
||||
}
|
||||
|
@ -1413,7 +1413,7 @@
|
|||
},
|
||||
"babel-helper-bindify-decorators": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-helper-bindify-decorators/download/babel-helper-bindify-decorators-6.24.1.tgz",
|
||||
"integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -1476,7 +1476,7 @@
|
|||
},
|
||||
"babel-helper-explode-class": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-helper-explode-class/download/babel-helper-explode-class-6.24.1.tgz",
|
||||
"integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -1676,7 +1676,7 @@
|
|||
},
|
||||
"babel-plugin-syntax-async-generators": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-plugin-syntax-async-generators/download/babel-plugin-syntax-async-generators-6.13.0.tgz",
|
||||
"integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -1687,7 +1687,7 @@
|
|||
},
|
||||
"babel-plugin-syntax-decorators": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-plugin-syntax-decorators/download/babel-plugin-syntax-decorators-6.13.0.tgz",
|
||||
"integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -1723,7 +1723,7 @@
|
|||
},
|
||||
"babel-plugin-transform-async-generator-functions": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-plugin-transform-async-generator-functions/download/babel-plugin-transform-async-generator-functions-6.24.1.tgz",
|
||||
"integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -1755,7 +1755,7 @@
|
|||
},
|
||||
"babel-plugin-transform-decorators": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-plugin-transform-decorators/download/babel-plugin-transform-decorators-6.24.1.tgz",
|
||||
"integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -2060,7 +2060,7 @@
|
|||
},
|
||||
"babel-plugin-transform-runtime": {
|
||||
"version": "6.23.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-plugin-transform-runtime/download/babel-plugin-transform-runtime-6.23.0.tgz",
|
||||
"integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=",
|
||||
"requires": {
|
||||
"babel-runtime": "^6.22.0"
|
||||
|
@ -2077,7 +2077,7 @@
|
|||
},
|
||||
"babel-polyfill": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-polyfill/download/babel-polyfill-6.26.0.tgz",
|
||||
"integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
|
@ -2087,7 +2087,7 @@
|
|||
"dependencies": {
|
||||
"regenerator-runtime": {
|
||||
"version": "0.10.5",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.10.5.tgz?cache=0&sync_timestamp=1595456367497&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.10.5.tgz",
|
||||
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg="
|
||||
}
|
||||
}
|
||||
|
@ -2131,7 +2131,7 @@
|
|||
},
|
||||
"babel-preset-es2015": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-preset-es2015/download/babel-preset-es2015-6.24.1.tgz",
|
||||
"integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -2179,7 +2179,7 @@
|
|||
},
|
||||
"babel-preset-react": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-preset-react/download/babel-preset-react-6.24.1.tgz",
|
||||
"integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=",
|
||||
"requires": {
|
||||
"babel-plugin-syntax-jsx": "^6.3.13",
|
||||
|
@ -2212,7 +2212,7 @@
|
|||
},
|
||||
"babel-preset-stage-2": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-preset-stage-2/download/babel-preset-stage-2-6.24.1.tgz",
|
||||
"integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -2224,7 +2224,7 @@
|
|||
},
|
||||
"babel-preset-stage-3": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-preset-stage-3/download/babel-preset-stage-3-6.24.1.tgz",
|
||||
"integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -3507,7 +3507,7 @@
|
|||
},
|
||||
"code-prettify": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/code-prettify/-/code-prettify-0.1.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/code-prettify/download/code-prettify-0.1.0.tgz",
|
||||
"integrity": "sha1-RocMyMGlDQm61TmzOpg9vUqjSx4="
|
||||
},
|
||||
"codemirror": {
|
||||
|
@ -4885,7 +4885,7 @@
|
|||
},
|
||||
"dom-closest": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-closest/-/dom-closest-0.2.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/dom-closest/download/dom-closest-0.2.0.tgz",
|
||||
"integrity": "sha1-69n5HRvyLo1vR3h2u80+yQIWwM8=",
|
||||
"requires": {
|
||||
"dom-matches": ">=1.0.1"
|
||||
|
@ -4929,7 +4929,7 @@
|
|||
},
|
||||
"dom-matches": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-matches/-/dom-matches-2.0.0.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/dom-matches/download/dom-matches-2.0.0.tgz",
|
||||
"integrity": "sha1-0nKLQWqHUzmA6wibhI0lPPI6dYw="
|
||||
},
|
||||
"dom-scroll-into-view": {
|
||||
|
@ -5187,7 +5187,7 @@
|
|||
},
|
||||
"enquire.js": {
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/enquire.js/-/enquire.js-2.1.6.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/enquire.js/download/enquire.js-2.1.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenquire.js%2Fdownload%2Fenquire.js-2.1.6.tgz",
|
||||
"integrity": "sha1-PoeAybi4NQhMP2DhZtvDwqPImBQ="
|
||||
},
|
||||
"entities": {
|
||||
|
@ -5706,7 +5706,7 @@
|
|||
},
|
||||
"eventlistener": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/eventlistener/-/eventlistener-0.0.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/eventlistener/download/eventlistener-0.0.1.tgz",
|
||||
"integrity": "sha1-7Suqu4UiJ68rz4iRUscsY8pTLrg="
|
||||
},
|
||||
"events": {
|
||||
|
@ -7240,8 +7240,7 @@
|
|||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"optional": true
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
|
@ -7262,14 +7261,12 @@
|
|||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"optional": true
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -7284,20 +7281,17 @@
|
|||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"optional": true
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"optional": true
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||
"optional": true
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -7414,8 +7408,7 @@
|
|||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"optional": true
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -7427,7 +7420,6 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -7442,7 +7434,6 @@
|
|||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
|
@ -7450,14 +7441,12 @@
|
|||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"optional": true
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
|
||||
"integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -7476,7 +7465,6 @@
|
|||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz",
|
||||
"integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.5"
|
||||
}
|
||||
|
@ -7538,8 +7526,7 @@
|
|||
"npm-normalize-package-bin": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
|
||||
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==",
|
||||
"optional": true
|
||||
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
|
||||
},
|
||||
"npm-packlist": {
|
||||
"version": "1.4.8",
|
||||
|
@ -7567,8 +7554,7 @@
|
|||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"optional": true
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -7580,7 +7566,6 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -7658,8 +7643,7 @@
|
|||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"optional": true
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -7695,7 +7679,6 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
@ -7715,7 +7698,6 @@
|
|||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
@ -7759,14 +7741,12 @@
|
|||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"optional": true
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||
"optional": true
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -8040,7 +8020,7 @@
|
|||
},
|
||||
"hammerjs": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/hammerjs/download/hammerjs-2.0.8.tgz",
|
||||
"integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE="
|
||||
},
|
||||
"handle-thing": {
|
||||
|
@ -8881,7 +8861,7 @@
|
|||
},
|
||||
"immutable": {
|
||||
"version": "3.7.6",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/immutable/download/immutable-3.7.6.tgz",
|
||||
"integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks="
|
||||
},
|
||||
"import-fresh": {
|
||||
|
@ -10486,7 +10466,7 @@
|
|||
},
|
||||
"lodash.throttle": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/lodash.throttle/download/lodash.throttle-4.1.1.tgz",
|
||||
"integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ="
|
||||
},
|
||||
"lodash.uniq": {
|
||||
|
@ -11673,7 +11653,7 @@
|
|||
},
|
||||
"output-file-sync": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/output-file-sync/download/output-file-sync-1.1.2.tgz",
|
||||
"integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -19100,7 +19080,7 @@
|
|||
},
|
||||
"user-home": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz",
|
||||
"integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -19157,7 +19137,7 @@
|
|||
},
|
||||
"v8flags": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz",
|
||||
"resolved": "https://registry.npm.taobao.org/v8flags/download/v8flags-2.1.1.tgz?cache=0&sync_timestamp=1590964281452&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fv8flags%2Fdownload%2Fv8flags-2.1.1.tgz",
|
||||
"integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
|
|
@ -114,14 +114,6 @@ a:visited {
|
|||
color: #898989;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #FF7500;
|
||||
}
|
||||
|
||||
a:hover.fa {
|
||||
color: #FF7500;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
|
|
|
@ -97,10 +97,6 @@ a:visited {
|
|||
color: #05101a;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #459be5;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
li {
|
||||
|
|
|
@ -1364,7 +1364,7 @@ a:visited {
|
|||
}
|
||||
|
||||
a:hover {
|
||||
color: #459be5;
|
||||
color: #2A61FF!important;
|
||||
}
|
||||
|
||||
ol,
|
||||
|
@ -1473,7 +1473,7 @@ a.edu-txt-w80,
|
|||
|
||||
/*隐藏*/
|
||||
.none {
|
||||
display: none
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
.block {
|
||||
|
@ -2471,19 +2471,16 @@ a.hoverLine:hover{
|
|||
a.color-grey-name:hover,
|
||||
a.color-dark:hover,
|
||||
a.color-grey-6:hover,
|
||||
a.color-grey-3:hover {
|
||||
color: #4cacff !important;
|
||||
}
|
||||
|
||||
a.color-grey-9:hover,
|
||||
a.color-grey-8:hover,
|
||||
a.color-grey-c:hover {
|
||||
color: #111C24 !important;
|
||||
a.color-grey-3:hover,a.color-ooo:hover {
|
||||
color: #2A61FF !important;
|
||||
}
|
||||
|
||||
/*蓝色*/
|
||||
.color-blue {
|
||||
color: #4CACFF !important;
|
||||
color: #2A61FF !important;
|
||||
}
|
||||
.color-blue-file {
|
||||
color: #0054CC!important;
|
||||
}
|
||||
/* 绿色 */
|
||||
.color-green-file{
|
||||
|
@ -2494,10 +2491,6 @@ a.color-grey-c:hover {
|
|||
color: #4CACFF !important;
|
||||
}
|
||||
|
||||
a.color-blue:hover,
|
||||
a.color-blue_4C:hover {
|
||||
color: #459BE6 !important;
|
||||
}
|
||||
|
||||
/*橙色*/
|
||||
.color-orange {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2340181 */
|
||||
src: url('iconfont.woff2?t=1628841816999') format('woff2'),
|
||||
url('iconfont.woff?t=1628841816999') format('woff'),
|
||||
url('iconfont.ttf?t=1628841816999') format('truetype');
|
||||
src: url('iconfont.woff2?t=1630632852475') format('woff2'),
|
||||
url('iconfont.woff?t=1630632852475') format('woff'),
|
||||
url('iconfont.ttf?t=1630632852475') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -13,6 +13,146 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-gerenziliao1:before {
|
||||
content: "\e8c7";
|
||||
}
|
||||
|
||||
.icon-lichengbeiicon:before {
|
||||
content: "\e885";
|
||||
}
|
||||
|
||||
.icon-cangkushezhiicon:before {
|
||||
content: "\e889";
|
||||
}
|
||||
|
||||
.icon-dongtaiicon:before {
|
||||
content: "\e88a";
|
||||
}
|
||||
|
||||
.icon-gongzuoliuicon:before {
|
||||
content: "\e88b";
|
||||
}
|
||||
|
||||
.icon-yixiuicon1:before {
|
||||
content: "\e89b";
|
||||
}
|
||||
|
||||
.icon-a-wikiicon1:before {
|
||||
content: "\e8c6";
|
||||
}
|
||||
|
||||
.icon-daimakuicon1:before {
|
||||
content: "\e8c5";
|
||||
}
|
||||
|
||||
.icon-wodetongzhi:before {
|
||||
content: "\e8c8";
|
||||
}
|
||||
|
||||
.icon-tongzhiguanli:before {
|
||||
content: "\e8c9";
|
||||
}
|
||||
|
||||
.icon-xuanzhong3:before {
|
||||
content: "\e8ca";
|
||||
}
|
||||
|
||||
.icon-xitongtongzhiicon:before {
|
||||
content: "\e8cb";
|
||||
}
|
||||
|
||||
.icon-xiaoxi2:before {
|
||||
content: "\e8cc";
|
||||
}
|
||||
|
||||
.icon-sshmiyue:before {
|
||||
content: "\e8cd";
|
||||
}
|
||||
|
||||
.icon-gerenziliao:before {
|
||||
content: "\e8c4";
|
||||
}
|
||||
|
||||
.icon-xinshouzhiyin:before {
|
||||
content: "\e8e4";
|
||||
}
|
||||
|
||||
.icon-xinjianxiangmu:before {
|
||||
content: "\e8e6";
|
||||
}
|
||||
|
||||
.icon-jiaruketang1:before {
|
||||
content: "\e8e9";
|
||||
}
|
||||
|
||||
.icon-xiangmugonggao:before {
|
||||
content: "\e8c2";
|
||||
}
|
||||
|
||||
.icon-chengguo:before {
|
||||
content: "\e8c3";
|
||||
}
|
||||
|
||||
.icon-chengjiaogonggao:before {
|
||||
content: "\e8c0";
|
||||
}
|
||||
|
||||
.icon-jishuzichan:before {
|
||||
content: "\e8c1";
|
||||
}
|
||||
|
||||
.icon-feibiaogonggao:before {
|
||||
content: "\e8bc";
|
||||
}
|
||||
|
||||
.icon-zhongbiaogonggao:before {
|
||||
content: "\e8bd";
|
||||
}
|
||||
|
||||
.icon-gengzhenggonggao:before {
|
||||
content: "\e8be";
|
||||
}
|
||||
|
||||
.icon-zhaobiaogonggao:before {
|
||||
content: "\e8bf";
|
||||
}
|
||||
|
||||
.icon-wenjian6:before {
|
||||
content: "\e8ba";
|
||||
}
|
||||
|
||||
.icon-wenjianjia4:before {
|
||||
content: "\e8bb";
|
||||
}
|
||||
|
||||
.icon-quxiaoguanzhu:before {
|
||||
content: "\e89a";
|
||||
}
|
||||
|
||||
.icon-dianzan_icon:before {
|
||||
content: "\e8a2";
|
||||
}
|
||||
|
||||
.icon-wenjian5:before {
|
||||
content: "\e896";
|
||||
}
|
||||
|
||||
.icon-wenjianjia3:before {
|
||||
content: "\e8a9";
|
||||
}
|
||||
|
||||
.icon-fuzhiicon:before {
|
||||
content: "\e886";
|
||||
}
|
||||
|
||||
.icon-zhuye-fill:before {
|
||||
content: "\e876";
|
||||
}
|
||||
|
||||
.icon-daimakuicon:before {
|
||||
content: "\e884";
|
||||
}
|
||||
|
||||
.icon-xinjian2:before {
|
||||
content: "\e8b0";
|
||||
}
|
||||
|
@ -29,22 +169,6 @@
|
|||
content: "\e8a6";
|
||||
}
|
||||
|
||||
.icon-dianzan_icon:before {
|
||||
content: "\e8ba";
|
||||
}
|
||||
|
||||
.icon-quxiaoguanzhu:before {
|
||||
content: "\e8bb";
|
||||
}
|
||||
|
||||
.icon-daimakuicon:before {
|
||||
content: "\e8a9";
|
||||
}
|
||||
|
||||
.icon-zhuyeicon:before {
|
||||
content: "\e884";
|
||||
}
|
||||
|
||||
.icon-biaoqianicon:before {
|
||||
content: "\e882";
|
||||
}
|
||||
|
@ -53,14 +177,6 @@
|
|||
content: "\e883";
|
||||
}
|
||||
|
||||
.icon-cangkushezhiicon:before {
|
||||
content: "\e885";
|
||||
}
|
||||
|
||||
.icon-fuzhiicon:before {
|
||||
content: "\e886";
|
||||
}
|
||||
|
||||
.icon-lianjieicon:before {
|
||||
content: "\e887";
|
||||
}
|
||||
|
@ -69,18 +185,6 @@
|
|||
content: "\e888";
|
||||
}
|
||||
|
||||
.icon-lichengbeiicon:before {
|
||||
content: "\e889";
|
||||
}
|
||||
|
||||
.icon-gongzuoliuicon:before {
|
||||
content: "\e88a";
|
||||
}
|
||||
|
||||
.icon-dongtaiicon:before {
|
||||
content: "\e88b";
|
||||
}
|
||||
|
||||
.icon-morendianzan_icon:before {
|
||||
content: "\e88e";
|
||||
}
|
||||
|
@ -93,10 +197,6 @@
|
|||
content: "\e899";
|
||||
}
|
||||
|
||||
.icon-wenjian5:before {
|
||||
content: "\e89a";
|
||||
}
|
||||
|
||||
.icon-tijiaoicon:before {
|
||||
content: "\e89e";
|
||||
}
|
||||
|
@ -105,10 +205,6 @@
|
|||
content: "\e89f";
|
||||
}
|
||||
|
||||
.icon-wenjianjia3:before {
|
||||
content: "\e8a2";
|
||||
}
|
||||
|
||||
.icon-xialaanniu1:before {
|
||||
content: "\e8a4";
|
||||
}
|
||||
|
@ -193,10 +289,6 @@
|
|||
content: "\e898";
|
||||
}
|
||||
|
||||
.icon-weixuanzhongqingqiuicon:before {
|
||||
content: "\e89b";
|
||||
}
|
||||
|
||||
.icon-xiezuozheguanliicon:before {
|
||||
content: "\e8a1";
|
||||
}
|
||||
|
@ -241,10 +333,6 @@
|
|||
content: "\e875";
|
||||
}
|
||||
|
||||
.icon-fuzhi_icon:before {
|
||||
content: "\e876";
|
||||
}
|
||||
|
||||
.icon-shanchuicon:before {
|
||||
content: "\e877";
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,251 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "24059956",
|
||||
"name": "个人资料",
|
||||
"font_class": "gerenziliao1",
|
||||
"unicode": "e8c7",
|
||||
"unicode_decimal": 59591
|
||||
},
|
||||
{
|
||||
"icon_id": "24059409",
|
||||
"name": "里程碑icon",
|
||||
"font_class": "lichengbeiicon",
|
||||
"unicode": "e885",
|
||||
"unicode_decimal": 59525
|
||||
},
|
||||
{
|
||||
"icon_id": "24059410",
|
||||
"name": "仓库设置icon",
|
||||
"font_class": "cangkushezhiicon",
|
||||
"unicode": "e889",
|
||||
"unicode_decimal": 59529
|
||||
},
|
||||
{
|
||||
"icon_id": "24059411",
|
||||
"name": "动态icon",
|
||||
"font_class": "dongtaiicon",
|
||||
"unicode": "e88a",
|
||||
"unicode_decimal": 59530
|
||||
},
|
||||
{
|
||||
"icon_id": "24059412",
|
||||
"name": "工作流icon",
|
||||
"font_class": "gongzuoliuicon",
|
||||
"unicode": "e88b",
|
||||
"unicode_decimal": 59531
|
||||
},
|
||||
{
|
||||
"icon_id": "24059413",
|
||||
"name": "易修icon",
|
||||
"font_class": "yixiuicon1",
|
||||
"unicode": "e89b",
|
||||
"unicode_decimal": 59547
|
||||
},
|
||||
{
|
||||
"icon_id": "24059414",
|
||||
"name": "wiki icon",
|
||||
"font_class": "a-wikiicon1",
|
||||
"unicode": "e8c6",
|
||||
"unicode_decimal": 59590
|
||||
},
|
||||
{
|
||||
"icon_id": "24047186",
|
||||
"name": "代码库icon",
|
||||
"font_class": "daimakuicon1",
|
||||
"unicode": "e8c5",
|
||||
"unicode_decimal": 59589
|
||||
},
|
||||
{
|
||||
"icon_id": "24047189",
|
||||
"name": "我的通知",
|
||||
"font_class": "wodetongzhi",
|
||||
"unicode": "e8c8",
|
||||
"unicode_decimal": 59592
|
||||
},
|
||||
{
|
||||
"icon_id": "24047190",
|
||||
"name": "通知管理",
|
||||
"font_class": "tongzhiguanli",
|
||||
"unicode": "e8c9",
|
||||
"unicode_decimal": 59593
|
||||
},
|
||||
{
|
||||
"icon_id": "24047191",
|
||||
"name": "选中",
|
||||
"font_class": "xuanzhong3",
|
||||
"unicode": "e8ca",
|
||||
"unicode_decimal": 59594
|
||||
},
|
||||
{
|
||||
"icon_id": "24047192",
|
||||
"name": "系统通知icon",
|
||||
"font_class": "xitongtongzhiicon",
|
||||
"unicode": "e8cb",
|
||||
"unicode_decimal": 59595
|
||||
},
|
||||
{
|
||||
"icon_id": "24047193",
|
||||
"name": "消息",
|
||||
"font_class": "xiaoxi2",
|
||||
"unicode": "e8cc",
|
||||
"unicode_decimal": 59596
|
||||
},
|
||||
{
|
||||
"icon_id": "24047194",
|
||||
"name": "ssh密钥",
|
||||
"font_class": "sshmiyue",
|
||||
"unicode": "e8cd",
|
||||
"unicode_decimal": 59597
|
||||
},
|
||||
{
|
||||
"icon_id": "24014152",
|
||||
"name": "个人资料",
|
||||
"font_class": "gerenziliao",
|
||||
"unicode": "e8c4",
|
||||
"unicode_decimal": 59588
|
||||
},
|
||||
{
|
||||
"icon_id": "23655968",
|
||||
"name": "新手指引",
|
||||
"font_class": "xinshouzhiyin",
|
||||
"unicode": "e8e4",
|
||||
"unicode_decimal": 59620
|
||||
},
|
||||
{
|
||||
"icon_id": "23655969",
|
||||
"name": "新建项目",
|
||||
"font_class": "xinjianxiangmu",
|
||||
"unicode": "e8e6",
|
||||
"unicode_decimal": 59622
|
||||
},
|
||||
{
|
||||
"icon_id": "23658111",
|
||||
"name": "加入课堂",
|
||||
"font_class": "jiaruketang1",
|
||||
"unicode": "e8e9",
|
||||
"unicode_decimal": 59625
|
||||
},
|
||||
{
|
||||
"icon_id": "23791639",
|
||||
"name": "项目公告",
|
||||
"font_class": "xiangmugonggao",
|
||||
"unicode": "e8c2",
|
||||
"unicode_decimal": 59586
|
||||
},
|
||||
{
|
||||
"icon_id": "23791640",
|
||||
"name": "成果",
|
||||
"font_class": "chengguo",
|
||||
"unicode": "e8c3",
|
||||
"unicode_decimal": 59587
|
||||
},
|
||||
{
|
||||
"icon_id": "23791410",
|
||||
"name": "成交公告",
|
||||
"font_class": "chengjiaogonggao",
|
||||
"unicode": "e8c0",
|
||||
"unicode_decimal": 59584
|
||||
},
|
||||
{
|
||||
"icon_id": "23791411",
|
||||
"name": "技术资产",
|
||||
"font_class": "jishuzichan",
|
||||
"unicode": "e8c1",
|
||||
"unicode_decimal": 59585
|
||||
},
|
||||
{
|
||||
"icon_id": "23790928",
|
||||
"name": "废标公告",
|
||||
"font_class": "feibiaogonggao",
|
||||
"unicode": "e8bc",
|
||||
"unicode_decimal": 59580
|
||||
},
|
||||
{
|
||||
"icon_id": "23790929",
|
||||
"name": "中标公告",
|
||||
"font_class": "zhongbiaogonggao",
|
||||
"unicode": "e8bd",
|
||||
"unicode_decimal": 59581
|
||||
},
|
||||
{
|
||||
"icon_id": "23790930",
|
||||
"name": "更正公告",
|
||||
"font_class": "gengzhenggonggao",
|
||||
"unicode": "e8be",
|
||||
"unicode_decimal": 59582
|
||||
},
|
||||
{
|
||||
"icon_id": "23790931",
|
||||
"name": "招标公告",
|
||||
"font_class": "zhaobiaogonggao",
|
||||
"unicode": "e8bf",
|
||||
"unicode_decimal": 59583
|
||||
},
|
||||
{
|
||||
"icon_id": "23732532",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian6",
|
||||
"unicode": "e8ba",
|
||||
"unicode_decimal": 59578
|
||||
},
|
||||
{
|
||||
"icon_id": "23732533",
|
||||
"name": "文件夹",
|
||||
"font_class": "wenjianjia4",
|
||||
"unicode": "e8bb",
|
||||
"unicode_decimal": 59579
|
||||
},
|
||||
{
|
||||
"icon_id": "23642443",
|
||||
"name": "取消关注",
|
||||
"font_class": "quxiaoguanzhu",
|
||||
"unicode": "e89a",
|
||||
"unicode_decimal": 59546
|
||||
},
|
||||
{
|
||||
"icon_id": "23642444",
|
||||
"name": "点赞_icon",
|
||||
"font_class": "dianzan_icon",
|
||||
"unicode": "e8a2",
|
||||
"unicode_decimal": 59554
|
||||
},
|
||||
{
|
||||
"icon_id": "23639530",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian5",
|
||||
"unicode": "e896",
|
||||
"unicode_decimal": 59542
|
||||
},
|
||||
{
|
||||
"icon_id": "23639533",
|
||||
"name": "文件夹",
|
||||
"font_class": "wenjianjia3",
|
||||
"unicode": "e8a9",
|
||||
"unicode_decimal": 59561
|
||||
},
|
||||
{
|
||||
"icon_id": "23639440",
|
||||
"name": "复制icon",
|
||||
"font_class": "fuzhiicon",
|
||||
"unicode": "e886",
|
||||
"unicode_decimal": 59526
|
||||
},
|
||||
{
|
||||
"icon_id": "23639422",
|
||||
"name": "主页-fill",
|
||||
"font_class": "zhuye-fill",
|
||||
"unicode": "e876",
|
||||
"unicode_decimal": 59510
|
||||
},
|
||||
{
|
||||
"icon_id": "23639423",
|
||||
"name": "代码库icon",
|
||||
"font_class": "daimakuicon",
|
||||
"unicode": "e884",
|
||||
"unicode_decimal": 59524
|
||||
},
|
||||
{
|
||||
"icon_id": "23572260",
|
||||
"name": "新建",
|
||||
|
@ -33,34 +278,6 @@
|
|||
"unicode": "e8a6",
|
||||
"unicode_decimal": 59558
|
||||
},
|
||||
{
|
||||
"icon_id": "23492900",
|
||||
"name": "点赞_icon",
|
||||
"font_class": "dianzan_icon",
|
||||
"unicode": "e8ba",
|
||||
"unicode_decimal": 59578
|
||||
},
|
||||
{
|
||||
"icon_id": "23492901",
|
||||
"name": "取消关注",
|
||||
"font_class": "quxiaoguanzhu",
|
||||
"unicode": "e8bb",
|
||||
"unicode_decimal": 59579
|
||||
},
|
||||
{
|
||||
"icon_id": "23473151",
|
||||
"name": "代码库icon",
|
||||
"font_class": "daimakuicon",
|
||||
"unicode": "e8a9",
|
||||
"unicode_decimal": 59561
|
||||
},
|
||||
{
|
||||
"icon_id": "23473104",
|
||||
"name": "主页icon",
|
||||
"font_class": "zhuyeicon",
|
||||
"unicode": "e884",
|
||||
"unicode_decimal": 59524
|
||||
},
|
||||
{
|
||||
"icon_id": "23472253",
|
||||
"name": "标签icon",
|
||||
|
@ -75,20 +292,6 @@
|
|||
"unicode": "e883",
|
||||
"unicode_decimal": 59523
|
||||
},
|
||||
{
|
||||
"icon_id": "23472256",
|
||||
"name": "仓库设置icon",
|
||||
"font_class": "cangkushezhiicon",
|
||||
"unicode": "e885",
|
||||
"unicode_decimal": 59525
|
||||
},
|
||||
{
|
||||
"icon_id": "23472257",
|
||||
"name": "复制icon",
|
||||
"font_class": "fuzhiicon",
|
||||
"unicode": "e886",
|
||||
"unicode_decimal": 59526
|
||||
},
|
||||
{
|
||||
"icon_id": "23472258",
|
||||
"name": "链接icon",
|
||||
|
@ -103,27 +306,6 @@
|
|||
"unicode": "e888",
|
||||
"unicode_decimal": 59528
|
||||
},
|
||||
{
|
||||
"icon_id": "23472260",
|
||||
"name": "里程碑icon",
|
||||
"font_class": "lichengbeiicon",
|
||||
"unicode": "e889",
|
||||
"unicode_decimal": 59529
|
||||
},
|
||||
{
|
||||
"icon_id": "23472261",
|
||||
"name": "工作流icon",
|
||||
"font_class": "gongzuoliuicon",
|
||||
"unicode": "e88a",
|
||||
"unicode_decimal": 59530
|
||||
},
|
||||
{
|
||||
"icon_id": "23472262",
|
||||
"name": "动态icon",
|
||||
"font_class": "dongtaiicon",
|
||||
"unicode": "e88b",
|
||||
"unicode_decimal": 59531
|
||||
},
|
||||
{
|
||||
"icon_id": "23472263",
|
||||
"name": "默认点赞_icon",
|
||||
|
@ -145,13 +327,6 @@
|
|||
"unicode": "e899",
|
||||
"unicode_decimal": 59545
|
||||
},
|
||||
{
|
||||
"icon_id": "23472268",
|
||||
"name": "文件",
|
||||
"font_class": "wenjian5",
|
||||
"unicode": "e89a",
|
||||
"unicode_decimal": 59546
|
||||
},
|
||||
{
|
||||
"icon_id": "23472269",
|
||||
"name": "提交icon",
|
||||
|
@ -166,13 +341,6 @@
|
|||
"unicode": "e89f",
|
||||
"unicode_decimal": 59551
|
||||
},
|
||||
{
|
||||
"icon_id": "23472271",
|
||||
"name": "文件夹",
|
||||
"font_class": "wenjianjia3",
|
||||
"unicode": "e8a2",
|
||||
"unicode_decimal": 59554
|
||||
},
|
||||
{
|
||||
"icon_id": "23472272",
|
||||
"name": "下拉按钮",
|
||||
|
@ -320,13 +488,6 @@
|
|||
"unicode": "e898",
|
||||
"unicode_decimal": 59544
|
||||
},
|
||||
{
|
||||
"icon_id": "23144155",
|
||||
"name": "未选中请求icon",
|
||||
"font_class": "weixuanzhongqingqiuicon",
|
||||
"unicode": "e89b",
|
||||
"unicode_decimal": 59547
|
||||
},
|
||||
{
|
||||
"icon_id": "23144158",
|
||||
"name": "协作者管理icon",
|
||||
|
@ -404,13 +565,6 @@
|
|||
"unicode": "e875",
|
||||
"unicode_decimal": 59509
|
||||
},
|
||||
{
|
||||
"icon_id": "23046262",
|
||||
"name": "复制_icon",
|
||||
"font_class": "fuzhi_icon",
|
||||
"unicode": "e876",
|
||||
"unicode_decimal": 59510
|
||||
},
|
||||
{
|
||||
"icon_id": "23046268",
|
||||
"name": "删除icon",
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
249
src/App.js
249
src/App.js
|
@ -3,7 +3,7 @@ import './App.css';
|
|||
import { ConfigProvider } from 'antd'
|
||||
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
||||
import {
|
||||
BrowserRouter as Router,
|
||||
// BrowserRouter as Router,
|
||||
Route,
|
||||
Switch
|
||||
} from 'react-router-dom';
|
||||
|
@ -91,6 +91,10 @@ const ProjectIndex = Loadable({
|
|||
loader: () => import("./forge/Index"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
|
||||
const keyWord = ["explore", "settings", "setting", "CCF", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search"];
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
@ -100,6 +104,51 @@ class App extends Component {
|
|||
mydisplay: false,
|
||||
occupation: 0,
|
||||
mygetHelmetapi: null,
|
||||
pathType: null,
|
||||
pathName: null,
|
||||
}
|
||||
}
|
||||
|
||||
UNSAFE_componentWillMount() {
|
||||
initAxiosInterceptors(this.props);
|
||||
let pathname = window.location.pathname ? window.location.pathname.split('/')[1] : '';
|
||||
pathname && this.getPathnameType(pathname);
|
||||
|
||||
// 添加路由监听,决定组织还是个人
|
||||
this.unlisten = this.props.history.listen((location) => {
|
||||
let newPathname = location.pathname.split('/')[1];
|
||||
if (this.state.pathName !== newPathname) {
|
||||
// this.setState({ pathType: '' });
|
||||
newPathname && this.getPathnameType(newPathname);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
// (!keyWord.includes(this.props.location.pathname.split('/')[1])) &&
|
||||
if (nextProps.location.pathname.split('/')[1] !== this.props.location.pathname.split('/')[1] && nextState.pathType === this.state.pathType) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
getPathnameType = (pathname) => {
|
||||
if (!keyWord.includes(pathname)) {
|
||||
let url = `/owners/${pathname}.json`;
|
||||
axios.get(url).then((response) => {
|
||||
if (response && response.status === 200) {
|
||||
this.setState({
|
||||
pathType: response.data.type || '404',
|
||||
pathName: pathname,
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.setState({
|
||||
pathType: pathname,
|
||||
pathName: pathname,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,13 +168,19 @@ class App extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
document.title = "loading...";
|
||||
initAxiosInterceptors(this.props);
|
||||
|
||||
this.getAppdata();
|
||||
|
||||
window.addEventListener('error', (event) => {
|
||||
const msg = `${event.type}: ${event.message}`;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.unlisten && this.unlisten(); // 执行解绑
|
||||
}
|
||||
|
||||
//修改登录方法
|
||||
Modifyloginvalue = () => {
|
||||
this.setState({
|
||||
|
@ -196,7 +251,7 @@ class App extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { mygetHelmetapi } = this.state;
|
||||
const { mygetHelmetapi, pathType} = this.state;
|
||||
let personal = mygetHelmetapi && mygetHelmetapi.personal;
|
||||
return (
|
||||
<Provider store={store}>
|
||||
|
@ -204,87 +259,123 @@ class App extends Component {
|
|||
<MuiThemeProvider theme={theme}>
|
||||
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog>
|
||||
<SiderBar />
|
||||
<Router>
|
||||
<Switch>
|
||||
{/* wiki预览 */}
|
||||
<Route path="/projects/:owner/:projectsId/wiki/preview/:projectName/:projectId" render={
|
||||
{/* <Router> */}
|
||||
<Switch>
|
||||
{/* wiki预览 */}
|
||||
<Route path="/:owner/:projectsId/wiki/preview/:projectName/:projectId" render={
|
||||
(props) => {
|
||||
return (<WikiPreview {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
} />
|
||||
|
||||
{/*项目*/}
|
||||
<Route
|
||||
path={"/:owner/:projectId/devops/:opsId/detail"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<WikiPreview {...this.props} {...props} {...this.state} />)
|
||||
return (<OpsDetail {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
} />
|
||||
|
||||
{/*项目*/}
|
||||
<Route
|
||||
path={"/projects/:owner/:projectId/devops/:opsId/detail"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<OpsDetail {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
<Route
|
||||
path={"/settings"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Security {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
{/*项目*/}
|
||||
<Route
|
||||
path={"/projects"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Projects {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
<Route
|
||||
path="/register"
|
||||
render={
|
||||
(props) => {
|
||||
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
<Route
|
||||
path={"/settings"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Security {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
/>
|
||||
{/*403*/}
|
||||
<Route path="/403" component={Shixunauthority} />
|
||||
}>
|
||||
</Route>
|
||||
|
||||
<Route path="/500" component={http500} />
|
||||
<Route path={"/organize"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
{/*404*/}
|
||||
<Route path="/nopage" component={Shixunnopage} />
|
||||
|
||||
{/* 查询 */}
|
||||
<Route path="/search" component={Search} />
|
||||
|
||||
|
||||
{/* 个人主页 */}
|
||||
<Route path="/users/:username"
|
||||
render={
|
||||
(props) => {
|
||||
return (<InfosIndex {...this.props} {...this.state} />)
|
||||
}
|
||||
}></Route>
|
||||
<Route exact path="/"
|
||||
render={
|
||||
(props) => (
|
||||
personal && personal.length > 0 ?
|
||||
<InfosIndex {...this.props} {...props} />
|
||||
:
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
)
|
||||
<Route
|
||||
path="/register"
|
||||
render={
|
||||
(props) => {
|
||||
return (<EducoderLogin {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
/>
|
||||
<Route component={Shixunnopage} />
|
||||
</Switch>
|
||||
</Router>
|
||||
}
|
||||
/>
|
||||
{/*403*/}
|
||||
<Route path="/403" component={Shixunauthority} />
|
||||
|
||||
<Route path="/500" component={http500} />
|
||||
|
||||
{/*404*/}
|
||||
<Route path="/nopage" component={Shixunnopage} />
|
||||
|
||||
{/* 查询 */}
|
||||
<Route path="/search" component={Search} />
|
||||
|
||||
<Route exact path="/explore"
|
||||
render={
|
||||
(props) => (
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
{/* 组织 */}
|
||||
<Route path={"/organize"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
|
||||
{/*新建项目等*/}
|
||||
<Route
|
||||
path={"/projects"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Projects {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
|
||||
{/* 判断为用户/组织,并进入对应页面 */}
|
||||
{
|
||||
pathType === 'User' ?
|
||||
<Route exact path="/:username"
|
||||
render={
|
||||
(props) => {
|
||||
return (<InfosIndex {...this.props} {...this.state} />)
|
||||
}
|
||||
}
|
||||
/> : pathType === 'Organization' ? <Route path={"/:OIdentifier"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route> : pathType === '404' ? <Route path="/" component={Shixunnopage} /> :
|
||||
<Route exact path="/"
|
||||
render={
|
||||
(props) => (
|
||||
personal && personal.length > 0 ?
|
||||
<InfosIndex {...this.props} {...props} />
|
||||
:
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
)
|
||||
}
|
||||
/>
|
||||
// <Route path="/" component={Loading} />
|
||||
}
|
||||
|
||||
|
||||
|
||||
{/* 个人主页 */}
|
||||
<Route path="/:username"
|
||||
render={
|
||||
(props) => {
|
||||
return (<InfosIndex {...this.props} {...this.state} />)
|
||||
}
|
||||
}></Route>
|
||||
|
||||
|
||||
<Route component={Shixunnopage} />
|
||||
</Switch>
|
||||
{/* </Router> */}
|
||||
</MuiThemeProvider>
|
||||
</ConfigProvider>
|
||||
</Provider>
|
||||
|
|
|
@ -11,9 +11,9 @@ broadcastChannelOnmessage('refreshPage', () => {
|
|||
})
|
||||
|
||||
function locationurl(list) {
|
||||
if (window.location.port !== "3007") {
|
||||
// if (window.location.port !== "3007") {
|
||||
window.location.href = list
|
||||
}
|
||||
// }
|
||||
}
|
||||
// TODO 开发期多个身份切换
|
||||
let debugType = ""
|
||||
|
@ -85,7 +85,10 @@ export function initAxiosInterceptors(props) {
|
|||
}
|
||||
|
||||
if (response.data.status === 404) {
|
||||
locationurl('/nopage');
|
||||
let responseURL = response.request ? response.request.responseURL:'';
|
||||
if (responseURL.indexOf('/api/users/') === -1 && responseURL.indexOf('/api/organizations/') === -1 && responseURL.indexOf('/api/owners/') === -1) {
|
||||
locationurl('/nopage');
|
||||
}
|
||||
}
|
||||
|
||||
if (response.data.status === 500) {
|
||||
|
|
|
@ -195,7 +195,7 @@ class College extends Component {
|
|||
align: 'center',
|
||||
className: "edu-txt-center font-14 maxnamewidth105",
|
||||
render: (text, record) => (
|
||||
<a href={`/users/${record.login}`} title={record.name} target="_blank" className="task-hide maxnamewidth105" style={{
|
||||
<a href={`/${record.login}`} title={record.name} target="_blank" className="task-hide maxnamewidth105" style={{
|
||||
color:'#007bff',
|
||||
|
||||
}}> {
|
||||
|
|
|
@ -218,7 +218,7 @@ a:hover {
|
|||
}
|
||||
|
||||
.color-blue {
|
||||
color: #4CACFF;
|
||||
color: #2A61FF;
|
||||
}
|
||||
|
||||
.color-huang {
|
||||
|
|
|
@ -107,7 +107,7 @@ export function timeAgo(backDate) {
|
|||
try {
|
||||
moment(backDate);
|
||||
} catch (e) {
|
||||
return;
|
||||
return '刚刚';
|
||||
}
|
||||
if(typeof backDate ==='number'){
|
||||
backDate=backDate*1000
|
||||
|
@ -134,4 +134,5 @@ export function timeAgo(backDate) {
|
|||
if (seconds) {
|
||||
return seconds + "秒前";
|
||||
}
|
||||
return "刚刚";
|
||||
}
|
|
@ -18,6 +18,23 @@ export function getImageUrl(path) {
|
|||
return `${path}`;
|
||||
}
|
||||
|
||||
export function numFormat(num, digits){
|
||||
let d = digits || 1;
|
||||
var si = [
|
||||
{ value: 1, symbol: "" },
|
||||
{ value: 1E3, symbol: "k" },
|
||||
{ value: 1E4, symbol: "W" }
|
||||
];
|
||||
var rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
|
||||
var i;
|
||||
for (i = si.length - 1; i > 0; i--) {
|
||||
if (num >= si[i].value) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (num / si[i].value).toFixed(d).replace(rx, "$1") + si[i].symbol;
|
||||
}
|
||||
|
||||
export function getImage(path) {
|
||||
// https://www.educoder.net
|
||||
// https://testbdweb.trustie.net
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';
|
||||
|
||||
export {
|
||||
getUploadLogoActionUrl as getUploadLogoActionUrl,
|
||||
getUploadLogoActionUrl as getUploadLogoActionUrl,numFormat as numFormat,
|
||||
getImageUrl as getImageUrl,getImage as getImage, getmyUrl as getmyUrl, getRandomNumber as getRandomNumber, getUrl as getUrl, publicSearchs as publicSearchs, getRandomcode as getRandomcode, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
|
||||
, getUploadActionUrl as getUploadActionUrl, getUploadActionUrltwo as getUploadActionUrltwo, getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth
|
||||
, getTaskUrlById as getTaskUrlById, TEST_HOST, htmlEncode as htmlEncode, getupload_git_file as getupload_git_file, getcdnImageUrl as getcdnImageUrl
|
||||
|
|
|
@ -435,11 +435,11 @@ class TPIContextProvider extends Component {
|
|||
image_url: "avatars/User/1"
|
||||
login: "innov"
|
||||
name: "Coder"
|
||||
user_url: "/users/innov"
|
||||
user_url: "/innov"
|
||||
*/
|
||||
let user = resData.user;
|
||||
user.username = resData.user.name;
|
||||
user.user_url = `/users/${resData.user.login}`;
|
||||
user.user_url = `/${resData.user.login}`;
|
||||
// user.image_url = resData.image_url;
|
||||
user.is_teacher = resData.is_teacher;
|
||||
resData.user = user;
|
||||
|
|
|
@ -14,25 +14,25 @@ class ActivityItem extends Component {
|
|||
{/* 如果是版本发布 */}
|
||||
{item.trend_type === "VersionRelease" ?
|
||||
<p className="itemLine">
|
||||
<Link to={`/projects/${owner}/${projectsId}/version`} className="color-blue font-16">{item.name}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/releases`} className="color-blue font-16">{item.name}</Link>
|
||||
<span className="activity_type">{item.trend_type}</span>
|
||||
</p >
|
||||
:
|
||||
// 如果是任务
|
||||
item.trend_type === "Issue" ?
|
||||
<p className="itemLine">
|
||||
<Link to={`/projects/${owner}/${projectsId}/issues/${item.trend_id}/detail`} className="color-blue font-16">{item.name}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/issues/${item.trend_id}`} className="color-blue font-16">{item.name}</Link>
|
||||
<span className="activity_type">{item.trend_type}</span>
|
||||
</p >
|
||||
:
|
||||
// 如果是合并请求
|
||||
<p className="itemLine">
|
||||
<Link to={`/projects/${owner}/${projectsId}/pulls/${item.trend_id}/Messagecount`} className="color-blue font-16">{item.name}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/pulls/${item.trend_id}/Messagecount`} className="color-blue font-16">{item.name}</Link>
|
||||
<span className="activity_type">{item.trend_type}</span>
|
||||
</p >
|
||||
}
|
||||
<p className="itemLine mt10">
|
||||
<Link to={`/users/${item && item.user_login}`} className="show-user-link">
|
||||
<Link to={`/${item && item.user_login}`} className="show-user-link">
|
||||
<img alt="" src={getImageUrl(`/${item.user_avatar}`)} className="createImage" />
|
||||
<span className="mr20">{item.user_name}</span>
|
||||
</Link>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
import React, { useState } from 'react';
|
||||
import { Dropdown, Menu, Tooltip } from 'antd';
|
||||
import { Menu } from 'antd';
|
||||
import "./branch.scss";
|
||||
import CopyTool from '../Component/CopyTool';
|
||||
|
||||
function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
|
||||
const [ key , setKey ] = useState("HTTP");
|
||||
// 点击按钮复制功能
|
||||
function jsCopy(){
|
||||
var e = document.getElementById("copy_rep_content");
|
||||
e.select();
|
||||
document.execCommand("Copy");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="downMenu">
|
||||
<div style={{padding:"10px 20px 20px 20px",borderBottom:"1px solid #eee"}}>
|
||||
|
@ -20,9 +14,7 @@ function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
|
|||
</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>
|
||||
<CopyTool inputId="copy_rep_content" className="copytool"/>
|
||||
</div>
|
||||
</div>
|
||||
<Menu className="edu-txt-center">
|
||||
|
|
|
@ -1,116 +1,36 @@
|
|||
import React , { useState , useEffect } from 'react';
|
||||
import { Popover , Input , Spin } from 'antd';
|
||||
import { Popover , Dropdown , Input , Spin } from 'antd';
|
||||
import './branch.scss';
|
||||
import { getBranch , getTag } from '../GetData/getData';
|
||||
import SelectOverlay from './SelectOverlay';
|
||||
|
||||
|
||||
export default (({ projectsId , branch , owner , changeBranch , branchList , tagflag = true })=>{
|
||||
const [ showValue , setShowValue ] = useState(branch);
|
||||
const [ inputValue , setInputValue] = useState(undefined);
|
||||
const [ nav , setNav ] = useState(0);
|
||||
const [ isSpin , setIsSpin ] = useState(true);
|
||||
const [ flag , setFlag ] = useState(false);
|
||||
|
||||
const [ data , setData ] = useState(undefined);
|
||||
const [ datas , setDatas ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
setShowValue(branch);
|
||||
},[branch])
|
||||
|
||||
useEffect(()=>{
|
||||
document.body.addEventListener('click', e => {
|
||||
let name = e.target.className;
|
||||
let turn = name === "ant-input OptionsInput" || name === "navli active"|| name === "navli" || name === "padding10 bor-bottom-greyE";
|
||||
if(turn){
|
||||
return;
|
||||
}else{
|
||||
setFlag(false);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
useEffect(()=>{
|
||||
if(branchList){
|
||||
setData(branchList);
|
||||
setDatas(branchList);
|
||||
setIsSpin(false);
|
||||
}
|
||||
},[branchList])
|
||||
|
||||
|
||||
async function getBranchs(id,owner){
|
||||
let result = await getBranch(id,owner);
|
||||
setData(result);
|
||||
setDatas(result);
|
||||
setIsSpin(false);
|
||||
}
|
||||
async function getTags(id,owner){
|
||||
let result = await getTag(id,owner);
|
||||
setData(result);
|
||||
setDatas(result);
|
||||
setIsSpin(false);
|
||||
}
|
||||
|
||||
function changeInputValue(e){
|
||||
setInputValue(e.target.value);
|
||||
let filter = e.target.value ? data && data.length>0 && data.filter(item=>item.name.indexOf(e.target.value)>-1) : data;
|
||||
setDatas(filter);
|
||||
}
|
||||
|
||||
function changeNav(nav){
|
||||
setNav(nav);
|
||||
setIsSpin(true);
|
||||
if(nav === 0){
|
||||
getBranchs(projectsId,owner);
|
||||
}else{
|
||||
getTags(projectsId,owner);
|
||||
}
|
||||
}
|
||||
function chooseitem(value){
|
||||
// setShowValue(value);
|
||||
changeBranch(value);
|
||||
}
|
||||
|
||||
|
||||
const menu = (
|
||||
<div>
|
||||
<div className="padding10 bor-bottom-greyE">
|
||||
<Input
|
||||
placeholder="请输入分支或标签名称搜索"
|
||||
autocomplete="off" className="OptionsInput" value={inputValue}
|
||||
onChange={changeInputValue} style={{width:"220px"}}
|
||||
/>
|
||||
<ul className="navUl">
|
||||
<li className={nav === 0?"navli active":"navli"} onClick={()=>changeNav(0)}><i className="iconfont icon-fenzhi1 font-14 mr3"></i>分支列表</li>
|
||||
{ tagflag && <li className={nav === 1?"navli active":"navli"} onClick={()=>changeNav(1)}><i className="iconfont icon-biaoqian3 font-14 mr3"></i>标签列表</li> }
|
||||
</ul>
|
||||
</div>
|
||||
<Spin spinning={isSpin}>
|
||||
<ul className="OptionsUl" id="ul-btn">
|
||||
{
|
||||
datas && datas.length>0 ?
|
||||
datas.map((item,key)=>{
|
||||
return(
|
||||
<li key={key} onClick={()=>chooseitem(item.name)}><a className="task-hide ulALink">{item.name}</a></li>
|
||||
)
|
||||
}):
|
||||
<p className="listTips">暂无{inputValue}{nav === 0 ?"分支":"标签"}~</p>
|
||||
}
|
||||
</ul>
|
||||
</Spin>
|
||||
</div>
|
||||
<SelectOverlay
|
||||
changeBranch={changeBranch}
|
||||
tagflag={tagflag}
|
||||
projectsId={projectsId}
|
||||
owner={owner}
|
||||
branchList={branchList}
|
||||
/>
|
||||
);
|
||||
return(
|
||||
<Popover placement='bottomLeft' visible={flag} content={menu} onClick={()=>setFlag(!flag)} overlayClassName="branch-tagBox-list">
|
||||
<Dropdown placement='bottomLeft' overlay={menu} overlayClassName="branch-tagBox-list" trigger={['click']} >
|
||||
<div className="branch-tagBox">
|
||||
{/* {nav === 0 ?"分支":"标签"} */}
|
||||
<span className="color-grey-9 mr3 ml8"><i className="iconfont icon-fenzhi2 font-18"></i></span>
|
||||
<a className="ant-dropdown-link">
|
||||
<a className="ant-dropdown-link task-hide">
|
||||
{showValue}
|
||||
</a>
|
||||
<i className="showtag iconfont icon-xiajiantou font-14 color-grey-9 mr8" />
|
||||
<i className="showtag iconfont icon-sanjiaoxing-down font-15 color-grey-9 mr5 ml5 mt1" />
|
||||
</div>
|
||||
</Popover>
|
||||
</Dropdown>
|
||||
)
|
||||
})
|
|
@ -0,0 +1,84 @@
|
|||
import React , { useState , useEffect } from 'react';
|
||||
import { Input , Spin , Menu } from 'antd';
|
||||
import { getBranch , getTag } from '../GetData/getData';
|
||||
|
||||
function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owner }) {
|
||||
const [ inputValue , setInputValue] = useState(undefined);
|
||||
const [ nav , setNav ] = useState(0);
|
||||
const [ isSpin , setIsSpin ] = useState(true);
|
||||
|
||||
const [ data , setData ] = useState(undefined);
|
||||
const [ datas , setDatas ] = useState(undefined);
|
||||
const [ keys ,setKeys] = useState("branch");
|
||||
|
||||
useEffect(()=>{
|
||||
if(branchList){
|
||||
setData(branchList);
|
||||
setDatas(branchList);
|
||||
setIsSpin(false);
|
||||
}
|
||||
},[branchList])
|
||||
|
||||
async function getBranchs(id,owner){
|
||||
let result = await getBranch(id,owner);
|
||||
setData(result);
|
||||
setDatas(result);
|
||||
setIsSpin(false);
|
||||
}
|
||||
async function getTags(id,owner){
|
||||
let result = await getTag(id,owner);
|
||||
setData(result);
|
||||
setDatas(result);
|
||||
setIsSpin(false);
|
||||
}
|
||||
function chooseitem(value){
|
||||
changeBranch(value);
|
||||
}
|
||||
function changeInputValue(e){
|
||||
setInputValue(e.target.value);
|
||||
let filter = e.target.value ? data && data.length>0 && data.filter(item=>item.name.indexOf(e.target.value)>-1) : data;
|
||||
setDatas(filter);
|
||||
}
|
||||
|
||||
function changeNav(e){
|
||||
setKeys(e.key);
|
||||
setIsSpin(true);
|
||||
if(e.key === "branch"){
|
||||
getBranchs(projectsId,owner);
|
||||
}else{
|
||||
getTags(projectsId,owner);
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="overlayBranch">
|
||||
<div className="padding15" style={{paddingBottom:"0px"}}>
|
||||
<Input
|
||||
prefix={<i className="iconfont icon-sousuo_icon1 font-14"></i>}
|
||||
placeholder="请输入分支或标签名称搜索"
|
||||
autocomplete="off" className="OptionsInput"
|
||||
value={inputValue}
|
||||
onChange={changeInputValue}
|
||||
/>
|
||||
</div>
|
||||
<Menu mode="horizontal" className="navUl" selectedKeys={[keys]} onClick={changeNav}>
|
||||
<Menu.Item key={"branch"}>分支</Menu.Item>
|
||||
{ tagflag && <Menu.Item key={"tag"}>标签</Menu.Item> }
|
||||
</Menu>
|
||||
<Spin spinning={isSpin}>
|
||||
<ul className="OptionsUl" id="ul-btn">
|
||||
{
|
||||
datas && datas.length>0 ?
|
||||
datas.map((item,key)=>{
|
||||
return(
|
||||
<li key={key} onClick={()=>chooseitem(item.name)}><a className="task-hide ulALink">{item.name}</a></li>
|
||||
)
|
||||
}):
|
||||
<p className="listTips">暂无{inputValue}{nav === 0 ?"分支":"标签"}~</p>
|
||||
}
|
||||
</ul>
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default SelectOverlay;
|
|
@ -0,0 +1,135 @@
|
|||
.branchDropdown {
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
.branchDropdown .ant-dropdown-trigger {
|
||||
width: 100%;
|
||||
padding: 0px 15px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.branchOptions {
|
||||
width: 220px;
|
||||
box-shadow: 0px 0px 3px 1px rgba(134, 134, 134, 0.4);
|
||||
border-radius: 3px;
|
||||
background: #fff;
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
.OptionsUl {
|
||||
max-height: 220px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.OptionsUl li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
cursor: pointer;
|
||||
padding: 0px 20px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
|
||||
.OptionsUl li:hover {
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
.OptionsUl li a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.OptionsInput {
|
||||
height: 32px;
|
||||
padding-left: 4px;
|
||||
line-height: 32px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.branch-tagBox {
|
||||
border: 1px solid #D0D0D0;
|
||||
border-radius: 3px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
min-width: 104px;
|
||||
}
|
||||
|
||||
.branch-tagBox:hover {
|
||||
background-color: #F3F4F6;
|
||||
}
|
||||
|
||||
.branch-tagBox-list {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.branch-tagBox-list .ant-popover-arrow {
|
||||
display: none;
|
||||
}
|
||||
.branch-tagBox-list.ant-popover.ant-popover-placement-bottom {
|
||||
padding-top: 0px;
|
||||
}
|
||||
.branch-tagBox-list .branch-tagBox .ant-dropdown-link {
|
||||
display: block;
|
||||
flex: 1;
|
||||
max-width: 105px;
|
||||
}
|
||||
.branch-tagBox-list .ant-popover-inner-content {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.overlayBranch {
|
||||
width: 325px;
|
||||
}
|
||||
.overlayBranch .navUl {
|
||||
margin-top: 8px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.overlayBranch .navUl li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0px 5px;
|
||||
margin-left: 20px !important;
|
||||
}
|
||||
|
||||
.listTips {
|
||||
padding: 20px 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.urlMenu {
|
||||
line-height: 30px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.urlMenu li.ant-menu-item {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0px 5px;
|
||||
margin-right: 20px !important;
|
||||
}
|
||||
.urlMenu li.ant-menu-item.ant-menu-item-selected, .urlMenu li.ant-menu-item.ant-menu-item-active {
|
||||
color: #333;
|
||||
}
|
||||
.urlMenu li.ant-menu-item.ant-menu-item-selected {
|
||||
border-color: #1890ff !important;
|
||||
}
|
||||
.urlMenu li.ant-menu-item.ant-menu-item-active {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.copytool {
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=branch.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["branch.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACG;;;AAEH;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;;AAGJ;EACE;;AACA;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;;AAIN;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;;;AAIN;EACE","file":"branch.css"}
|
|
@ -27,10 +27,11 @@
|
|||
overflow-y: auto;
|
||||
}
|
||||
.OptionsUl li{
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
cursor: pointer;
|
||||
padding:0px 10px;
|
||||
padding:0px 20px;
|
||||
margin:5px 0px;
|
||||
}
|
||||
.OptionsUl li:hover{
|
||||
background-color: #F0F0F0;
|
||||
|
@ -45,38 +46,49 @@
|
|||
width: 100%;
|
||||
}
|
||||
.branch-tagBox{
|
||||
border:1px solid #eee;
|
||||
border:1px solid #D0D0D0;
|
||||
border-radius: 3px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
min-width: 140px;
|
||||
min-width: 104px;
|
||||
}
|
||||
.branch-tagBox-list .ant-popover-arrow{
|
||||
display: none;
|
||||
.branch-tagBox:hover{
|
||||
background-color: #F3F4F6;
|
||||
}
|
||||
.branch-tagBox-list.ant-popover.ant-popover-placement-bottom{
|
||||
padding-top:0px;
|
||||
.branch-tagBox-list{
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
|
||||
border-radius: 4px;
|
||||
.ant-popover-arrow{
|
||||
display: none;
|
||||
}
|
||||
&.ant-popover.ant-popover-placement-bottom{
|
||||
padding-top:0px;
|
||||
}
|
||||
.branch-tagBox .ant-dropdown-link{
|
||||
display: block;
|
||||
flex:1;
|
||||
max-width: 105px;
|
||||
}
|
||||
.ant-popover-inner-content{
|
||||
padding:0px;
|
||||
}
|
||||
}
|
||||
.branch-tagBox .ant-dropdown-link{
|
||||
display: block;
|
||||
flex:1;
|
||||
}
|
||||
.branch-tagBox-list .ant-popover-inner-content{
|
||||
padding:0px;
|
||||
}
|
||||
.navUl{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.navUl li{
|
||||
cursor: pointer;
|
||||
}
|
||||
.navUl li.active{
|
||||
color:#5091FF;
|
||||
.overlayBranch{
|
||||
width: 325px;
|
||||
.navUl{
|
||||
margin-top: 8px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
li{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding:0px 5px;
|
||||
margin-left: 20px!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.listTips{
|
||||
padding:20px 0px;
|
||||
|
@ -102,4 +114,7 @@
|
|||
border-color:transparent ;
|
||||
}
|
||||
}
|
||||
}
|
||||
.copytool{
|
||||
margin:0px 10px;
|
||||
}
|
|
@ -55,6 +55,7 @@ function AddGroup({organizeId,getGroupID}){
|
|||
|
||||
function addCollaborator(){
|
||||
getGroupID && getGroupID(id);
|
||||
setID(undefined);
|
||||
}
|
||||
|
||||
return(
|
||||
|
|
|
@ -0,0 +1,375 @@
|
|||
@charset "UTF-8";
|
||||
ul.ant-menu {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
ul.ant-menu li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
li.ant-menu-item {
|
||||
margin: 0px !important;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.flags {
|
||||
border: 1px solid red;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.cards {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px 34px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 18px;
|
||||
min-height: 130px;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.cards .img {
|
||||
margin-right: 20px;
|
||||
width: 190px;
|
||||
height: 90px;
|
||||
border: 1px solid #eeeeee;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cards .img img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.cards .content {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
.cards .content .titles {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px !important;
|
||||
align-items: center;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.cards .content .titles > a {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
}
|
||||
.cards .content .desc {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.tabsStyle {
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.tabsStyle .ant-tabs-bar.ant-tabs-top-bar {
|
||||
padding-left: 35px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.tabsStyle .ant-tabs-nav .ant-tabs-tab {
|
||||
padding: 19px 0px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.tabsStyle .ant-tabs-ink-bar {
|
||||
width: 25px !important;
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
.statusColor {
|
||||
display: inline-block;
|
||||
padding: 0px 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
border-radius: 11px;
|
||||
color: #fff;
|
||||
margin-left: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.statusColor.running {
|
||||
background: #5091FF;
|
||||
color: #F1F8FF;
|
||||
}
|
||||
.statusColor.Preparing {
|
||||
background: #ff6e21;
|
||||
color: #fff8f4;
|
||||
}
|
||||
.statusColor.pass {
|
||||
background: #28BD6C;
|
||||
color: #EEFDF5;
|
||||
}
|
||||
.statusColor.failed {
|
||||
background: #F73030;
|
||||
color: #FCEEEE;
|
||||
}
|
||||
.statusColor.killed {
|
||||
background: #eee;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.handleBox {
|
||||
position: fixed;
|
||||
top: 45%;
|
||||
right: 240px;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.laterest {
|
||||
color: #05690d;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1800px) {
|
||||
.handleBox {
|
||||
right: 190px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1700px) {
|
||||
.handleBox {
|
||||
right: 140px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1600px) {
|
||||
.handleBox {
|
||||
right: 90px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1450px) {
|
||||
.handleBox {
|
||||
right: 10px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1380px) {
|
||||
.handleBox {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
.ant-drawer {
|
||||
z-index: 10000 !important;
|
||||
}
|
||||
|
||||
.ant-drawer-body {
|
||||
padding: 0px !important;
|
||||
}
|
||||
.ant-drawer-body .drawerHead {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
padding: 15px 20px;
|
||||
}
|
||||
.ant-drawer-body .ant-tree {
|
||||
margin: 0px 20px !important;
|
||||
}
|
||||
|
||||
.menuPanels {
|
||||
width: 240px;
|
||||
height: 180px;
|
||||
}
|
||||
.menuPanels .ant-popover-content, .menuPanels .ant-popover-inner {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.halfs {
|
||||
margin-top: 24px;
|
||||
padding: 24px 0px 0px 0px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
}
|
||||
.halfs .attrPerson {
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
.menuinfos {
|
||||
padding: 15px 0px;
|
||||
}
|
||||
.menuinfos > a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
border-right: 1px solid #eee;
|
||||
flex: 1;
|
||||
}
|
||||
.menuinfos > a > span:first-child {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
}
|
||||
.menuinfos > a > span:last-child {
|
||||
color: #666;
|
||||
}
|
||||
.menuinfos > a:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
/*-------------------个人主页:右侧提示区域--------------------------*/
|
||||
.-task-sidebar {
|
||||
position: fixed;
|
||||
width: 40px;
|
||||
right: 0;
|
||||
bottom: 80px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1920px) {
|
||||
.-task-sidebar {
|
||||
right: 220px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1750px) {
|
||||
.-task-sidebar {
|
||||
right: 160px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1650px) {
|
||||
.-task-sidebar {
|
||||
right: 115px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1550px) {
|
||||
.-task-sidebar {
|
||||
right: 90px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1450px) {
|
||||
.-task-sidebar {
|
||||
right: 45px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1200px) {
|
||||
.-task-sidebar {
|
||||
right: 0px;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.-task-sidebar > div {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
box-sizing: border-box;
|
||||
width: 40px;
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 50%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 0px 10px 1px #F1F1F1;
|
||||
}
|
||||
|
||||
.-task-sidebar > div i {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.-task-sidebar > div:hover i {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.-task-sidebar > div:hover {
|
||||
background: #1890FF;
|
||||
box-shadow: 0px 0px 10px 2px #B6D0FC;
|
||||
}
|
||||
|
||||
.helpBox {
|
||||
width: 260px;
|
||||
z-index: 103;
|
||||
}
|
||||
.helpBox.shareContent {
|
||||
width: 200px;
|
||||
}
|
||||
.helpBox .ant-popover-inner-content {
|
||||
padding: 0px;
|
||||
}
|
||||
.helpBox p.titlecontent {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
line-height: 20px;
|
||||
padding: 15px 20px;
|
||||
}
|
||||
.helpBox .faqUl {
|
||||
padding: 0px 20px 10px;
|
||||
max-height: 230px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.helpBox .faqUl li {
|
||||
background: #F5F5F5;
|
||||
border-radius: 20px;
|
||||
padding: 0px 20px;
|
||||
color: #333;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.helpBox .faqUl li a {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.helpBox .faqUl li:hover {
|
||||
background-color: #D1E9FF;
|
||||
}
|
||||
.helpBox .faqUl li:hover a {
|
||||
color: #333 !important;
|
||||
}
|
||||
.helpBox .shareUl {
|
||||
padding: 10px 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.helpBox .shareUl .titlecontent {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.helpBox .shareUl li > i {
|
||||
font-size: 32px !important;
|
||||
}
|
||||
|
||||
.-task-desc {
|
||||
background: #494949;
|
||||
width: 90px;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
z-index: 999999;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.-task-desc div {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: -7px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.-task-desc div img {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.-task-sidebar .scan_ewm {
|
||||
position: absolute !important;
|
||||
right: 45px !important;
|
||||
bottom: 0px !important;
|
||||
background-color: #494949 !important;
|
||||
-webkit-box-sizing: border-box !important;
|
||||
box-sizing: border-box !important;
|
||||
font-size: 14px !important;
|
||||
line-height: 16px !important;
|
||||
display: none;
|
||||
height: 213px !important;
|
||||
}
|
||||
|
||||
.trangle_right {
|
||||
position: absolute;
|
||||
right: -5px;
|
||||
bottom: 15px;
|
||||
width: 0;
|
||||
height: 0px;
|
||||
border-top: 6px solid transparent;
|
||||
border-left: 5px solid #494949;
|
||||
border-bottom: 6px solid transparent;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=Component.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["Component.scss"],"names":[],"mappings":";AAAA;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAGJ;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAKN;EACE;;AACA;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;;AAGJ;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAGF;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;;;AAEF;EACE;;AACA;EACE;EACA;EACA;;AAEF;EACE;;;AAIJ;EACE;EACA;;AACA;EACE;EACA;;;AAGJ;EACE;EACA;EACA;;AACA;EACE;;;AAGJ;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AAEF;EACE;;AAEF;EACE;;;AAKN;AACA;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;IACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AAEF;EACE;;AACA;EACE;;AAKR;EACE;EACA;EACA;;AACA;EACE;;AAEF;EACE;;;AAON;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"Component.css"}
|
|
@ -52,8 +52,8 @@ function Contributors({contributors,owner,projectsId}){
|
|||
<Spin spinning={isSpin}>
|
||||
<FlexAJ>
|
||||
<AlignCenter>
|
||||
<Link to={`/users/${data.login}`}><img src={getImageUrl(`/${data.image_url}`)} alt="" className="radius" width="38px" height="38px"/></Link>
|
||||
<Link to={`/users/${data.login}`} className="ml10">{data.name}</Link>
|
||||
<Link to={`/${data.login}`}><img src={getImageUrl(`/${data.image_url}`)} alt="" className="radius" width="38px" height="38px"/></Link>
|
||||
<Link to={`/${data.login}`} className="ml10">{data.name}</Link>
|
||||
</AlignCenter>
|
||||
{
|
||||
data.is_watch ? <a className="color-grey-9" onClick={()=>FocusFunc(false,data.login)}>取消关注</a>:<a className="color-blue" onClick={()=>FocusFunc(true,data.login)}>关注</a>
|
||||
|
@ -137,7 +137,7 @@ function Contributors({contributors,owner,projectsId}){
|
|||
<div className="halfs">
|
||||
<FlexAJ>
|
||||
<AlignCenter><span className="font-16 color-grey-6">贡献者</span>{ contributors && contributors.total_count > 0 && <span className="infoCount">{contributors.total_count}</span>}</AlignCenter>
|
||||
<Link className="font-12 color-grey-9" to={`/projects/${owner}/${projectsId}/contribute`}>全部</Link>
|
||||
<Link className="font-12 color-grey-9" to={`/${owner}/${projectsId}/contribute`}>全部</Link>
|
||||
</FlexAJ>
|
||||
<div className="attrPerson" onMouseLeave={()=>setVisibleFunc(false)}>
|
||||
{
|
||||
|
@ -145,7 +145,7 @@ function Contributors({contributors,owner,projectsId}){
|
|||
list.map((item,key)=>{
|
||||
return(
|
||||
<Popover content={menu} visible={item.visible} overlayClassName="menuPanels" placement="top">
|
||||
<Link key={key} to={`/users/${item.login}`}>
|
||||
<Link key={key} to={`/${item.login}`}>
|
||||
<img src={getImageUrl(`/${item.image_url}`)} alt="" onMouseOver={()=>setVisibleFunc(true,item.login,key)}/>
|
||||
</Link>
|
||||
</Popover>
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
import React, { useState, useCallback, memo } from 'react';
|
||||
import { Tooltip } from 'antd';
|
||||
|
||||
CopyTool.defaultProps = {
|
||||
beforeText: '复制', //浮动过去显示的文字
|
||||
afterText: '复制成功', //点击后显示的文字
|
||||
className: '', //传给svg的class
|
||||
inputId: 'copyText', //要复制的文本的ID
|
||||
timeOut:true, //复制后将浮动的文字改为beforeText
|
||||
};
|
||||
|
||||
|
||||
function CopyTool({ beforeText, afterText, className , inputId , timeOut }) {
|
||||
const [title, setTitle] = useState(() => {
|
||||
return beforeText;
|
||||
});
|
||||
|
||||
// 复制链接
|
||||
const copyUrl = useCallback(() => {
|
||||
const copyEle = document.querySelector(`#${inputId}`); // 获取要复制的节点
|
||||
if (!copyEle) {
|
||||
console.error("您的CopyTool未设置正确的inputId");
|
||||
return;
|
||||
}
|
||||
copyEle.select(); // 执行选中元素
|
||||
if (document.execCommand('copy')) {
|
||||
document.execCommand('copy');
|
||||
}
|
||||
|
||||
setTitle(afterText);
|
||||
if(timeOut){
|
||||
setTimeout(function(){
|
||||
setTitle(beforeText);
|
||||
},1500)
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
placement="top"
|
||||
title={title}
|
||||
onVisibleChange={() => { setTitle(beforeText) }}
|
||||
>
|
||||
<i className={`iconfont icon-fuzhiicon ${className}`} style={{ color: '#466aff' }} onClick={copyUrl}></i>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
export default memo(CopyTool);
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { AlignCenter } from '../layout';
|
||||
import { Modal , Button } from 'antd';
|
||||
import './Index.scss';
|
||||
import { Button } from 'antd';
|
||||
import Modals from '../PublicModal/Index';
|
||||
|
||||
function DeleteBox({
|
||||
visible ,
|
||||
|
@ -12,24 +12,22 @@ function DeleteBox({
|
|||
content
|
||||
}) {
|
||||
return(
|
||||
<Modal
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
title={title}
|
||||
width="600px"
|
||||
className="deleteBox"
|
||||
footer={
|
||||
<Modals
|
||||
title={title}
|
||||
btn={
|
||||
<div>
|
||||
<Button size={'large'} onClick={onCancel}>取消</Button>
|
||||
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
onCancel={onCancel}
|
||||
visible={visible}
|
||||
>
|
||||
<div className="desc">
|
||||
<AlignCenter className="descMain"><i className="iconfont icon-shanchu_tc_icon mr10"></i>{content}</AlignCenter>
|
||||
<p>{subTitle}</p>
|
||||
<p>{subTitle}</p>
|
||||
</div>
|
||||
</Modal>
|
||||
</Modals>
|
||||
)
|
||||
}
|
||||
export default DeleteBox;
|
|
@ -1,45 +0,0 @@
|
|||
.deleteBox{
|
||||
.ant-modal-header{
|
||||
background-color: #f8f8f8;
|
||||
border-bottom: none;
|
||||
.ant-modal-title{
|
||||
text-align: left;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.ant-modal-body{
|
||||
padding:30px 50px;
|
||||
p{
|
||||
font-size: 16px;
|
||||
line-height: 26px;
|
||||
color:#666;
|
||||
word-break: break-all;
|
||||
}
|
||||
.desc{
|
||||
.descMain{
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
margin-bottom: 10px;
|
||||
i{
|
||||
font-size: 38px!important;
|
||||
color:#DF0002
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-modal-footer{
|
||||
border-top: none;
|
||||
text-align: center;
|
||||
padding-bottom: 40px;
|
||||
button{
|
||||
width: 120px;
|
||||
margin:0px 20px;
|
||||
&.ant-btn-danger{
|
||||
background-color: #fff;
|
||||
color: #DF0002;
|
||||
border-color: #D0D0D0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -78,7 +78,7 @@ function DrawerPanel({visible,onClose,branch,owner,projectsId,history, name , li
|
|||
if(dataref.type==="file"){
|
||||
onClose();
|
||||
let value = turnbar(branch);
|
||||
history.push(`/projects/${owner}/${projectsId}/tree/${value}/${dataref.path}`);
|
||||
history.push(`/${owner}/${projectsId}/tree/${value}/${dataref.path}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.ant-modal-mask {
|
||||
z-index: 1031;
|
||||
}
|
||||
|
||||
.ant-modal-wrap {
|
||||
z-index: 1032;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=EAccount.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["EAccount.scss"],"names":[],"mappings":"AAAA;EACE;;;AAEF;EACE","file":"EAccount.css"}
|
|
@ -1,6 +1,6 @@
|
|||
.ant-modal-mask{
|
||||
z-index: 1001;
|
||||
z-index: 1031;
|
||||
}
|
||||
.ant-modal-wrap{
|
||||
z-index: 1002;
|
||||
z-index: 1032;
|
||||
}
|
|
@ -45,15 +45,15 @@ const Div = styled.div`{
|
|||
export default (({ user , img, name, time, focusStatus, is_current_user, login , successFunc }) => {
|
||||
return (
|
||||
<Div>
|
||||
<Link to={`/users/${user && user.login}`}><Img src={getImageUrl(`/${img}`)} /></Link>
|
||||
<Link to={`/${user && user.login}`}><Img src={getImageUrl(`/${img}`)} /></Link>
|
||||
<div className="m-infos">
|
||||
<Link to={`/users/${user && user.login}`}><Name>{name}</Name></Link>
|
||||
<Link to={`/${user && user.login}`}><Name>{name}</Name></Link>
|
||||
<Time><I className="iconfont icon-shijian"></I>加入时间:{time}</Time>
|
||||
{
|
||||
is_current_user ?
|
||||
<Button type="default">当前用户</Button>
|
||||
:
|
||||
<FocusButton is_watch={focusStatus} id={login} successFunc={successFunc}/>
|
||||
<FocusButton is_watch={focusStatus} id={login} successFunc={successFunc} notReset={true}/>
|
||||
}
|
||||
</div>
|
||||
</Div>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
.contents {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 10px auto 0px;
|
||||
}
|
||||
.contents img {
|
||||
margin-right: 13px;
|
||||
width: 44px;
|
||||
}
|
||||
.contents p {
|
||||
line-height: 29px;
|
||||
max-width: 327px;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
.font-44 {
|
||||
font-size: 44px !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=Index.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["Index.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;EACA;EACA;;;AAGJ;EACE","file":"Index.css"}
|
|
@ -0,0 +1,72 @@
|
|||
import React , { useEffect , useState } from 'react';
|
||||
import Modals from '../PublicModal/Index';
|
||||
import { Button } from 'antd';
|
||||
import axios from 'axios';
|
||||
|
||||
import ProfileImg from './images/profile.png';
|
||||
import './Index.scss';
|
||||
|
||||
function ProfileModal({visible,onCancel,history}) {
|
||||
const [ modalVis , setModalVis ] = useState(visible);
|
||||
const [ addMemberCheck , setAddMemberCheck ] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
axios.interceptors.response.use((response) => {
|
||||
if (response && (response.data.status === 411 || response.data.status === 412)) {
|
||||
setModalVis(true);
|
||||
if(response.data.status === 412){
|
||||
setAddMemberCheck(true);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}, (error) => {
|
||||
});
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
setModalVis(visible);
|
||||
},[visible])
|
||||
|
||||
function onOk(){
|
||||
onCancel();
|
||||
setModalVis(false);
|
||||
setTimeout(function(){
|
||||
window.open(`/settings/profile`,"_blank");
|
||||
},200)
|
||||
}
|
||||
|
||||
function onNo() {
|
||||
onCancel();
|
||||
setModalVis(false);
|
||||
}
|
||||
|
||||
return(
|
||||
<Modals
|
||||
title="完善资料"
|
||||
onCancel={onNo}
|
||||
visible={modalVis}
|
||||
btn={
|
||||
addMemberCheck?
|
||||
<div>
|
||||
<Button type={'primary'} size={"large"} onClick={onNo}>好的</Button>
|
||||
</div>
|
||||
:
|
||||
<div>
|
||||
<Button size={"large"} onClick={onNo}>暂不补充</Button>
|
||||
<Button type={'primary'} size={"large"} onClick={onOk}>好的</Button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<div className="contents">
|
||||
<img src={ProfileImg} alt=""/>
|
||||
{
|
||||
addMemberCheck ?
|
||||
<p>目标用户个人资料不完整,需提醒目标用户补充资料后以进行后续操作</p>
|
||||
:
|
||||
<p>您目前的个人资料不完整,需要补充资料以进行后续操作。是否前往补充个人信息?</p>
|
||||
}
|
||||
</div>
|
||||
</Modals>
|
||||
)
|
||||
}
|
||||
export default ProfileModal;
|
|
@ -0,0 +1,18 @@
|
|||
.contents{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin:10px auto 0px;
|
||||
img{
|
||||
margin-right: 13px;
|
||||
width: 44px;
|
||||
}
|
||||
p{
|
||||
line-height: 29px;
|
||||
max-width: 327px;
|
||||
font-size: 16px!important;
|
||||
}
|
||||
}
|
||||
.font-44{
|
||||
font-size: 44px!important;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import React from 'react';
|
||||
|
||||
function Profile({children,sureFunc,showCompeleteDialog , completeProfile, className}) {
|
||||
|
||||
function checkProfile() {
|
||||
if(!completeProfile){
|
||||
showCompeleteDialog && showCompeleteDialog();
|
||||
}else{
|
||||
sureFunc();
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
<a className={className} onClick={checkProfile}>{children}</a>
|
||||
)
|
||||
}
|
||||
export default Profile;
|
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
|
@ -0,0 +1,75 @@
|
|||
.deleteBox {
|
||||
z-index: 1033;
|
||||
}
|
||||
.deleteBox .ant-modal-close-x {
|
||||
font-size: 17px !important;
|
||||
}
|
||||
.deleteBox .ant-modal-header {
|
||||
background-color: #f8f8f8;
|
||||
padding: 10px 30px;
|
||||
}
|
||||
.deleteBox .ant-modal-header .ant-modal-title {
|
||||
text-align: left;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.deleteBox .ant-modal-close {
|
||||
top: 0px !important;
|
||||
font-size: 24px !important;
|
||||
}
|
||||
.deleteBox .ant-modal-body {
|
||||
padding: 30px 50px;
|
||||
}
|
||||
.deleteBox .ant-modal-body p {
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
color: #666;
|
||||
word-break: break-all;
|
||||
}
|
||||
.deleteBox .ant-modal-body .desc .descMain {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.deleteBox .ant-modal-body .desc .descMain i.red {
|
||||
color: #DF0002;
|
||||
}
|
||||
.deleteBox .ant-modal-footer {
|
||||
border-top: none;
|
||||
text-align: center;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
.deleteBox .ant-modal-footer button, .deleteBox .ant-modal-footer a {
|
||||
width: 96px;
|
||||
height: 32px;
|
||||
margin: 0px 20px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
}
|
||||
.deleteBox .ant-modal-footer button.ant-btn, .deleteBox .ant-modal-footer a.ant-btn {
|
||||
border-color: #D0D0D0;
|
||||
color: #666;
|
||||
}
|
||||
.deleteBox .ant-modal-footer button.ant-btn:hover, .deleteBox .ant-modal-footer button.ant-btn:active, .deleteBox .ant-modal-footer button.ant-btn:focus, .deleteBox .ant-modal-footer a.ant-btn:hover, .deleteBox .ant-modal-footer a.ant-btn:active, .deleteBox .ant-modal-footer a.ant-btn:focus {
|
||||
background: #f3f4f6;
|
||||
}
|
||||
.deleteBox .ant-modal-footer button.ant-btn-danger, .deleteBox .ant-modal-footer a.ant-btn-danger {
|
||||
background-color: #fff;
|
||||
color: #DF0002;
|
||||
border-color: #D0D0D0;
|
||||
}
|
||||
.deleteBox .ant-modal-footer button.ant-btn-danger:hover, .deleteBox .ant-modal-footer button.ant-btn-danger:active, .deleteBox .ant-modal-footer button.ant-btn-danger:focus, .deleteBox .ant-modal-footer a.ant-btn-danger:hover, .deleteBox .ant-modal-footer a.ant-btn-danger:active, .deleteBox .ant-modal-footer a.ant-btn-danger:focus {
|
||||
border-color: #DF0002;
|
||||
background-color: #fff;
|
||||
}
|
||||
.deleteBox .ant-modal-footer button.ant-btn.ant-btn-primary, .deleteBox .ant-modal-footer a.ant-btn.ant-btn-primary {
|
||||
background-color: #466AFF;
|
||||
color: #fff;
|
||||
border-color: #466AFF;
|
||||
}
|
||||
.deleteBox .ant-modal-footer button.ant-btn.ant-btn-primary:hover, .deleteBox .ant-modal-footer button.ant-btn.ant-btn-primary:focus, .deleteBox .ant-modal-footer button.ant-btn.ant-btn-primary:active, .deleteBox .ant-modal-footer a.ant-btn.ant-btn-primary:hover, .deleteBox .ant-modal-footer a.ant-btn.ant-btn-primary:focus, .deleteBox .ant-modal-footer a.ant-btn.ant-btn-primary:active {
|
||||
background-color: rgba(70, 106, 255, 0.85);
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=Index.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["Index.scss"],"names":[],"mappings":"AAAA;EACE;;AACA;EACE;;AAEF;EACE;EACA;;AACA;EACE;EACA;EACA;;AAGJ;EACE;EACA;;AAEF;EACE;;AACA;EACE;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;;AACA;EACE;;AAKR;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACA;EACE;;AAGJ;EACE;EACA;EACA;;AACA;EACE;EACA;;AAGJ;EACE;EACA;EACA;;AACA;EACE","file":"Index.css"}
|
|
@ -0,0 +1,20 @@
|
|||
import React from 'react';
|
||||
import { Modal } from 'antd';
|
||||
import './Index.scss';
|
||||
|
||||
function Modals({title,children,btn,onCancel,visible}) {
|
||||
return(
|
||||
<Modal
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
title={title}
|
||||
width={"520px"}
|
||||
footer={btn}
|
||||
centered={true}
|
||||
wrapClassName={"deleteBox"}
|
||||
>
|
||||
{children}
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
export default Modals;
|
|
@ -0,0 +1,75 @@
|
|||
.deleteBox{
|
||||
z-index: 1033;
|
||||
.ant-modal-close-x{
|
||||
font-size: 17px!important;
|
||||
}
|
||||
.ant-modal-header{
|
||||
background-color: #f8f8f8;
|
||||
padding:10px 30px;
|
||||
.ant-modal-title{
|
||||
text-align: left;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.ant-modal-close{
|
||||
top:0px !important;
|
||||
font-size: 24px !important;
|
||||
}
|
||||
.ant-modal-body{
|
||||
padding:30px 50px;
|
||||
p{
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
color:#666;
|
||||
word-break: break-all;
|
||||
}
|
||||
.desc{
|
||||
.descMain{
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
margin-bottom: 10px;
|
||||
i.red{
|
||||
color:#DF0002;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-modal-footer{
|
||||
border-top: none;
|
||||
text-align: center;
|
||||
padding-bottom: 40px;
|
||||
button,a{
|
||||
width: 96px;
|
||||
height: 32px;
|
||||
margin:0px 20px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
&.ant-btn{
|
||||
border-color: #D0D0D0;
|
||||
color: #666;
|
||||
&:hover,&:active,&:focus{
|
||||
background: #f3f4f6;
|
||||
}
|
||||
}
|
||||
&.ant-btn-danger{
|
||||
background-color: #fff;
|
||||
color: #DF0002;
|
||||
border-color: #D0D0D0;
|
||||
&:hover,&:active,&:focus{
|
||||
border-color: #DF0002;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
&.ant-btn.ant-btn-primary{
|
||||
background-color: #466AFF;
|
||||
color: #fff;
|
||||
border-color: #466AFF;
|
||||
&:hover,&:focus,&:active{
|
||||
background-color: rgba(70,106,255,0.85);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,9 +11,9 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}
|
|||
{ releaseVersions && releaseVersions.total_count > 0 && <span className="infoCount">{releaseVersions.total_count}</span>}
|
||||
</AlignCenter>
|
||||
{ (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-grey-9" to={`/${owner}/${projectsId}/releases`}>全部</Link>
|
||||
:
|
||||
baseOperate && <Link className="font-12 color-blue" to={`/projects/${owner}/${projectsId}/releases/new`}>新建</Link>
|
||||
baseOperate && <Link className="font-12 color-blue" to={`/${owner}/${projectsId}/releases/new`}>新建</Link>
|
||||
}
|
||||
</FlexAJ>
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}
|
|||
<i className="iconfont icon-biaoqian3 color-grey-6 font-18 mr10"></i>
|
||||
<div>
|
||||
<p className="font-16 color-grey-6">
|
||||
<Link to={`/projects/${owner}/${projectsId}/releases`}>{item.name}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/releases`}>{item.name}</Link>
|
||||
<span className="font-12 laterest ml5">最新</span>
|
||||
</p>
|
||||
<p className="color-grey-9 font-13">{item.created_at}</p>
|
||||
|
|
|
@ -20,7 +20,7 @@ export default ({ url , name , column , id , login })=>{
|
|||
`;
|
||||
return(
|
||||
id?
|
||||
<Link to={`/users/${login}`}>
|
||||
<Link to={`/${login}`}>
|
||||
<Img>
|
||||
{ url && <img src={url} alt=""/> }
|
||||
<span>{name}</span>
|
||||
|
|
|
@ -149,7 +149,7 @@ function About(props, ref) {
|
|||
axios.post(url).then(result=>{
|
||||
setIsSpining(false);
|
||||
if(result && result.data.status === 0){
|
||||
props.history.push(`/projects/${owner}/${projectsId}/devops/dispose`);
|
||||
props.history.push(`/${owner}/${projectsId}/devops`);
|
||||
// 需要将顶部的open_devops修改
|
||||
let { changeOpenDevops } = props;
|
||||
changeOpenDevops && changeOpenDevops(true);
|
||||
|
|
|
@ -96,7 +96,7 @@ function Dispose(props){
|
|||
setVisible(false);
|
||||
if(result && result.data){
|
||||
props.showNotification("流水线新增成功,请进行工作流配置!");
|
||||
props.history.push(`/projects/${owner}/${projectsId}/devops/dispose/${result.data.id}`);
|
||||
props.history.push(`/${owner}/${projectsId}/devops/${result.data.id}`);
|
||||
}else{
|
||||
props.showNotification("流水线新增失败,请稍后再试!");
|
||||
}
|
||||
|
@ -134,12 +134,12 @@ function Dispose(props){
|
|||
|
||||
// 模板管理
|
||||
function toModalManage(){
|
||||
props.history.push(`/projects/${owner}/${projectsId}/devops/mould`);
|
||||
props.history.push(`/${owner}/${projectsId}/devops/mould`);
|
||||
}
|
||||
|
||||
// 参数管理
|
||||
function toparameter(){
|
||||
props.history.push(`/projects/${owner}/${projectsId}/devops/params`);
|
||||
props.history.push(`/${owner}/${projectsId}/devops/params`);
|
||||
}
|
||||
|
||||
const operate = current_user && (permission && permission !== "Reporter");
|
||||
|
|
|
@ -73,7 +73,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){
|
|||
render:(value,item)=>{
|
||||
let v = turnbar(item.branch);
|
||||
return(
|
||||
<Link to={`/projects/${owner}/${projectsId}/tree/${v}/${value}`} className="color-blue">{value}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/tree/${v}/${value}`} className="color-blue">{value}</Link>
|
||||
)
|
||||
}
|
||||
},
|
||||
|
@ -117,7 +117,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){
|
|||
return(
|
||||
<span>
|
||||
{ operate ?
|
||||
<Link to={`/projects/${owner}/${projectsId}/devops/dispose/${item.id}`} className="mr10 color-grey-6">
|
||||
<Link to={`/${owner}/${projectsId}/devops/${item.id}`} className="mr10 color-grey-6">
|
||||
<i className="iconfont icon-zaibianji font-13 mr3"></i>编辑</Link> :""
|
||||
}
|
||||
{ operate ?
|
||||
|
@ -125,7 +125,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){
|
|||
<a className="mr10 color-grey-6"><i className="iconfont icon-lajitong font-13 mr3"></i>删除</a>
|
||||
</Popconfirm>:""
|
||||
}
|
||||
<Link to={`/projects/${owner}/${projectsId}/devops/list/${item.branch}`} className="color-grey-6"><i className="iconfont icon-yunhang font-13 mr3"></i>查看运行记录</Link>
|
||||
<Link to={`/${owner}/${projectsId}/devops/list/${item.branch}`} className="color-grey-6"><i className="iconfont icon-yunhang font-13 mr3"></i>查看运行记录</Link>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -36,39 +36,37 @@ export default ((props)=>{
|
|||
return(
|
||||
<WhiteBack className="opsPanel">
|
||||
<Switch {...props}>
|
||||
<Route path="/projects/:owner/:projectsId/devops/dispose/:disposeId"
|
||||
render={
|
||||
(p) => (<New {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/devops/params"
|
||||
|
||||
<Route path="/:owner/:projectsId/devops/params"
|
||||
render={
|
||||
(p) => (<Params {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/devops/mould"
|
||||
<Route path="/:owner/:projectsId/devops/mould"
|
||||
render={
|
||||
(p) => (<Mould {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/devops/dispose/new"
|
||||
<Route path="/:owner/:projectsId/devops/new"
|
||||
render={
|
||||
(p) => (<New {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/devops/dispose"
|
||||
render={
|
||||
(p) => (<Dispose {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/devops/list/:branch"
|
||||
|
||||
<Route path="/:owner/:projectsId/devops/list/:branch"
|
||||
render={
|
||||
(p) => (<Stucture {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/devops"
|
||||
<Route path="/:owner/:projectsId/devops/:disposeId"
|
||||
render={
|
||||
(p) => (<About {...props} {...p}/>)
|
||||
(p) => (<New {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 原本的两种合为一个 */}
|
||||
<Route path="/:owner/:projectsId/devops"
|
||||
render={
|
||||
(p) =>{return( p.location.state.open_devops?<Dispose {...props} {...p}/>:<About {...props} {...p}/>)}
|
||||
}
|
||||
></Route>
|
||||
</Switch>
|
||||
|
|
|
@ -26,7 +26,7 @@ export default ((props)=>{
|
|||
return(
|
||||
<div className="disposePanel">
|
||||
<Banner>
|
||||
{ permission !=="Reporter" && <Link to={`/projects/${owner}/${props.match.params.projectsId}/devops/dispose`}>工作流配置</Link>}
|
||||
{ permission !=="Reporter" && <Link to={`/${owner}/${props.match.params.projectsId}/devops`}>工作流配置</Link>}
|
||||
</Banner>
|
||||
<Div>
|
||||
<Dispost {...props}/>
|
||||
|
|
|
@ -104,7 +104,7 @@ function Params(props){
|
|||
<Banner>
|
||||
<FlexAJ>
|
||||
<span className="font-18">工作流 - 参数管理</span>
|
||||
<Link to={`/projects/${owner}/${projectsId}/devops/dispose`} className="font-14 color-grey-9 ml20">返回</Link>
|
||||
<Link to={`/${owner}/${projectsId}/devops`} className="font-14 color-grey-9 ml20">返回</Link>
|
||||
</FlexAJ>
|
||||
</Banner>
|
||||
<Div className="disposeList">
|
||||
|
|
|
@ -126,7 +126,7 @@ function Mould(props){
|
|||
<div>
|
||||
<New wrappedComponentRef={(f) => childRef.current = f} ref={childRef} visible={visible} onCancel={()=>setVisible(false)} onOk={onOk}></New>
|
||||
<Banner>
|
||||
<FlexAJ><span>工作流 - 模板管理</span><Link to={`/projects/${owner}/${projectsId}/devops/dispose`} className="font-14 color-grey-9">返回</Link></FlexAJ>
|
||||
<FlexAJ><span>工作流 - 模板管理</span><Link to={`/${owner}/${projectsId}/devops`} className="font-14 color-grey-9">返回</Link></FlexAJ>
|
||||
</Banner>
|
||||
<Div className="disposeList">
|
||||
<FlexAJ>
|
||||
|
|
|
@ -198,7 +198,7 @@ function Structure(props,ref){
|
|||
}
|
||||
|
||||
function clickRows(event,e){
|
||||
props.history.push(`/projects/${owner}/${projectsId}/devops/${e.number}/detail`);
|
||||
props.history.push(`/${owner}/${projectsId}/devops/${e.number}/detail`);
|
||||
}
|
||||
const column = [
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ function Structure(props,ref){
|
|||
<Banner>
|
||||
<FlexAJ>
|
||||
<span>构建列表</span>
|
||||
<Link to={`/projects/${owner}/${projectsId}/devops/dispose`} className="font-15 color-grey-9">返回</Link>
|
||||
<Link to={`/${owner}/${projectsId}/devops`} className="font-15 color-grey-9">返回</Link>
|
||||
</FlexAJ>
|
||||
</Banner>
|
||||
<Div>
|
||||
|
|
|
@ -275,7 +275,7 @@ function disposePipeline(props){
|
|||
...params
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
props.history.push(`/projects/${owner}/${projectsId}/devops/dispose`);
|
||||
props.history.push(`/${owner}/${projectsId}/devops`);
|
||||
}
|
||||
setLoading(false);
|
||||
}).catch(error=>{
|
||||
|
|
|
@ -48,7 +48,7 @@ export default (props) => {
|
|||
axios.post(url).then((result) => {
|
||||
if (result && result.data) {
|
||||
props.showNotification("工作流正在重新构建!");
|
||||
props.history.push(`/projects/${owner}/${projectId}/devops/${result.data.number}/detail`);
|
||||
props.history.push(`/${owner}/${projectId}/devops/${result.data.number}/detail`);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
@ -87,7 +87,7 @@ export default (props) => {
|
|||
</AlignCenter>
|
||||
<Link
|
||||
style={{ color: "#ddd" }}
|
||||
to={`/projects/${owner}/${projectId}/devops/dispose`}
|
||||
to={`/${owner}/${projectId}/devops`}
|
||||
>
|
||||
<i className="iconfont icon-yiguanbi font-15 mr5"></i>退出
|
||||
</Link>
|
||||
|
|
|
@ -41,15 +41,19 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
// 确认转移
|
||||
function onOk(){
|
||||
validateFields((error,values)=>{
|
||||
console.log(...values);
|
||||
if(!error){
|
||||
const url = `/${owner}/${repo}/applied_transfer_projects.json`;
|
||||
Axios.post(url,{
|
||||
...values
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
onSuccess(result.data && result.data.owner);
|
||||
if(result.data.status === 0){
|
||||
onSuccess(result.data && result.data.owner);
|
||||
}else{
|
||||
onSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(error=>{})
|
||||
}
|
||||
})
|
||||
|
@ -104,7 +108,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
</ul>
|
||||
:
|
||||
<ul className="descUl">
|
||||
<li>仓库仅可以转移到您已经加入的组织中,不可以转移到未加入的组织中</li>
|
||||
<li>仓库仅可以转移到您具有管理权限的组织中</li>
|
||||
<li>涉及到仓库改名操作,请提前做好仓库备份并且在转移后对本地仓库的remote进行修改</li>
|
||||
<li>转移仓库到组织后,你和组织创建者/管理员同时拥有对该仓库的管理操作</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, { useState , forwardRef, useEffect } from 'react';
|
||||
import { Form , Modal , Input , Radio } from 'antd';
|
||||
import Axios from 'axios';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
export default Form.create()(
|
||||
forwardRef((props)=>{
|
||||
|
@ -77,7 +78,7 @@ export default Form.create()(
|
|||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
<a onClick={()=>setVisible(true)}>加入项目</a>
|
||||
<CheckProfile {...props} sureFunc={()=>setVisible(true)}>加入项目</CheckProfile>
|
||||
</React.Fragment>
|
||||
)
|
||||
})
|
||||
|
|
|
@ -10,6 +10,7 @@ import HeadSearch from '../Component/HeadSearch';
|
|||
|
||||
import AddProjectModal from './AddProjectModal';
|
||||
import '../../modules/tpm/TPMIndex.css';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
import './header.scss';
|
||||
const $ = window.$
|
||||
|
@ -222,6 +223,15 @@ class NewHeader extends Component {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkProfile=(url)=>{
|
||||
const { showCompeleteDialog , completeProfile } = this.props;
|
||||
if(!completeProfile){
|
||||
showCompeleteDialog && showCompeleteDialog();
|
||||
}else{
|
||||
window.location.href(url);
|
||||
}
|
||||
}
|
||||
|
||||
addMenu=(list)=>{
|
||||
return(
|
||||
|
@ -231,11 +241,16 @@ class NewHeader extends Component {
|
|||
{
|
||||
list.map((item,key)=>{
|
||||
return(
|
||||
(item.name !=="加入课堂" && item.name !=="加入开发项目") && <Menu.Item key={item.name+key}><a href={item.url}>{item.name}</a></Menu.Item>
|
||||
(item.name !=="加入课堂" && item.name !=="加入开发项目") &&
|
||||
<Menu.Item key={item.name+key}>
|
||||
<CheckProfile {...this.props} sureFunc={()=>{window.location.href=item.url}}>{item.name}</CheckProfile>
|
||||
</Menu.Item>
|
||||
)
|
||||
})
|
||||
}
|
||||
<Menu.Item><AddProjectModal showNotification={this.props.showNotification}/></Menu.Item>
|
||||
<Menu.Item>
|
||||
<AddProjectModal {...this.props} showNotification={this.props.showNotification}/>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
</div>
|
||||
)
|
||||
|
@ -245,7 +260,7 @@ class NewHeader extends Component {
|
|||
return(
|
||||
<Menu className="currentMenu">
|
||||
<Menu.Item>
|
||||
<span title={current_user && current_user.username}>{current_user && current_user.username}</span>
|
||||
<span className="currentName" title={current_user && current_user.username}>{current_user && current_user.username}</span>
|
||||
</Menu.Item>
|
||||
{
|
||||
personal && personal.length > 0 && personal.map((item,key)=>{
|
||||
|
@ -254,7 +269,7 @@ class NewHeader extends Component {
|
|||
)
|
||||
})
|
||||
}
|
||||
<li><Link to={`/settings/SSH`}>设置</Link></li>
|
||||
<li><Link to={`/settings/profile`}>设置</Link></li>
|
||||
<Menu.Item><a onClick={() => this.educoderloginysl()}>退出</a></Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
|
@ -347,7 +362,7 @@ class NewHeader extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
// let search_url = settings && settings.common && settings.common.search;
|
||||
let search_url = settings && settings.common && settings.common.search;
|
||||
let notice_url = settings && settings.common && settings.common.notice;
|
||||
return (
|
||||
<div className="newHeaders" id="nHeader">
|
||||
|
@ -385,16 +400,16 @@ class NewHeader extends Component {
|
|||
if (new_link && (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1)) {
|
||||
if (user_login) {
|
||||
if (new_link.indexOf("courses") > -1) {
|
||||
new_link = new_link.replace(/courses/g, "users/" + user_login + "/courses")
|
||||
new_link = new_link.replace(/courses/g, user_login + "/courses")
|
||||
} else if (new_link.indexOf("contests") > -1) {
|
||||
new_link = new_link.replace(/contests/g, "users/" + user_login + "/contests")
|
||||
new_link = new_link.replace(/contests/g, user_login + "/contests")
|
||||
}
|
||||
} else {
|
||||
is_hidden = true
|
||||
}
|
||||
}
|
||||
if (user_login && (new_link && new_link.indexOf("homes") > -1)) {
|
||||
new_link = new_link.replace(/homes/g, "users/" + user_login + "/user_activities")
|
||||
new_link = new_link.replace(/homes/g, user_login + "/user_activities")
|
||||
}
|
||||
|
||||
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
|
||||
|
@ -412,7 +427,7 @@ class NewHeader extends Component {
|
|||
</div>
|
||||
<div className="head-right">
|
||||
{/* {search_url ? this.SearchInput(openSearch,search_url):""} */}
|
||||
<HeadSearch {...this.props}/>
|
||||
{ search_url && <HeadSearch {...this.props}/>}
|
||||
{
|
||||
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
|
||||
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
|
||||
|
@ -442,7 +457,7 @@ class NewHeader extends Component {
|
|||
</span>
|
||||
:
|
||||
<Dropdown placement={`bottomRight`} overlay={this.renderMenu(settings && settings.personal)}>
|
||||
<a href={`/users/${this.props.current_user && this.props.current_user.login}`}>
|
||||
<a href={`/${this.props.current_user && this.props.current_user.login}`}>
|
||||
<img alt="头像" src={getImageUrl(`/${user.image_url}`)} className="currentImg"></img>
|
||||
</a>
|
||||
</Dropdown>
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
.dropdownFlex {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.dropdownFlex .ant-menu-vertical > .ant-menu-item {
|
||||
border: none;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin: 0px;
|
||||
}
|
||||
.dropdownFlex .ant-menu-vertical > .ant-menu-item.ant-menu-item-selected {
|
||||
background-color: #fff;
|
||||
}
|
||||
.dropdownFlex .ant-menu-vertical > .ant-menu-item.ant-menu-item-selected a {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
.dropdownFlex .ant-menu-vertical > .ant-menu-item.ant-menu-item-active a {
|
||||
color: #4cacff !important;
|
||||
}
|
||||
.dropdownFlex .ant-menu-vertical {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.currentImg {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 50%;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.currentMenu {
|
||||
width: 120px;
|
||||
text-align: center;
|
||||
padding: 0px;
|
||||
}
|
||||
.currentMenu .currentName {
|
||||
padding: 0px 8px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
display: block;
|
||||
}
|
||||
.currentMenu li {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0px !important;
|
||||
cursor: default;
|
||||
}
|
||||
.currentMenu li:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
.currentMenu li:first-child {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.currentMenu li:last-child {
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
.currentMenu li:last-child a {
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
}
|
||||
.currentMenu li a {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
display: block;
|
||||
color: #666;
|
||||
}
|
||||
.currentMenu li a:hover {
|
||||
color: #fff;
|
||||
background: #4CACFF;
|
||||
}
|
||||
|
||||
.newFooter {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #323232;
|
||||
clear: both;
|
||||
min-width: 1200px;
|
||||
z-index: 8;
|
||||
left: 0px;
|
||||
}
|
||||
.newFooter p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
.newFooter .footerInfos {
|
||||
display: flex;
|
||||
max-width: 1200px;
|
||||
margin: 0px auto;
|
||||
justify-content: space-around;
|
||||
padding: 60px 0px;
|
||||
}
|
||||
.newFooter .footerInfos > ul {
|
||||
padding: 0px 40px;
|
||||
box-sizing: border-box;
|
||||
max-width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
.newFooter .footerInfos > ul li {
|
||||
color: #fff;
|
||||
font-weight: 300;
|
||||
}
|
||||
.newFooter .footerInfos > ul li:first-child {
|
||||
font-size: 17px;
|
||||
}
|
||||
.newFooter .footerInfos > ul li > a, .newFooter .footerInfos > ul li > span {
|
||||
color: #bbb;
|
||||
}
|
||||
.newFooter .footerInfos > ul li > a:hover {
|
||||
color: #4cacff;
|
||||
}
|
||||
.newFooter .footerCopy {
|
||||
color: #bbb;
|
||||
border-top: 1px solid #4e4e4e;
|
||||
padding: 10px 0px;
|
||||
}
|
||||
.newFooter .footerCopy a {
|
||||
color: #bbb;
|
||||
}
|
||||
.newFooter .footerCopy a:hover {
|
||||
color: #4cacff;
|
||||
}
|
||||
|
||||
.inviteForm .ant-form-item {
|
||||
margin-right: 0px;
|
||||
}
|
||||
.inviteForm .ant-form-item-label {
|
||||
width: 110px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=header.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["header.scss"],"names":[],"mappings":"AACA;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;;AACA;EAAE;;AAGF;EAAE;;AAGN;EACE;;;AAGJ;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;;AACA;EACE;;AAGJ;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;;AAKR;EACE;EACA;EACA;;AACA;EACE;;AACA;EACE;;;AAMN;EACE;;AAEF;EACE;EACA","file":"header.css"}
|
|
@ -30,6 +30,13 @@
|
|||
width: 120px;
|
||||
text-align: center;
|
||||
padding:0px;
|
||||
.currentName{
|
||||
padding:0px 8px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
display: block;
|
||||
}
|
||||
li{
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
|
|
@ -12,8 +12,9 @@ import Loadable from "react-loadable";
|
|||
import Loading from "../Loading";
|
||||
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
|
||||
|
||||
|
||||
const ProjectNew = Loadable({
|
||||
loader: () => import("./New/Index"),
|
||||
loader: () => import("./New/Index"),
|
||||
loading: Loading,
|
||||
});
|
||||
const ProjectIndex = Loadable({
|
||||
|
@ -21,21 +22,23 @@ const ProjectIndex = Loadable({
|
|||
loading: Loading,
|
||||
});
|
||||
|
||||
const ProjectDetail = Loadable({
|
||||
loader: () => import("./Main/Detail"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 项目详情放在用户和组织下作为二级菜单存在
|
||||
// const ProjectDetail = Loadable({
|
||||
// loader: () => import("./Main/Detail"),
|
||||
// loading: Loading,
|
||||
// });
|
||||
|
||||
class Index extends Component {
|
||||
|
||||
componentDidUpdate=()=>{
|
||||
this.props.history.listen(()=>{
|
||||
componentDidUpdate = () => {
|
||||
this.props.history.listen(() => {
|
||||
if (document.body.scrollTop || document.documentElement.scrollTop > 0) {
|
||||
window.scrollTo(0, 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
render() {
|
||||
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<Switch {...this.props}>
|
||||
|
@ -52,23 +55,24 @@ class Index extends Component {
|
|||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/projects/new"
|
||||
path="/projects/mirror/new"
|
||||
render={(props) => (
|
||||
<ProjectNew {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/projects/:owner/:projectsId"
|
||||
{/* <Route
|
||||
path="/:owner/:projectsId"
|
||||
render={(props) => (
|
||||
<ProjectDetail {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
></Route> */}
|
||||
<Route
|
||||
path="/projects"
|
||||
path="/explore"
|
||||
render={(props) => (
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
|
||||
<Route
|
||||
path="/"
|
||||
render={(props) => (
|
||||
|
@ -86,3 +90,10 @@ export default withRouter(
|
|||
parentSelector: ".newMain",
|
||||
})(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Index))))
|
||||
);
|
||||
|
||||
// export default withRouter(
|
||||
// ImageLayerOfCommentHOC({
|
||||
// imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
|
||||
// parentSelector: ".newMain",
|
||||
// })(Index)
|
||||
// );
|
||||
|
|
|
@ -20,6 +20,7 @@ import DrawerPanel from '../Component/DrawerPanel';
|
|||
import UpdateDescModal from './sub/UpdateDescModal';
|
||||
import Nodata from '../Nodata';
|
||||
import Invite from './sub/Invite';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
/**
|
||||
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
||||
*/
|
||||
|
@ -112,7 +113,7 @@ function CoderDepot(props){
|
|||
useEffect(()=>{
|
||||
if (projectsId && owner && defaultBranch){
|
||||
let b = turnbar(branchName) ;
|
||||
if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${b}/`) > -1) {
|
||||
if(pathname.indexOf(`/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${b}/`) > -1) {
|
||||
let url = pathname.split(`/tree/${b}/`)[1];
|
||||
setTreeValue(url);
|
||||
getFileInfo(url,branchName);
|
||||
|
@ -147,6 +148,7 @@ function CoderDepot(props){
|
|||
setReadme(result.data.readme);
|
||||
setEditReadme(false);
|
||||
setHide(true);
|
||||
console.log("dddd:",result.data.entries);
|
||||
}
|
||||
setTimeout(function(){setIsSpin(false);},500);
|
||||
}).catch(error=>{setIsSpin(false);})
|
||||
|
@ -198,7 +200,7 @@ function CoderDepot(props){
|
|||
// 切换分支或者标签
|
||||
function changeBranch(value){
|
||||
let checkvalue = turnbar(value);
|
||||
let url = `/projects/${owner}/${projectsId}${value && `/tree/${checkvalue}`}${treeValue ? `/${treeValue}`:""}`;
|
||||
let url = `/${owner}/${projectsId}${value && `/tree/${checkvalue}`}${treeValue ? `/${treeValue}`:""}`;
|
||||
props.history.push(url);
|
||||
}
|
||||
|
||||
|
@ -208,8 +210,12 @@ function CoderDepot(props){
|
|||
let checkvalue = turnbar(b);
|
||||
return (
|
||||
<Menu>
|
||||
<Menu.Item><a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</a></Menu.Item>
|
||||
<Menu.Item><a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</a></Menu.Item>
|
||||
<Menu.Item>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/uploadfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>上传文件</CheckProfile>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/${checkvalue}/newfile${treeValue === undefined ? "" : `/${treeValue}`}`)}>新建文件</CheckProfile>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
}
|
||||
|
@ -228,12 +234,12 @@ function CoderDepot(props){
|
|||
setTreeValue(undefined);
|
||||
let branch = branchName || defaultBranch;
|
||||
let checkvalue = turnbar(branch);
|
||||
props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}`);
|
||||
props.history.push(`/${owner}/${projectsId}/tree/${checkvalue}`);
|
||||
};
|
||||
// 子目录路径返回链接
|
||||
function returnUlr(url){
|
||||
let enBranch = turnbar(branchName);
|
||||
props.history.push(`/projects/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
|
||||
props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
|
||||
}
|
||||
// 点击跳转到子目录
|
||||
function goToSubRoot(path,type,filename){
|
||||
|
@ -241,7 +247,7 @@ function CoderDepot(props){
|
|||
let enBranch = branchName || defaultBranch;
|
||||
let checkvalue = turnbar(enBranch);
|
||||
setType(type);
|
||||
props.history.push(`/projects/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`);
|
||||
props.history.push(`/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +259,7 @@ function CoderDepot(props){
|
|||
//点击直接跳转页面 加载一次路由
|
||||
let enBranch = branchName || defaultBranch;
|
||||
let checkvalue = turnbar(enBranch);
|
||||
props.history.push(`/projects/${owner}/${projectsId}/tree/${checkvalue}/${path}`);
|
||||
props.history.push(`/${owner}/${projectsId}/tree/${checkvalue}/${path}`);
|
||||
setType("file");
|
||||
setEditReadme(true);
|
||||
};
|
||||
|
@ -345,13 +351,13 @@ function CoderDepot(props){
|
|||
}
|
||||
</div>
|
||||
<AlignCenter className="mr20">
|
||||
<Link to={`/projects/${owner}/${projectsId}/branchs`} className="color-grey-9">
|
||||
<Link to={`/${owner}/${projectsId}/branches`} className="color-grey-9">
|
||||
<i className="iconfont icon-fenzhi2 font-18 color-grey-9 mr3"></i>
|
||||
<span className="color-grey-6 mr3">{projectDetail && projectDetail.branches && projectDetail.branches.total_count}个</span>分支
|
||||
</Link>
|
||||
</AlignCenter>
|
||||
<AlignCenter className="mr20">
|
||||
<Link to={`/projects/${owner}/${projectsId}/tag`} className="color-grey-9">
|
||||
<Link to={`/${owner}/${projectsId}/tags`} className="color-grey-9">
|
||||
<i className="iconfont icon-biaoqian3 font-16 color-grey-9 mr3"></i>
|
||||
<span className="color-grey-6 mr3">{projectDetail && projectDetail.tags && projectDetail.tags.total_count}个</span>标签
|
||||
</Link>
|
||||
|
@ -363,11 +369,11 @@ function CoderDepot(props){
|
|||
<div className="mr20 addOptionBtn">
|
||||
{
|
||||
projectDetail.type !== 2 && pullsFlag &&
|
||||
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</a>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/pulls/new`)} >+ 合并请求</CheckProfile>
|
||||
}
|
||||
{
|
||||
issuesFlag &&
|
||||
<a onClick={()=>urlLink(`/projects/${owner}/${projectsId}/issues/new`)} >+ 任务</a>
|
||||
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/issues/new`)} >+ 任务</CheckProfile>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
@ -383,7 +389,7 @@ function CoderDepot(props){
|
|||
</AlignCenter>
|
||||
</FlexAJ>
|
||||
{
|
||||
dirInfo || fileInfo ?
|
||||
(dirInfo && dirInfo.length>0) || fileInfo ?
|
||||
<div className="listtable">
|
||||
{
|
||||
lastCommit &&
|
||||
|
@ -395,7 +401,7 @@ function CoderDepot(props){
|
|||
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }
|
||||
|
||||
<span className="ml12 color-grey-9 mt3">{lastCommit && lastCommit.time_from_now}</span>
|
||||
{ commitCount ? <Link to={`/projects/${owner}/${projectsId}/commits/branch/${turnbar(branchName || defaultBranch)}`} className="ml12 color-grey-9">
|
||||
{ commitCount ? <Link to={`/${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>
|
||||
|
@ -441,7 +447,7 @@ function CoderDepot(props){
|
|||
: ""
|
||||
}
|
||||
{
|
||||
(dirInfo && dirInfo.length === 0) && (fileInfo && fileInfo.length === 0) ? <Nodata _html="暂未发现文件"/> :""
|
||||
(dirInfo && dirInfo.length === 0) && !fileInfo ? <Nodata _html="暂未发现文件"/> :""
|
||||
}
|
||||
{/* readme文件显示(显示文件详情时不显示readme文件) */}
|
||||
{ dirInfo && (readme && readme.content) ? <ReadMe ChangeFile={ChangeFile} readme={readme} operate={props && (props.isManager || props.isDeveloper) && projectDetail.type !==2 } history={props.history} /> :"" }
|
||||
|
@ -453,7 +459,10 @@ function CoderDepot(props){
|
|||
<Gap style={{paddingLeft:"30px"}}>
|
||||
<div className="panelmenu">
|
||||
<FlexAJ className="font-18 color-grey-6 mb20" style={{lineHeight:"28px"}}>简介
|
||||
{projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner") && <i onClick={()=>setOpenModal(true)} className="iconfont icon-anquanshezhi color-grey-9 font-15"></i>}
|
||||
{
|
||||
projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner" || projectDetail.permission==="Manager") &&
|
||||
<i onClick={()=>setOpenModal(true)} className="iconfont icon-anquanshezhi color-grey-9 font-15"></i>
|
||||
}
|
||||
</FlexAJ>
|
||||
{desc && <p className="font-14 color-grey-9 mb15 task-hide-2" style={{lineHeight:"22px",WebkitLineClamp:"4",textAlign:"justify",wordBreak:"break-all"}}>{desc}</p>}
|
||||
{
|
||||
|
@ -511,11 +520,11 @@ function CoderDepot(props){
|
|||
}
|
||||
{/* 贡献者 */}
|
||||
{
|
||||
projectDetail && projectDetail.contributors &&
|
||||
projectDetail && projectDetail.contributors && projectDetail.contributors.length >0 &&
|
||||
<Contributors contributors={projectDetail && projectDetail.contributors} owner={owner} projectsId={projectsId} />
|
||||
}
|
||||
{/* 语言 */}
|
||||
{ projectDetail && projectDetail.languages &&
|
||||
{ projectDetail && projectDetail.languages && projectDetail.languages.length >0 &&
|
||||
<React.Fragment>
|
||||
<Divider />
|
||||
<LanguagePower languages={projectDetail.languages}/>
|
||||
|
|
|
@ -4,8 +4,8 @@ import { truncateCommitId } from '../common/util';
|
|||
|
||||
const typeIco = {
|
||||
"submodule":"icon-file-submodule font-17",
|
||||
"file":'icon-wenjia font-15',
|
||||
"dir":"icon-wenjianjia1 font-15"
|
||||
"file":'icon-wenjian5 font-15',
|
||||
"dir":"icon-wenjianjia3 font-15"
|
||||
}
|
||||
|
||||
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
|
||||
|
@ -13,11 +13,11 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
|
|||
<li>
|
||||
<span>
|
||||
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}>
|
||||
<i className={`iconfont ${typeIco[`${item.type}`]} color-green-file mr5`}></i>{item.name}
|
||||
<i className={`iconfont ${typeIco[`${item.type}`]} color-blue-file mr5`}></i>{item.name}
|
||||
</a>
|
||||
</span>
|
||||
<span title="init project">
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}>
|
||||
{item.commit && item.commit.message}
|
||||
</Link>
|
||||
</span>
|
||||
|
|
|
@ -3,6 +3,8 @@ import RenderHtml from '../../components/render-html';
|
|||
import { AlignCenter } from '../Component/layout';
|
||||
import { Dropdown , Menu , Spin } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import ReadmeCatelogue from './sub/ReadmeCatelogue';
|
||||
const $ = window.$;
|
||||
|
||||
function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
||||
|
@ -23,34 +25,25 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
|||
const anchor = el.id;
|
||||
const level = el.tagName.replace("H", "");
|
||||
const href = `#${anchor}`;
|
||||
return { href:`${path}${href}`,text:el.textContent , level:level }
|
||||
return { href:`${href}`,text:el.textContent , level:level }
|
||||
});
|
||||
setMenuList(items);
|
||||
},[content])
|
||||
|
||||
function menu(){
|
||||
if(menuList && menuList.length > 0){
|
||||
let hash = history.location.hash;
|
||||
return(
|
||||
<Menu className="menuslist">
|
||||
{
|
||||
menuList.map((item,key)=>{
|
||||
return(
|
||||
<Menu.Item key={item.id} className={decodeURI(hash).indexOf(item.text)>-1 ?"active":""}><Link to={`${item.href}`} style={{paddingLeft:`${item.level *10}px`}} title={item.text}>{item.text}</Link></Menu.Item>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
<ReadmeCatelogue menuList={menuList}/>
|
||||
)
|
||||
}else{
|
||||
return <Spin />
|
||||
}
|
||||
}
|
||||
return(
|
||||
<div className="commonBox" id="readme">
|
||||
<div className="commonBox readBox" id="readme">
|
||||
<div className="commonBox-title boxTitle">
|
||||
<AlignCenter>
|
||||
<Dropdown overlay={menu()}>
|
||||
<Dropdown overlay={menu()} trigger={['click']} overlayClassName="menuslist">
|
||||
<span className="catelogue">
|
||||
<i className="iconfont icon-zhangjie1 font-14 mr5"></i>
|
||||
<span>目录</span>
|
||||
|
@ -61,7 +54,7 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
|||
{
|
||||
operate ?
|
||||
<a className="ml20 pull-right" onClick={() =>ChangeFile(readme && readme.path, false)}>
|
||||
<i className="iconfont icon-bianji6 font-16 color-blue"></i>
|
||||
<i className="iconfont icon-a-bianji font-17 color-grey-6"></i>
|
||||
</a>
|
||||
:""
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Dropdown , Menu , Icon , Tooltip , Spin } from 'antd';
|
|||
import { truncateCommitId } from '../common/util';
|
||||
import { getBranch } from '../GetData/getData';
|
||||
import Nodata from '../Nodata';
|
||||
import './list.css';
|
||||
import './list.scss';
|
||||
|
||||
function turnbar(str){
|
||||
if(str && str.length>0 && str.indexOf("/")>-1){
|
||||
|
@ -38,9 +38,9 @@ export default ((props)=>{
|
|||
return(
|
||||
<li key={key}>
|
||||
<div>
|
||||
<Link to={`/projects/${owner}/${projectsId}/tree/${turnbar(item.name)}`} className="color-blue font-15" style={{"maxWidth":"100px"}}>{item.name}</Link>
|
||||
<Link to={`/${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>
|
||||
<Link to={`/${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>
|
||||
<span className="color-grey-8 ml30">最后更新于{item.last_commit && item.last_commit.time_from_now}</span>
|
||||
</p>
|
||||
|
@ -48,7 +48,7 @@ export default ((props)=>{
|
|||
<span>
|
||||
{
|
||||
(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
|
||||
<Link to={`/projects/${owner}/${projectsId}/pulls/new/${item.name}`} className="mr20 color-blue mr30">创建合并请求</Link>
|
||||
<Link to={`/${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">
|
||||
|
|
|
@ -101,7 +101,7 @@ class CoderRootCommit extends Component{
|
|||
// 切换分支 search:tag为根据标签搜索
|
||||
changeBranch=(value)=>{
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
this.props.history.push(`/projects/${owner}/${projectsId}/commits/branch/${value}`);
|
||||
this.props.history.push(`/${owner}/${projectsId}/commits/branch/${value}`);
|
||||
}
|
||||
|
||||
ChangePage=(page)=>{
|
||||
|
@ -141,13 +141,13 @@ class CoderRootCommit extends Component{
|
|||
return(
|
||||
<div key={k}>
|
||||
<AlignTop>
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitKey" style={{marginLeft:0,marginTop:"3px"}}>{truncateCommitId(`${item.sha}`)}</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitDesc">{item.message}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitKey" style={{marginLeft:0,marginTop:"3px"}}>{truncateCommitId(`${item.sha}`)}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitDesc">{item.message}</Link>
|
||||
</AlignTop>
|
||||
<p className="f-wrap-alignCenter mt15">
|
||||
{
|
||||
item.id ?
|
||||
<Link to={`/users/${item.login}`} className="show-user-link">
|
||||
<Link to={`/${item.login}`} className="show-user-link">
|
||||
{item.image_url?<img src={getImageUrl(`/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
<label className="font-14 color-grey-6" style={{verticalAlign:'middle'}}>{item.name ?`${item.name}:`:""}提交于 {item.time_from_now}</label>
|
||||
</Link>:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { Popconfirm , Select } from "antd";
|
||||
import "./list.css";
|
||||
import "./list.scss";
|
||||
import axios from "axios";
|
||||
import Meditor from "../Newfile/m_editor";
|
||||
import RenderHtml from "../../components/render-html";
|
||||
|
@ -149,7 +149,7 @@ class CoderRootFileDetail extends Component {
|
|||
.then((result) => {
|
||||
if (result) {
|
||||
this.props.showNotification("删除成功!");
|
||||
this.props.history.push(`/projects/${owner}/${projectsId}`);
|
||||
this.props.history.push(`/${owner}/${projectsId}`);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
@ -87,57 +87,57 @@ class CoderRootIndex extends Component{
|
|||
<Top {...this.props} {...this.state}/>
|
||||
<Switch {...this.props}>
|
||||
{/* 新建文件 */}
|
||||
<Route path="/projects/:owner/:projectsId/:branch/newfile/:path"
|
||||
<Route path="/:owner/:projectsId/:branch/newfile/:path"
|
||||
render={
|
||||
(props) => (<FileNew {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/:branch/uploadfile"
|
||||
<Route path="/:owner/:projectsId/:branch/uploadfile"
|
||||
render={
|
||||
(props) => (<UploadFile {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/:branch/newfile"
|
||||
<Route path="/:owner/:projectsId/:branch/newfile"
|
||||
render={
|
||||
(props) => (<FileNew {...this.props} {...props} {...this.state} getTopCount={this.getTopCount} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/commits/branch/:branchName"
|
||||
<Route path="/: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"
|
||||
<Route path="/:owner/:projectsId/commits/:sha"
|
||||
render={
|
||||
(props) => (<Diff {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/commits"
|
||||
<Route path="/:owner/:projectsId/commits"
|
||||
render={
|
||||
() => (<CoderRootCommit {...this.props} {...this.state} commit_class="main" getTopCount={this.getTopCount} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/releases/:versionId/update"
|
||||
<Route path="/:owner/:projectsId/releases/:versionId/update"
|
||||
render={
|
||||
(props) => (<CoderRootVersionUpdate {...this.props} {...this.state} {...props} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/releases/new"
|
||||
<Route path="/:owner/:projectsId/releases/new"
|
||||
render={
|
||||
() => (<CoderRootVersionNew {...this.props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/releases"
|
||||
<Route path="/:owner/:projectsId/releases"
|
||||
render={
|
||||
() => (<CoderRootVersion {...this.props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/tag"
|
||||
<Route path="/:owner/:projectsId/tags"
|
||||
render={
|
||||
() => (<CoderRootTag {...this.props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/branchs"
|
||||
<Route path="/:owner/:projectsId/branches"
|
||||
render={
|
||||
() => (<CoderRootBranch {...this.props} {...this.state} />)
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ export default (( props, { projectDetail }) => {
|
|||
<span className="font-16">{item.name}</span>
|
||||
</span>
|
||||
<span className="ul_tbody_third">
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`} className="commitKey" style={{ "marginLeft": 0 }}>{truncateCommitId(`${item.id}`)}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.id}`)}`} className="commitKey" style={{ "marginLeft": 0 }}>{truncateCommitId(`${item.id}`)}</Link>
|
||||
</span>
|
||||
<span className="ul_tbody_forth">
|
||||
<a href={item.tarball_url} style={{ color: "#4CC1DA" }} className="mr30"><i className="iconfont icon-TAR font-18 mr5"></i>TAR</a>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Spin, Tooltip , Button } from 'antd';
|
||||
import { Spin, Tooltip, Button } from 'antd';
|
||||
import { Link, Route, Switch } from 'react-router-dom';
|
||||
import { Content , AlignTop } from '../Component/layout';
|
||||
import { Content, AlignTop } from '../Component/layout';
|
||||
import DetailBanner from './sub/DetailBanner';
|
||||
import '../css/index.scss'
|
||||
import './list.css';
|
||||
|
@ -103,12 +103,12 @@ const Contribute = Loadable({
|
|||
})
|
||||
|
||||
const CoderRootCommit = Loadable({
|
||||
loader: () => import('./CoderRootCommit'),
|
||||
loading: Loading,
|
||||
loader: () => import('./CoderRootCommit'),
|
||||
loading: Loading,
|
||||
})
|
||||
const CoderDepot = Loadable({
|
||||
loader: () => import('./CoderDepot'),
|
||||
loading: Loading,
|
||||
loader: () => import('./CoderDepot'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const TrendsIndex = Loadable({
|
||||
|
@ -139,28 +139,28 @@ const WikiEdit = Loadable({
|
|||
/**
|
||||
* permission:Manager:管理员,Reporter:报告人员(只有读取权限),Developer:开发人员(除不能设置仓库信息外)
|
||||
*/
|
||||
function checkPathname(projectsId,owner,pathname){
|
||||
function checkPathname(projectsId, owner, pathname) {
|
||||
let name = "";
|
||||
if(pathname && pathname !== `/projects/${owner}/${projectsId}`){
|
||||
let url = pathname.split(`/projects/${owner}/${projectsId}`)[1];
|
||||
if(url.indexOf("/about")>-1){
|
||||
name="about"
|
||||
}else if(url.indexOf("/issues")>-1 ||url.indexOf("Milepost") > 0){
|
||||
if (pathname && pathname !== `/${owner}/${projectsId}`) {
|
||||
let url = pathname.split(`/${owner}/${projectsId}`)[1];
|
||||
if (url.indexOf("/about") > -1) {
|
||||
name = "about"
|
||||
} else if (url.indexOf("/issues") > -1 || url.indexOf("Milepost") > 0) {
|
||||
name = "issues";
|
||||
}else if(url.indexOf("/pulls")>-1){
|
||||
name="pulls"
|
||||
}else if(url.indexOf("/milestones")>-1){
|
||||
name="milestones"
|
||||
}else if(url.indexOf("/activity")>-1){
|
||||
name="activity"
|
||||
}else if(url.indexOf("/setting")>-1){
|
||||
name="setting"
|
||||
}else if(url.indexOf(`/devops`)>-1){
|
||||
name="devops"
|
||||
}else if(url.indexOf(`/source`)>-1){
|
||||
name="source"
|
||||
}else if(url.indexOf(`/wiki`)>-1){
|
||||
name="wiki"
|
||||
} else if (url.indexOf("/pulls") > -1) {
|
||||
name = "pulls"
|
||||
} else if (url.indexOf("/milestones") > -1) {
|
||||
name = "milestones"
|
||||
} else if (url.indexOf("/activity") > -1) {
|
||||
name = "activity"
|
||||
} else if (url.indexOf("/settings") > -1) {
|
||||
name = "settings"
|
||||
} else if (url.indexOf(`/devops`) > -1) {
|
||||
name = "devops"
|
||||
} else if (url.indexOf(`/source`) > -1) {
|
||||
name = "source"
|
||||
} else if (url.indexOf(`/wiki`) > -1) {
|
||||
name = "wiki"
|
||||
}
|
||||
}
|
||||
return name;
|
||||
|
@ -183,15 +183,15 @@ class Detail extends Component {
|
|||
branchs: undefined,
|
||||
branchList: undefined,
|
||||
project: null,
|
||||
firstSync:false,
|
||||
secondSync:false,
|
||||
open_devops:false,
|
||||
forkSpin:false,
|
||||
firstSync: false,
|
||||
secondSync: false,
|
||||
open_devops: false,
|
||||
forkSpin: false,
|
||||
// 默认分支
|
||||
defaultBranch:undefined,
|
||||
defaultBranch: undefined,
|
||||
|
||||
// 非本平台项目
|
||||
platform:false
|
||||
platform: false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,36 +208,38 @@ class Detail extends Component {
|
|||
}
|
||||
|
||||
getProject = (num) => {
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
const url = `/${owner}/${projectsId}/simple.json`;
|
||||
axios.get(url).then((result) => {
|
||||
if (result && result.data) {
|
||||
this.setState({
|
||||
project: result.data,
|
||||
open_devops:result.data.open_devops,
|
||||
platform:result.data.platform && result.data.platform !== 'educoder'
|
||||
open_devops: result.data.open_devops,
|
||||
platform: result.data.platform && result.data.platform !== 'educoder'
|
||||
})
|
||||
|
||||
if (result.data.type !== 0 && result.data.mirror_status === 1) {
|
||||
console.log("--------start channel --------");
|
||||
// 是镜像项目,且未完成迁移
|
||||
this.canvasChannel();
|
||||
if(num){
|
||||
if (num) {
|
||||
this.setState({
|
||||
secondSync:true,
|
||||
firstSync:false
|
||||
secondSync: true,
|
||||
firstSync: false
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.setState({
|
||||
firstSync:true,
|
||||
secondSync:false
|
||||
firstSync: true,
|
||||
secondSync: false
|
||||
})
|
||||
}
|
||||
}else{
|
||||
} else if (result.data.mirror_status === 2) {
|
||||
this.deleteProjectBack();
|
||||
} else {
|
||||
this.getDetail();
|
||||
this.setState({
|
||||
firstSync:false,
|
||||
secondSync:false
|
||||
firstSync: false,
|
||||
secondSync: false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -245,9 +247,9 @@ class Detail extends Component {
|
|||
}
|
||||
|
||||
// 工作流激活后修改状态
|
||||
changeOpenDevops=(flag)=>{
|
||||
changeOpenDevops = (flag) => {
|
||||
this.setState({
|
||||
open_devops:flag
|
||||
open_devops: flag
|
||||
})
|
||||
}
|
||||
canvasChannel = () => {
|
||||
|
@ -265,11 +267,15 @@ class Detail extends Component {
|
|||
disconnected: () => { },
|
||||
received: data => {
|
||||
console.log(`###### ---received data--- ######`);
|
||||
console.log(data);
|
||||
if (data) {
|
||||
if ( data.project && data.project.mirror_status === 2) {
|
||||
this.deleteProjectBack();
|
||||
}
|
||||
this.getDetail();
|
||||
this.setState({
|
||||
firstSync:false,
|
||||
secondSync:false
|
||||
firstSync: false,
|
||||
secondSync: false
|
||||
});
|
||||
cable.subscriptions.consumer.disconnect();
|
||||
}
|
||||
|
@ -277,8 +283,25 @@ class Detail extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
deleteProjectBack = () => {
|
||||
const { history } = this.props;
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
axios.delete(`/${owner}/${projectsId}.json`).then(res => {
|
||||
let hash = '/projects/mirror/new';
|
||||
if (res && res.data) {
|
||||
history.push({
|
||||
pathname: hash,
|
||||
mirror_status: 2
|
||||
});
|
||||
}
|
||||
else {
|
||||
window.location.hash = hash;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getDetail = () => {
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
this.getBanner();
|
||||
const url = `/${owner}/${projectsId}/detail.json`;
|
||||
axios.get(url).then((result) => {
|
||||
|
@ -295,29 +318,29 @@ class Detail extends Component {
|
|||
watchers_count: result.data.watchers_count,
|
||||
praises_count: result.data.praises_count,
|
||||
forked_count: result.data.forked_count,
|
||||
defaultBranch:result.data.default_branch
|
||||
defaultBranch: result.data.default_branch
|
||||
})
|
||||
}
|
||||
}).catch((error) => { })
|
||||
}
|
||||
|
||||
// 获取动态导航栏菜单
|
||||
getBanner(){
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
getBanner() {
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
const url = `/${owner}/${projectsId}/menu_list.json`;
|
||||
axios.get(url).then(result=>{
|
||||
if(result){
|
||||
axios.get(url).then(result => {
|
||||
if (result) {
|
||||
this.setState({
|
||||
bannerList:result.data
|
||||
bannerList: result.data
|
||||
})
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}).catch(error => { })
|
||||
}
|
||||
|
||||
// 关注和取消关注
|
||||
focusFunc = (flag) => {
|
||||
const { platform } = this.state;
|
||||
if(!platform)return;
|
||||
if (!platform) return;
|
||||
|
||||
const { project_id } = this.state;
|
||||
axios({
|
||||
|
@ -332,15 +355,15 @@ class Detail extends Component {
|
|||
this.setWatchersCount(result.data.watchers_count, result.data.watched);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
// 点赞和取消点赞
|
||||
pariseFunc = (flag) => {
|
||||
const { platform } = this.state;
|
||||
if(!platform)return;
|
||||
if (!platform) return;
|
||||
const { project_id } = this.state;
|
||||
axios({
|
||||
method: flag ? 'delete' : 'post',
|
||||
|
@ -350,9 +373,9 @@ class Detail extends Component {
|
|||
this.setPraisesCount(result.data.praises_count, result.data.praised)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
setWatchersCount = (count, is_watched) => {
|
||||
|
@ -372,24 +395,24 @@ class Detail extends Component {
|
|||
// fork项目
|
||||
forkFunc = () => {
|
||||
const { platform } = this.state;
|
||||
if(!platform)return;
|
||||
if (!platform) return;
|
||||
this.setState({
|
||||
forkSpin:true
|
||||
forkSpin: true
|
||||
})
|
||||
const { current_user } = this.props
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
const url = `/${owner}/${projectsId}/forks.json`;
|
||||
axios.post(url).then(result => {
|
||||
if (result && result.data.status === 0) {
|
||||
this.props.history.push(`/projects/${current_user && current_user.login}/${result.data.identifier}`);
|
||||
this.props.history.push(`/${current_user && current_user.login}/${result.data.identifier}`);
|
||||
this.props.showNotification(result.data.message);
|
||||
}
|
||||
this.setState({
|
||||
forkSpin:false
|
||||
forkSpin: false
|
||||
})
|
||||
}).catch(error => {
|
||||
this.setState({
|
||||
forkSpin:false
|
||||
forkSpin: false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -397,8 +420,8 @@ class Detail extends Component {
|
|||
// 同步镜像
|
||||
synchronismMirror = () => {
|
||||
const { platform } = this.state;
|
||||
if(!platform)return;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
if (!platform) return;
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
const url = `/${owner}/${projectsId}/sync_mirror.json`;
|
||||
axios.post(url).then(result => {
|
||||
if (result && result.data && result.data.status === 0) {
|
||||
|
@ -412,344 +435,345 @@ class Detail extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
textFunc = (forked_from_project_id,fork_info)=>{
|
||||
textFunc = (forked_from_project_id, fork_info) => {
|
||||
let type = fork_info && fork_info.fork_project_user_type;
|
||||
return forked_from_project_id && fork_info ?
|
||||
<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>
|
||||
<Link to={`/${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 task-hide flex1" style={{maxWidth:"400px"}} title={fork_info.fork_form_name}>{fork_info.fork_form_name}</Link>
|
||||
<Link to={`/${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> : ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
const { projectDetail, watchers_count, praises_count,
|
||||
forked_count, firstSync , secondSync ,
|
||||
isManager, watched, praised,
|
||||
project , open_devops , platform , defaultBranch , bannerList , forkSpin } = this.state;
|
||||
const { projectDetail, watchers_count, praises_count,
|
||||
forked_count, firstSync, secondSync,
|
||||
isManager, watched, praised,
|
||||
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);
|
||||
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { projectsId, owner } = this.props.match.params;
|
||||
const { current_user } = this.props;
|
||||
let pathname = checkPathname(projectsId,owner,url);
|
||||
let pathname = checkPathname(projectsId, owner, url);
|
||||
|
||||
const { state } = this.props.history.location;
|
||||
|
||||
|
||||
const common = {
|
||||
getDetail: this.getDetail,
|
||||
changeOpenDevops:this.changeOpenDevops,
|
||||
changeOpenDevops: this.changeOpenDevops,
|
||||
defaultBranch
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<div className="detailHeader-wrapper">
|
||||
<div className="normal">
|
||||
<AlignTop style={{padding:"20px 0px 10px",justifyContent:"space-between"}}>
|
||||
<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>
|
||||
<Link to={`/${project.author.login}`}>{project.author.name}</Link>
|
||||
}
|
||||
<span className="ml5 mr5">/</span>
|
||||
<Link to={`/projects/${owner}/${projectsId}`} className="projectN mt6">{projectDetail && projectDetail.name}</Link>
|
||||
<Link to={`/${owner}/${projectsId}`} className="projectN mt6">{projectDetail && projectDetail.name}</Link>
|
||||
</div>
|
||||
{ projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
|
||||
{projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
|
||||
</AlignTop>
|
||||
<div className="mt8">
|
||||
{
|
||||
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
|
||||
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
|
||||
:""
|
||||
this.textFunc(projectDetail.forked_from_project_id, projectDetail.fork_info)
|
||||
: ""
|
||||
}
|
||||
{
|
||||
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
|
||||
<span className="color-grey-9">镜像自 <a className="color-grey-6" target="_blank" href={projectDetail.mirror_url}>{projectDetail.mirror_url}</a></span>
|
||||
:""
|
||||
projectDetail && 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>
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{
|
||||
firstSync ? "":
|
||||
<span className="df">
|
||||
{
|
||||
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
|
||||
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
|
||||
}
|
||||
<Button className="detail_tag_btn">
|
||||
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={() => this.focusFunc(watched)}>
|
||||
<i className={watched ? "iconfont icon-shixing color-orange font-16 mr3":"iconfont icon-kongxing color-grey-9 font-16 mr3"}></i>
|
||||
<span>{watched ? '取消关注' : '关注'}</span>
|
||||
</a>
|
||||
firstSync ? "" :
|
||||
<span className="df">
|
||||
{
|
||||
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>
|
||||
:""
|
||||
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
|
||||
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
|
||||
}
|
||||
</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>复刻
|
||||
<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>
|
||||
</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>
|
||||
{
|
||||
watchers_count > 0 ?
|
||||
platform ?
|
||||
<Link className="detail_tag_btn_count" style={{ color: `${watched ? "#2878FF" : "#666"}` }} to={platform ? { pathname: `/${owner}/${projectsId}/following`, 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: `/${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: `/${owner}/${projectsId}/members`, state }}>
|
||||
{forked_count}
|
||||
</Link>
|
||||
:
|
||||
<span className="detail_tag_btn_count">{forked_count}</span>
|
||||
: ""
|
||||
}
|
||||
</Button>
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
</AlignTop>
|
||||
{
|
||||
firstSync ? "" :
|
||||
<DetailBanner
|
||||
history={this.props.history}
|
||||
list={bannerList}
|
||||
owner={owner}
|
||||
projectsId={projectsId}
|
||||
pathname={pathname}
|
||||
state={state}
|
||||
projectDetail={projectDetail}
|
||||
open_devops={open_devops}
|
||||
platform={platform}
|
||||
urlFlag={urlFlag}
|
||||
isManager={isManager}
|
||||
/>
|
||||
<DetailBanner
|
||||
history={this.props.history}
|
||||
list={bannerList}
|
||||
owner={owner}
|
||||
projectsId={projectsId}
|
||||
pathname={pathname}
|
||||
state={state}
|
||||
projectDetail={projectDetail}
|
||||
open_devops={open_devops}
|
||||
platform={platform}
|
||||
urlFlag={urlFlag}
|
||||
isManager={isManager}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
firstSync ?
|
||||
<Content className="spincontent">
|
||||
<Spin className="spinstyle" tip={project && `正在从 ${project.mirror_url} 迁移`} size="large" />
|
||||
</Content>
|
||||
:
|
||||
<Spin spinning={secondSync} className="spinstyle" tip="正在同步镜像" size="large">
|
||||
<Switch {...this.props}>
|
||||
{/* 资源 */}
|
||||
<Route path="/projects/:owner/:projectsId/source"
|
||||
render={
|
||||
() => (<Source {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 主页 */}
|
||||
<Route path="/projects/:owner/:projectsId/about"
|
||||
render={
|
||||
() => (<DevAbout {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* wiki新增文件 */}
|
||||
<Route path="/projects/:owner/:projectsId/wiki/add"
|
||||
render={
|
||||
() => (<WikiEdit {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* wiki编辑文件 */}
|
||||
<Route path="/projects/:owner/:projectsId/wiki/edit/:wikiName"
|
||||
render={
|
||||
() => (<WikiEdit {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* wiki */}
|
||||
<Route path="/projects/:owner/:projectsId/wiki"
|
||||
render={
|
||||
() => (<Wiki {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 工作流 */}
|
||||
<Route path="/projects/:owner/:projectsId/devops"
|
||||
render={
|
||||
() => (<DevIndex {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 标签列表 */}
|
||||
<Route path="/projects/:owner/:projectsId/issues/tags"
|
||||
render={
|
||||
(props) => (<TagList {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 仓库设置 */}
|
||||
<Route path="/projects/:owner/:projectsId/setting"
|
||||
render={
|
||||
(props) => (<Setting {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 任务详情 */}
|
||||
<Route path="/projects/:owner/:projectsId/issues/:orderId/detail"
|
||||
render={
|
||||
(props) => (<OrderDetail {...this.props} {...this.state} {...props} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/*修改里程碑*/}
|
||||
<Route path="/projects/:owner/:projectsId/milestones/:meilid/edit"
|
||||
render={
|
||||
(props) => (<OrderupdateMilepost {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 新建里程碑 */}
|
||||
<Route path="/projects/:owner/:projectsId/milestones/new"
|
||||
render={
|
||||
(props) => (<OrdernewMilepost {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/*里程碑详情*/}
|
||||
<Route path="/projects/:owner/:projectsId/milestones/:meilid"
|
||||
render={
|
||||
(props) => (<MilepostDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 里程碑 */}
|
||||
<Route path="/projects/:owner/:projectsId/milestones"
|
||||
render={
|
||||
(props) => (<OrderMilepost {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 里程碑页面新建任务 */}
|
||||
<Route path="/projects/:owner/:projectsId/issues/:milepostId/new"
|
||||
render={
|
||||
(props) => (<OrderNew {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 新建任务 */}
|
||||
<Route path="/projects/:owner/:projectsId/issues/new"
|
||||
render={
|
||||
(props) => (<OrderNew {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 修改详情 */}
|
||||
<Route path="/projects/:owner/:projectsId/issues/:orderId/updatedetail"
|
||||
render={
|
||||
(props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 复制详情 */}
|
||||
<Route path="/projects/:owner/:projectsId/issues/:orderId/copyetail"
|
||||
render={
|
||||
(props) => (<OrdercopyDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 动态 */}
|
||||
<Route path="/projects/:owner/:projectsId/activity"
|
||||
render={
|
||||
(props) => (<TrendsIndex {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 代码Index */}
|
||||
<Route path="/projects/:owner/:projectsId/issues"
|
||||
render={
|
||||
(props) => (<OrderIndex {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 新建合并请求 */}
|
||||
<Route path="/projects/:owner/:projectsId/pulls/new/:branch"
|
||||
render={
|
||||
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/pulls/new"
|
||||
render={
|
||||
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/pulls/:mergeId/UpdateMerge"
|
||||
render={
|
||||
(props) => (<UpdateMerge {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/pulls/:mergeId/Messagecount"
|
||||
render={
|
||||
(props) => (<MessageCount {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/pulls/:mergeId/MergeSubmit"
|
||||
render={
|
||||
(props) => (<MessageCount {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Content className="spincontent">
|
||||
<Spin className="spinstyle" tip={project && `正在从 ${project.mirror_url} 迁移`} size="large" />
|
||||
</Content>
|
||||
:
|
||||
<Spin spinning={secondSync} className="spinstyle" tip="正在同步镜像" size="large">
|
||||
<Switch {...this.props}>
|
||||
{/* 资源 */}
|
||||
<Route path="/:owner/:projectsId/source"
|
||||
render={
|
||||
() => (<Source {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 主页 */}
|
||||
<Route path="/:owner/:projectsId/about"
|
||||
render={
|
||||
() => (<DevAbout {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* wiki新增文件 */}
|
||||
<Route path="/:owner/:projectsId/wiki/add"
|
||||
render={
|
||||
() => (<WikiEdit {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* wiki编辑文件 */}
|
||||
<Route path="/:owner/:projectsId/wiki/edit/:wikiName"
|
||||
render={
|
||||
() => (<WikiEdit {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* wiki */}
|
||||
<Route path="/:owner/:projectsId/wiki"
|
||||
render={
|
||||
() => (<Wiki {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 工作流 */}
|
||||
<Route path="/:owner/:projectsId/devops"
|
||||
render={
|
||||
() => (<DevIndex {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 标签列表 */}
|
||||
<Route path="/:owner/:projectsId/issues/tags"
|
||||
render={
|
||||
(props) => (<TagList {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 仓库设置 */}
|
||||
<Route path="/:owner/:projectsId/settings"
|
||||
render={
|
||||
(props) => (<Setting {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/*修改里程碑*/}
|
||||
<Route path="/:owner/:projectsId/milestones/:meilid/edit"
|
||||
render={
|
||||
(props) => (<OrderupdateMilepost {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 新建里程碑 */}
|
||||
<Route path="/:owner/:projectsId/milestones/new"
|
||||
render={
|
||||
(props) => (<OrdernewMilepost {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/*里程碑详情*/}
|
||||
<Route path="/:owner/:projectsId/milestones/:meilid"
|
||||
render={
|
||||
(props) => (<MilepostDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 里程碑 */}
|
||||
<Route path="/:owner/:projectsId/milestones"
|
||||
render={
|
||||
(props) => (<OrderMilepost {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 里程碑页面新建任务 */}
|
||||
<Route path="/:owner/:projectsId/issues/:milepostId/new"
|
||||
render={
|
||||
(props) => (<OrderNew {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 新建任务 */}
|
||||
<Route path="/:owner/:projectsId/issues/new"
|
||||
render={
|
||||
(props) => (<OrderNew {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 修改详情 */}
|
||||
<Route path="/:owner/:projectsId/issues/:orderId/updatedetail"
|
||||
render={
|
||||
(props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 复制详情 */}
|
||||
<Route path="/:owner/:projectsId/issues/:orderId/copyetail"
|
||||
render={
|
||||
(props) => (<OrdercopyDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 任务详情 */}
|
||||
<Route path="/:owner/:projectsId/issues/:orderId"
|
||||
render={
|
||||
(props) => (<OrderDetail {...this.props} {...this.state} {...props} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 动态 */}
|
||||
<Route path="/:owner/:projectsId/activity"
|
||||
render={
|
||||
(props) => (<TrendsIndex {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 代码Index */}
|
||||
<Route path="/:owner/:projectsId/issues"
|
||||
render={
|
||||
(props) => (<OrderIndex {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 新建合并请求 */}
|
||||
<Route path="/:owner/:projectsId/pulls/new/:branch"
|
||||
render={
|
||||
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/pulls/new"
|
||||
render={
|
||||
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/pulls/:mergeId/UpdateMerge"
|
||||
render={
|
||||
(props) => (<UpdateMerge {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/pulls/:mergeId/Messagecount"
|
||||
render={
|
||||
(props) => (<MessageCount {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/pulls/:mergeId/MergeSubmit"
|
||||
render={
|
||||
(props) => (<MessageCount {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route path="/projects/:owner/:projectsId/pulls"
|
||||
render={
|
||||
(props) => (<MergeIndexDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/watchers"
|
||||
render={
|
||||
(props) => (<WatchUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/stargazers"
|
||||
render={
|
||||
(props) => (<PraiseUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/fork_users"
|
||||
render={
|
||||
(props) => (<ForkUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 贡献者列表 */}
|
||||
<Route path="/projects/:owner/:projectsId/contribute"
|
||||
render={
|
||||
() => (<Contribute {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/pulls"
|
||||
render={
|
||||
(props) => (<MergeIndexDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/following"
|
||||
render={
|
||||
(props) => (<WatchUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/stargazers"
|
||||
render={
|
||||
(props) => (<PraiseUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/members"
|
||||
render={
|
||||
(props) => (<ForkUsers {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 贡献者列表 */}
|
||||
<Route path="/:owner/:projectsId/contribute"
|
||||
render={
|
||||
() => (<Contribute {...this.props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 代码库----详情页面 */}
|
||||
<Route path="/projects/:owner/:projectsId/commits/branch/:branchName"
|
||||
render={
|
||||
(props) => (<CoderRootCommit {...this.props} {...props} {...this.state} {...common}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/tree/:branchName"
|
||||
render={
|
||||
(props) => (<CoderDepot {...this.props} {...props} {...this.state} {...common}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId/:subIndex"
|
||||
render={
|
||||
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} {...common}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/projects/:owner/:projectsId"
|
||||
render={
|
||||
(props) => (<CoderDepot {...this.props} {...props} {...this.state} {...common}/>)
|
||||
}
|
||||
></Route>
|
||||
</Switch>
|
||||
</Spin>
|
||||
{/* 代码库----详情页面 */}
|
||||
<Route path="/:owner/:projectsId/commits/branch/:branchName"
|
||||
render={
|
||||
(props) => (<CoderRootCommit {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/tree/:branchName"
|
||||
render={
|
||||
(props) => (<CoderDepot {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/:subIndex"
|
||||
render={
|
||||
(props) => (<CoderRootIndex {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId"
|
||||
render={
|
||||
(props) => (<CoderDepot {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
</Switch>
|
||||
</Spin>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -12,19 +12,19 @@ class DetailTop extends Component {
|
|||
{
|
||||
platform ?
|
||||
<React.Fragment>
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits`} className={pathname.indexOf("/commits") > 0 ? "active" : ""}>
|
||||
<Link to={`/${owner}/${projectsId}/commits`} className={pathname.indexOf("/commits") > 0 ? "active" : ""}>
|
||||
<i className="iconfont icon-tijiaojilu font-20 mr3 font-bd"></i>
|
||||
<span>{(coderCount && coderCount.commits_count) || 0}</span>个提交
|
||||
</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}/branchs`} className={pathname.indexOf("/branchs") > 0 ? "active" : ""}>
|
||||
<Link to={`/${owner}/${projectsId}/branches`} className={pathname.indexOf("/branches") > 0 ? "active" : ""}>
|
||||
<i className="iconfont icon-fenzhi1 font-18 mr3"></i>
|
||||
<span>{(coderCount && coderCount.branches_count) || 0}</span>个分支
|
||||
</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}/tag`} className={pathname.indexOf("/tag") > 0 ? "active" : ""}>
|
||||
<Link to={`/${owner}/${projectsId}/tags`} className={pathname.indexOf("/tags") > 0 ? "active" : ""}>
|
||||
<i className="iconfont icon-biaoqian3 font-18 mr3"></i>
|
||||
<span>{(coderCount && coderCount.tags_count) || 0}</span>个标签
|
||||
</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}/releases`} className={pathname.indexOf("/releases") > 0 ? "active" : ""}>
|
||||
<Link to={`/${owner}/${projectsId}/releases`} className={pathname.indexOf("/releases") > 0 ? "active" : ""}>
|
||||
<i className="iconfont icon-fahangban font-18 mr3"></i>
|
||||
<span>{(coderCount && coderCount.version_releasesed_count) || 0}</span>个发行版
|
||||
</Link>
|
||||
|
|
|
@ -59,7 +59,7 @@ export default ({ match , history }) => {
|
|||
{commit && commit.message &&
|
||||
<pre className="task-hide" style={{marginBottom:"0px",height:"28px",whiteSpace:"pre-wrap"}}>{commit.message}</pre>
|
||||
}
|
||||
<Button type="primary" onClick={()=>{history.push(`/projects/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`)}} className="ml30">浏览代码</Button>
|
||||
<Button type="primary" onClick={()=>{history.push(`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`)}} className="ml30">浏览代码</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="f-wrap-between" style={{ alignItems: "center" }}>
|
||||
|
|
|
@ -0,0 +1,364 @@
|
|||
.recommandOri.slick-slider {
|
||||
width: 1300px;
|
||||
margin: 20px auto 40px;
|
||||
}
|
||||
.recommandOri.slick-slider .slick-track {
|
||||
margin-left: 0px;
|
||||
}
|
||||
.recommandOri.slick-slider .slick-slide li > a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* recommandProjects */
|
||||
.recommandProjects.slick-slider {
|
||||
width: 1230px;
|
||||
margin: 20px auto 40px;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-track {
|
||||
margin-left: 0px;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-arrow.slick-prev:before, .recommandProjects.slick-slider .slick-arrow.slick-next:before {
|
||||
color: #999;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-arrow.slick-prev li.slick-active button:before, .recommandProjects.slick-slider .slick-arrow.slick-next li.slick-active button:before {
|
||||
color: #999;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-dots {
|
||||
bottom: -29px;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-dots li button:before {
|
||||
color: #909090;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-slide {
|
||||
padding: 0px 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-slide > div {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.recommandProjects.slick-slider .slick-slide > div:hover {
|
||||
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.recommandProjects.slick-slider .baseInfo {
|
||||
padding: 18px 15px;
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
}
|
||||
.recommandProjects.slick-slider .baseInfo .look {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.recommandProjects.slick-slider .baseInfo .look i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.recommandProjects.slick-slider .baseInfo .type {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
text-align: right;
|
||||
}
|
||||
.recommandProjects.slick-slider .mainInfo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 160px;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.recommandProjects.slick-slider .mainInfo img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.recommandProjects.slick-slider .mainInfo .name {
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.recommandProjects.slick-slider .mainInfo .school {
|
||||
margin-top: 12px;
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.Panels {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.Panels .panelmenu {
|
||||
padding-top: 30px;
|
||||
}
|
||||
.Panels .addOptionBtn {
|
||||
height: 32px;
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.Panels .addOptionBtn a {
|
||||
padding: 0px 13px;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
cursor: pointer;
|
||||
}
|
||||
.Panels .addOptionBtn > a:first-child {
|
||||
border-right: 1px solid #d9d9d9;
|
||||
}
|
||||
.Panels .addOptionBtn > a:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.Panels .infoCount {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
text-align: center;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
background-color: rgba(153, 153, 153, 0.13);
|
||||
color: #666;
|
||||
border-radius: 12px;
|
||||
margin-left: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.Panels .attrPerson {
|
||||
padding-top: 15px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.Panels .attrPerson a {
|
||||
margin: 10px 10px 0px 0px;
|
||||
}
|
||||
.Panels .attrPerson a img {
|
||||
border-radius: 50%;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
}
|
||||
.Panels .attrPerson a:nth-child(6) {
|
||||
margin-right: 0px;
|
||||
}
|
||||
.Panels .progress {
|
||||
display: flex;
|
||||
border-radius: 10px;
|
||||
height: 7px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.Panels .progress span:first-child {
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
}
|
||||
.Panels .progress span:last-child {
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
}
|
||||
.Panels .progresstip {
|
||||
margin-top: 15px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.Panels .progresstip i.zero {
|
||||
position: absolute;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
left: 0px;
|
||||
top: 10px;
|
||||
}
|
||||
.Panels .progresstip > span {
|
||||
padding-left: 15px;
|
||||
position: relative;
|
||||
min-width: 33.5%;
|
||||
}
|
||||
.Panels .progresstip > span span {
|
||||
color: #666;
|
||||
}
|
||||
.Panels .progresstip > span span:last-child {
|
||||
color: #999;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.Panels .listtable {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.Panels .listtable .listtablehead {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding: 13px 20px;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
border: 1px solid rgba(42, 97, 255, 0.23);
|
||||
}
|
||||
.Panels .listtable .listtablehead .ellipsistxt {
|
||||
margin-top: 6px;
|
||||
margin-left: 13px;
|
||||
line-height: 18px;
|
||||
flex: 1;
|
||||
width: 0;
|
||||
color: #666;
|
||||
}
|
||||
.Panels .listtable .listtablehead .ellipsistxt #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;
|
||||
}
|
||||
.Panels .listtable .listtablehead .ellipsistxt.hidetxt {
|
||||
height: 18px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding-right: 8px;
|
||||
}
|
||||
.Panels .listtable .listtablehead .ellipsistxt.hidetxt::after {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
content: "...";
|
||||
}
|
||||
.Panels .listtable .listtablehead .ellipsis {
|
||||
margin-left: 8px;
|
||||
cursor: pointer;
|
||||
border-radius: 2px;
|
||||
height: 16px;
|
||||
background: rgba(153, 153, 153, 0.2);
|
||||
border-radius: 2px;
|
||||
padding: 0px 4px;
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
margin-top: 9px;
|
||||
}
|
||||
.Panels .listtable .listtablehead .ellipsis i {
|
||||
font-size: 15px !important;
|
||||
color: #333;
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
}
|
||||
.Panels .listtable .listtablebody {
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
border: 1px solid #D0D0D0;
|
||||
border-top: none;
|
||||
}
|
||||
.Panels .listtable .listtablebody li.listtablepath a {
|
||||
color: #40a9ff;
|
||||
}
|
||||
.Panels .listtable .listtablebody li.listtablepath p {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
.Panels .listtable .listtablebody > li {
|
||||
height: 44px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding: 0px 20px 0px 24px;
|
||||
}
|
||||
.Panels .listtable .listtablebody > li:hover {
|
||||
background-color: #F3F4F6;
|
||||
}
|
||||
.Panels .listtable .listtablebody > li > span:first-child {
|
||||
width: 30%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.Panels .listtable .listtablebody > li > span:nth-child(2) {
|
||||
width: 60%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.Panels .listtable .listtablebody > li > span:nth-child(3) {
|
||||
width: 10%;
|
||||
text-align: right;
|
||||
}
|
||||
.Panels .listtable .listtablebody > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.drawerBtn {
|
||||
position: fixed;
|
||||
left: -13px;
|
||||
border: 1px solid #cfcddf;
|
||||
width: 34px;
|
||||
border-radius: 0px 12px 12px 0px;
|
||||
height: 70px;
|
||||
top: 50%;
|
||||
margin-top: -35px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
}
|
||||
.drawerBtn:hover {
|
||||
box-shadow: 1px 0px 7px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.drawerBtn span {
|
||||
writing-mode: vertical-lr;
|
||||
color: #202429;
|
||||
width: 25px;
|
||||
}
|
||||
.drawerBtn i {
|
||||
color: #24292e;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.downMenu {
|
||||
width: 330px;
|
||||
box-shadow: 0px 0px 9px rgba(134, 134, 134, 0.4);
|
||||
background-color: #fff;
|
||||
}
|
||||
.downMenu .ant-menu-vertical .ant-menu-item:hover {
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
|
||||
.catelogue {
|
||||
border: 1px solid lightgray;
|
||||
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;
|
||||
}
|
||||
.catelogue span {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.submoduleStyle {
|
||||
cursor: default;
|
||||
}
|
||||
.submoduleStyle i {
|
||||
cursor: default;
|
||||
}
|
||||
.submoduleStyle:hover {
|
||||
color: #05101a;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=Index.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["Index.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;AACA;EACE;;AAGA;EAEE;EACA;EACA;;;AAIN;AACA;EACE;EACA;;AACA;EACE;;AAGA;EACE;;AAEF;EACE;;AAGJ;EACE;;AACA;EACE;;AAGJ;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;;AAIN;EACE;EACA;EACA;EACA;;AACA;EAIE;;AAHA;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKN;EACE;EACA;;AACA;EACE;;AAEF;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;;AAEF;EACE;;AAEF;EACE;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AACA;EACE;;AACA;EACE;EACA;EACA;;AAEF;EACE;;AAIN;EACE;EACA;EACA;EACA;;AAEE;EACE;;AAEF;EACE;;AAIN;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AACA;EACE;;AACA;EACE;EACA;;AAKR;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EAWA;EACA;EACA;EACA;EACA;;AAdA;EACE;EACA;EACA;EACA;AAAsB;EACtB;AAA2B;EAC3B;AAAuB;EACvB;AAAyB;EACzB;;AAOF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AAIN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AAIN;EACE;EACA;EACA;;AAEE;EAAE;;AACF;EACE;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;;AAGJ;EACE;;;AAKR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;;AAGJ;EACE;EACA;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;;AAGJ;EACE;;AACA;EACE;;AAEF;EACE","file":"Index.css"}
|
|
@ -1,18 +1,19 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Menu, Input , Spin, Pagination , Popover , Select } from 'antd';
|
||||
import Slider from "react-slick";
|
||||
import { getImageUrl } from 'educoder';
|
||||
import "slick-carousel/slick/slick.css";
|
||||
import "slick-carousel/slick/slick-theme.css";
|
||||
import '../css/index.scss'
|
||||
import './list.css';
|
||||
import './list.scss';
|
||||
import './Index.scss';
|
||||
import ListItem from './IndexItem'
|
||||
import axios from 'axios';
|
||||
import img_new from '../Images/new.png';
|
||||
import img_array from '../Images/array.png';
|
||||
import banner from '../Images/banner_list.jpg';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
|
||||
const Search = Input.Search;
|
||||
|
||||
class Index extends Component {
|
||||
|
@ -228,7 +229,7 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
getoDetail=(login,identifier)=>{
|
||||
this.props.history.push(`/projects/${login}/${identifier}`);
|
||||
this.props.history.push(`/${login}/${identifier}`);
|
||||
}
|
||||
|
||||
// 选择语言类别
|
||||
|
@ -255,8 +256,12 @@ class Index extends Component {
|
|||
newItem = ()=>{
|
||||
return(
|
||||
<Menu>
|
||||
<Menu.Item key="created_mirror"><Link to={`/projects/mirror/new`}>新建镜像项目</Link></Menu.Item>
|
||||
<Menu.Item key="created_deposit"><Link to={`/projects/deposit/new`}>新建托管项目</Link></Menu.Item>
|
||||
<Menu.Item key="created_mirror">
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/mirror/new')}}>新建镜像项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="created_deposit">
|
||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push('/projects/deposit/new')}}>新建托管项目</CheckProfile>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -129,13 +129,14 @@
|
|||
}
|
||||
.infoCount{
|
||||
display: inline-block;
|
||||
padding:0px 5px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
background-color: #eee;
|
||||
color:#999;
|
||||
width: 24px;
|
||||
text-align: center;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
background-color:rgba(153, 153, 153, 0.13);;
|
||||
color:#666;
|
||||
border-radius: 12px;
|
||||
margin-left: 10px;
|
||||
margin-left: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.attrPerson{
|
||||
|
@ -195,16 +196,14 @@
|
|||
}
|
||||
.listtable{
|
||||
margin-top: 20px;
|
||||
border:1px solid #d9d9d9;
|
||||
border-radius: 4px;
|
||||
.listtablehead{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding:7px 20px;
|
||||
padding:13px 20px;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
background-color: #FAFBFC;
|
||||
border: 1px solid rgba(42, 97, 255, 0.23);
|
||||
.ellipsistxt{
|
||||
margin-top: 6px;
|
||||
#ptxt{
|
||||
|
@ -239,20 +238,25 @@
|
|||
margin-left: 8px;
|
||||
cursor: pointer;
|
||||
border-radius: 2px;
|
||||
background-color: #c1c1c1;
|
||||
height: 16px;
|
||||
background: rgba(153, 153, 153, 0.2);
|
||||
border-radius: 2px;
|
||||
padding:0px 4px;
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
margin-top: 9px;
|
||||
i{
|
||||
font-size: 15px!important;
|
||||
color: #fff;
|
||||
color: #333;
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.listtablebody{
|
||||
border-radius:0px 0px 4px 4px ;
|
||||
border: 1px solid #D0D0D0;
|
||||
border-top: none;
|
||||
li.listtablepath{
|
||||
a{color: #40a9ff;}
|
||||
p{
|
||||
|
@ -260,12 +264,15 @@
|
|||
}
|
||||
}
|
||||
& > li{
|
||||
height: 42px;
|
||||
height: 44px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding:0px 20px 0px 24px;
|
||||
&:hover{
|
||||
background-color: #F3F4F6;
|
||||
}
|
||||
& > span:first-child{
|
||||
width: 30%;
|
||||
overflow: hidden;
|
||||
|
@ -327,25 +334,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.menuslist{
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
padding:10px 15px;
|
||||
border-radius: 4px;
|
||||
.ant-dropdown-menu-item{
|
||||
border-radius: 8px;
|
||||
text-align: left!important;
|
||||
a{
|
||||
width: 350px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.ant-dropdown-menu-item.active{
|
||||
background-color: #e6f7ff;
|
||||
}
|
||||
}
|
||||
.catelogue{
|
||||
border:1px solid rgb(211, 211, 211);
|
||||
font-size: 15px;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { AlignCenter } from '../Component/layout';
|
|||
import { Link } from 'react-router-dom';
|
||||
import '../css/index.scss';
|
||||
import Nodata from '../Nodata';
|
||||
import './list.css';
|
||||
import './list.scss';
|
||||
import img_parise from '../Images/parise.png';
|
||||
|
||||
class IndexItem extends Component {
|
||||
|
@ -28,14 +28,14 @@ class IndexItem extends Component {
|
|||
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
|
||||
</a>
|
||||
:
|
||||
<Link to={item.author && (item.author.type === "Organization" ? `/organize/${item.author.login}`:`/users/${item.author.login}`)} className="show-user-link">
|
||||
<Link to={`/${item.author && item.author.login}`} className="show-user-link">
|
||||
<img className="p-r-photo" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
|
||||
</Link>
|
||||
}
|
||||
<div className="p-r-Infos">
|
||||
<div className="p-r-name">
|
||||
<AlignCenter>
|
||||
<Link to={`/projects/${item.author.login}/${item.identifier}`} title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
|
||||
<Link to={`/${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> }
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["list.scss"],"names":[],"mappings":";AACA;EAAQ;;;AACR;AACE;AAAA;EAEA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAIF;AACA;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EAAsC;;;AACtC;EAAwC;;;AACxC;EACE;EACA;EACA;EACA;EACA;EACA;;;AAIF;AACA;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;AACA;EACE;EACA;AACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EAAkB;EAAmB;;;AACrC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;AACA;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AACA;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;AACE;EACA;;;AAEF;EACE;;;AAKF;EACE;IACE;;;EAEF;IACE;IACA;;;AAIJ;EACE;IACE;;;EAEF;IACE;IACA;;;EAEF;IACE;;;EAEF;IACE;IACA;;;EAEF;IACE;;;EAEF;IACE;;;AAGJ;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;AAAoB;EACpB;EACA;EACA;EACA;EACA;;;AAEF;EACE;;AACA;EACE;EACA;EACA;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAGA;EACE;;;AAGJ;EACE;EACA;EACA;;;AAGF;EACE;IACE;IACA;;;EAEF;IACE;;;EAEF;IACE;;;EAEF;IACE;;;AAGJ;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAGF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACA;;;AAEA;EAAc;;;AAEd;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EAAa;;;AACb;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EAAY;;;AAEZ;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAIF;AACA;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;AACA;EACE;;AAEF;EACE","file":"list.css"}
|
|
@ -0,0 +1,775 @@
|
|||
|
||||
.lineH2{line-height:2}
|
||||
.t_project_banner {
|
||||
/* height: 260px;
|
||||
background: url(../Images/banner_list.jpg) no-repeat center; */
|
||||
background-color: #050d34;
|
||||
}
|
||||
.ProjectListIndex{
|
||||
width: 1200px;
|
||||
margin:20px auto;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-wrap:wrap;
|
||||
}
|
||||
.list-left{
|
||||
width: 26%;
|
||||
padding-right: 20px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.list-left > div{
|
||||
border:1px solid #eee;
|
||||
}
|
||||
.list-left > div.bgcF{
|
||||
border:none;
|
||||
}
|
||||
.list-right{
|
||||
width:74%;
|
||||
background: #fff;
|
||||
padding:10px;
|
||||
border:1px solid #eee;
|
||||
}
|
||||
|
||||
|
||||
/* 首页列表的新建和排序的下拉列表 */
|
||||
.ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left{
|
||||
border-right: none!important;
|
||||
}
|
||||
.ant-menu-vertical > .ant-menu-item{
|
||||
margin:0px!important;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 14px!important;
|
||||
}
|
||||
.ant-menu-vertical > .ant-menu-item:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
||||
.list-r-operation{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
padding:25px 30px;
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
}
|
||||
.list-r-Search{
|
||||
width: 400px;
|
||||
}
|
||||
.padding0-25{
|
||||
padding:0px 25px;
|
||||
}
|
||||
.list-r-Search .ant-btn-lg{
|
||||
height: 38px;
|
||||
}
|
||||
.list-r-Search .ant-input-group-addon{border: none !important;}
|
||||
.list-r-Search .ant-input-search-button{height: 40px !important;}
|
||||
.createBtn{
|
||||
border-radius: 4px;
|
||||
margin-left: 20px;
|
||||
display: inline-block;
|
||||
padding:3px 15px;
|
||||
background-color: #4CACFF;
|
||||
color: #fff!important;
|
||||
}
|
||||
|
||||
|
||||
/* 列表 */
|
||||
.project-list{
|
||||
padding:0px 30px;
|
||||
}
|
||||
.border-top-grey{
|
||||
border-top: 1px solid rgba(238,238,238,1);
|
||||
}
|
||||
.p-r-Item:last-child{
|
||||
border-bottom: none !important;
|
||||
}
|
||||
.p-r-Item{
|
||||
display: flex;
|
||||
border-bottom:1px solid rgba(238,238,238,1);
|
||||
padding:22px 0px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.boxShandow{
|
||||
box-shadow:0px 2px 20px 10px rgba(0,0,0,0.03);
|
||||
}
|
||||
.p-r-photo{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
margin-right: 22px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.p-r-Infos{
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
.p-r-name{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.p-r-name > p{
|
||||
flex: 1;
|
||||
width: 0;
|
||||
}
|
||||
.p-r-btn{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.p-r-btn > span{
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
border:1px solid #f4f4f4;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
margin-left: 20px;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
}
|
||||
.p-r-btn > span > a{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:0px 12px;
|
||||
background:#ececec;
|
||||
}
|
||||
.p-r-btn > span > a:active{
|
||||
background: #f4f4f4;
|
||||
}
|
||||
.p-r-btn > span > span{
|
||||
padding:0px 8px;
|
||||
}
|
||||
.p-r-tags{
|
||||
display: flex;
|
||||
opacity: 1;
|
||||
}
|
||||
.p-r-tags.large > span{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.p-r-tags > span{
|
||||
margin-left: 15px;
|
||||
padding:0px 10px;
|
||||
border-radius:15px;
|
||||
background: #EBF4FE;
|
||||
color: #333;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
}
|
||||
.p-r-tags > span.pariseTag{
|
||||
background: #FFF3DC;
|
||||
}
|
||||
.p-r-tags.large > span >label{
|
||||
padding:0px 12px;
|
||||
}
|
||||
.p-r-tags > span >label{
|
||||
padding:0px 8px;
|
||||
}
|
||||
.p-r-tags.large > span >span{
|
||||
padding:0px 6px;
|
||||
}
|
||||
.pariseImg{
|
||||
width: 14px;
|
||||
height: 12px;
|
||||
margin-top: 6px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
.p-r-tags > span >span{
|
||||
display: block;
|
||||
background: #fff;
|
||||
border-left: #efefef;
|
||||
padding:0px 4px;
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
color: #999;
|
||||
}
|
||||
.p-r-content{
|
||||
margin-top:10px;
|
||||
color: #666;
|
||||
display: flex;
|
||||
}
|
||||
.p-r-detail > span{
|
||||
margin-right: 22px;
|
||||
color: #888;
|
||||
}
|
||||
.p-r-detail > span > label{
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.p-r-about{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: nowrap;
|
||||
margin-top: 8px;
|
||||
color: #666;
|
||||
}
|
||||
.spincontent{
|
||||
height:400px;
|
||||
}
|
||||
.spinstyle .ant-spin-text{
|
||||
margin-top:30px;
|
||||
color: #888;
|
||||
}
|
||||
/* -----------详情------------ */
|
||||
.detailHeader-wrapper{
|
||||
background-color:#FBFCFF;
|
||||
border-bottom:1px solid #e2e2e2;
|
||||
/* box-shadow: 0px 2px 11px 0px#D0D0D0; */
|
||||
}
|
||||
.headerMenu-wrapper{
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.headerMenu-wrapper li{
|
||||
position: relative;
|
||||
text-align: center;
|
||||
height: 40px;
|
||||
line-height: 28px;
|
||||
padding:0px 20px;
|
||||
}
|
||||
.headerMenu-wrapper li a{
|
||||
color: #666;
|
||||
}
|
||||
.headerMenu-wrapper li a > img{
|
||||
margin-right: 8px;
|
||||
}
|
||||
.headerMenu-wrapper li a > span.num{
|
||||
line-height: 24px;
|
||||
margin-left: 5px;
|
||||
margin-top: 2px;
|
||||
font-size: 12px;
|
||||
float: right;
|
||||
color: #666!important;
|
||||
background-color: rgba(153, 153, 153, 0.13);;
|
||||
border-radius: 50%;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.headerMenu-wrapper li.active a,.headerMenu-wrapper li.active a i{
|
||||
color: #2A61FF!important;
|
||||
}
|
||||
.headerMenu-wrapper li.active::after{
|
||||
position: absolute;
|
||||
bottom:0px;
|
||||
height:2px;
|
||||
background-color: #2A61FF;
|
||||
content:'';
|
||||
left: 0px;
|
||||
width:100%;
|
||||
}
|
||||
.detail_tag_btn{
|
||||
height:34px;
|
||||
line-height: 32px;
|
||||
border-radius:5px;
|
||||
border:1px solid #D0D0D0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 30px;
|
||||
padding:0px;
|
||||
background-color:#FAFBFC;
|
||||
box-shadow: none;
|
||||
}
|
||||
.detail_tag_btn:hover{
|
||||
background-color: #F3F4F6;
|
||||
}
|
||||
.ant-tooltip {
|
||||
max-width: fit-content!important;
|
||||
}
|
||||
.detail_tag_btn_name{
|
||||
padding:0px 10px;
|
||||
color: #666!important;
|
||||
}
|
||||
.detail_tag_btn_name img{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.detail_tag_btn_count{
|
||||
width: 42px;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
height:100%;
|
||||
border-left: 1px solid #D0D0D0;
|
||||
}
|
||||
.files-md{
|
||||
padding:20px;
|
||||
}
|
||||
/* 详情-代码 */
|
||||
.branch-wrapper{
|
||||
border:1px solid #eee;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 60px;
|
||||
padding:0px 30px;
|
||||
width: 1200px;
|
||||
margin:0px auto;
|
||||
background-color: #fff;
|
||||
margin-top: 20px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.branch-wrapper > a >i{
|
||||
color: #5091FF;
|
||||
margin-right: 5px;
|
||||
cursor: default;
|
||||
}
|
||||
.branch-wrapper a{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
}
|
||||
.branch-wrapper a > span{
|
||||
position: relative;
|
||||
min-height: 20px;
|
||||
display: block;
|
||||
}
|
||||
.branch-wrapper a.active > span::after{
|
||||
position: absolute;
|
||||
content: '';
|
||||
bottom: -5px;
|
||||
width: 30px;
|
||||
height: 3px;
|
||||
left: 0px;
|
||||
background-color:#5091FF;
|
||||
}
|
||||
|
||||
|
||||
.gitAddressClone{
|
||||
display: flex;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
border:1px solid #eee;
|
||||
background: #fff;
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
}
|
||||
.gitAddressClone > span{
|
||||
display: flex;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
padding:0px 12px;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
}
|
||||
.addressTips{
|
||||
position: absolute;
|
||||
font-size: 12px;
|
||||
color: #FF6E21;
|
||||
top:-34px;
|
||||
left: 30px;
|
||||
background-color: #fff;
|
||||
border:1px solid #FE881D;
|
||||
padding:0px 5px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
.addressTips>span{position: relative;display: block;}
|
||||
.addressTips>span::before{
|
||||
box-sizing: content-box;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left:50%;
|
||||
margin-left: -4px;
|
||||
padding:0;
|
||||
border-top:8px solid #FFFFFF;
|
||||
border-bottom:8px solid transparent;
|
||||
border-left:8px solid transparent;
|
||||
border-right:8px solid transparent;
|
||||
display: block;
|
||||
content:'';
|
||||
z-index: 12;
|
||||
}
|
||||
.addressTips>span::after{
|
||||
box-sizing: content-box;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
left:50%;
|
||||
margin-left: -4px;
|
||||
padding:0;
|
||||
border-top:8px solid #FE881D;
|
||||
border-bottom:8px solid transparent;
|
||||
border-left:8px solid transparent;
|
||||
border-right:8px solid transparent;
|
||||
display: block;
|
||||
content:'';
|
||||
z-index: 11;
|
||||
}
|
||||
.gitAddressClone > span.addressType{
|
||||
color: #4CACFF;
|
||||
}
|
||||
.gitAddressClone > span:last-child{
|
||||
border-right: none;
|
||||
}
|
||||
.gitAddressClone > input{
|
||||
border:none;
|
||||
outline: none;
|
||||
padding:0px 8px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 0px;
|
||||
border: 1px solid #eee;
|
||||
flex:1;
|
||||
}
|
||||
.wrap-commit-table .ant-table-small > .ant-table-content > .ant-table-body{
|
||||
margin:0px;
|
||||
}
|
||||
.wrap-commit-table .ant-table-title{
|
||||
background-color: rgba(241,248,255,1);
|
||||
padding: 13px 16px!important;
|
||||
}
|
||||
.commitKey{
|
||||
cursor: pointer;
|
||||
border:1px solid #FD7700;
|
||||
background-color:#FFF3DC;
|
||||
color: #FD7700!important;
|
||||
padding:0px 12px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin-left:15px;
|
||||
border-radius: 18px;
|
||||
max-width: 100%;
|
||||
}
|
||||
/* 分支 */
|
||||
.branchTitle{
|
||||
padding:8px 10px;
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
.branchUl li{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
padding:20px 0px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.branchUl li:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
.operationBtn{
|
||||
border:1px solid #f4f4f4;
|
||||
border-radius: 3px;
|
||||
padding:0px 6px;
|
||||
background-color:#fff;
|
||||
color:#666!important;
|
||||
display: inline-block;
|
||||
}
|
||||
.messages{
|
||||
max-width: 700px;
|
||||
}
|
||||
.leftPoint{
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
}
|
||||
.leftPoint::before{
|
||||
position: absolute;
|
||||
left: -10px;
|
||||
top:8px;
|
||||
border-radius: 50%;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
background-color: #dadada;
|
||||
content: '';
|
||||
}
|
||||
|
||||
/* 文件目录、文件内容 */
|
||||
.subFileName{
|
||||
position: relative;
|
||||
margin-left: 15px;
|
||||
height: 22px;
|
||||
}
|
||||
.subFileName::before{
|
||||
position: absolute;
|
||||
content: '/';
|
||||
left: -10px;
|
||||
top: 0px;
|
||||
color: #999;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.addFile{
|
||||
display: flex;
|
||||
}
|
||||
.addFile a{
|
||||
display: block;
|
||||
background-color: rgba(76, 172, 255,0.8);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
.addFile a:first-child{
|
||||
border-radius: 4px;
|
||||
}
|
||||
.addFile a:last-child{
|
||||
/* border-radius: 0px 4px 4px 0px; */
|
||||
border-left: 1px solid rgba(247, 247, 247, 0.3);
|
||||
}
|
||||
.addFile a:active{
|
||||
background-color: rgba(76, 172, 255,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media screen and (max-width: 750px){
|
||||
.list-r-Search{
|
||||
flex: 1;
|
||||
}
|
||||
.list-left,.list-right{
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 400px){
|
||||
.list-r-Search{
|
||||
width: 100%;
|
||||
}
|
||||
.headerMenu-wrapper{
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
.headerMenu-wrapper li{
|
||||
width: 100%;
|
||||
}
|
||||
.gitAddressClone{
|
||||
width:100%;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.gitAddressClone > span{
|
||||
padding:0px;
|
||||
}
|
||||
.messages{
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
.commonBox{
|
||||
border:1px solid #ddd;
|
||||
margin-top: 30px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.commonBox .commonBox-title{
|
||||
padding:0px 20px;
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
background: #FAFBFC;/* F1F8FF */
|
||||
font-weight: bold;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
}
|
||||
.readBox{
|
||||
border:none;
|
||||
&.commonBox .commonBox-info{
|
||||
border:1px solid #D0D0D0;
|
||||
border-top: none;
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
padding:20px 38px;
|
||||
}
|
||||
}
|
||||
.commonBox .commonBox-title.boxTitle{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 65px;
|
||||
line-height: 65px;
|
||||
background: #FAFCFF;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
border: 1px solid rgba(42, 97, 255, 0.23);
|
||||
}
|
||||
.synchronism{
|
||||
display: block;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
padding:0px 15px;
|
||||
color: #fff!important;
|
||||
background-color: #28BD6C;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.files_info{
|
||||
cursor: pointer;
|
||||
}
|
||||
.commonBox {
|
||||
.commonBox-info{
|
||||
padding:20px 15px;
|
||||
}
|
||||
}
|
||||
.commonBox-title-read{
|
||||
vertical-align: middle;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 370px){
|
||||
.p-r-tags,.p-r-btn{
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
.p-r-about{
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.commitKey{
|
||||
margin-right: 0px;
|
||||
}
|
||||
.list-r-Search{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.null_data_box{
|
||||
width: 100%;
|
||||
border: 1px solid #d4d4d5;
|
||||
border-radius:3px ;
|
||||
}
|
||||
.title{
|
||||
font-weight: bold;
|
||||
background: #f4f4f4;
|
||||
padding: 10px 15px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #d4d4d5;
|
||||
}
|
||||
.item_title{
|
||||
font-size:18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.item{
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #dededf;
|
||||
}
|
||||
.item:last-child{
|
||||
border-bottom:none;
|
||||
}
|
||||
.gitAddressClone{
|
||||
margin: 0 !important;
|
||||
}
|
||||
.item_title small{
|
||||
font-weight: 400;
|
||||
margin-left: 10px;
|
||||
|
||||
}
|
||||
.item_title small a{
|
||||
color: #4183c6;
|
||||
}
|
||||
.Markdown{
|
||||
background: #f7f7f7;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.item .gitAddressClone input:focus{
|
||||
border: 1px solid #2185d0;
|
||||
}
|
||||
.content-file{margin-top: 8px;}
|
||||
|
||||
.content-file .CodeMirror{
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #e4e4e4;
|
||||
border-radius: 4px;
|
||||
height: auto;
|
||||
}
|
||||
.content-file.edit .CodeMirror{
|
||||
background-color: #fff;
|
||||
}
|
||||
.content-file .CodeMirror .CodeMirror-scroll{
|
||||
min-height: 450px;
|
||||
}
|
||||
.text-center{text-align: center;}
|
||||
.fork-css{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50px;
|
||||
width: 100%;
|
||||
}
|
||||
.color-grey-ccc{
|
||||
color: #ccc !important;
|
||||
}
|
||||
a.color-grey-ccc:hover{
|
||||
color: #4cacff !important;
|
||||
}
|
||||
.pull-right{float: right;}
|
||||
|
||||
.commitList{
|
||||
padding:0px 30px;
|
||||
min-height: 400px;
|
||||
}
|
||||
.commitList > div{
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
padding:16px 0px;
|
||||
}
|
||||
.commitList > div:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
||||
/* 标签列表 */
|
||||
.div_table{
|
||||
border:1px solid #eee;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.ul_thead{
|
||||
padding:0px 30px;
|
||||
box-sizing: border-box;
|
||||
background: #FAFAFA;
|
||||
border-bottom: 1px solid #eee;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.ul_tbody{
|
||||
padding:0px 30px;
|
||||
}
|
||||
.ul_thead li, .ul_tbody li{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: left
|
||||
}
|
||||
.ul_tbody li{
|
||||
padding:18px 0px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.ul_tbody li:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
.ul_thead li > span , .ul_tbody li > span{
|
||||
width: 20%;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.ul_thead li > span:nth-child(2), .ul_tbody li > span:nth-child(2){
|
||||
flex:1;
|
||||
}
|
||||
.ul_tbody_third{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: left;
|
||||
}
|
||||
.ul_tbody_forth{
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.depotNum{
|
||||
color: #666!important;
|
||||
span:last-child{
|
||||
color: #333;
|
||||
}
|
||||
&:hover span:last-child{
|
||||
color: #2A61FF;
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@ function Contribute(props){
|
|||
<AlignCenter>
|
||||
<img alt="" style={{borderRadius:"50%",marginRight:"10px"}} src={getImageUrl(`/${item.image_url}`)} width="50px" height="50px"/>
|
||||
<div>
|
||||
<Link to={`/users/${item.login}`} className="font-16">{item.name}</Link>
|
||||
<Link to={`/${item.login}`} className="font-16">{item.name}</Link>
|
||||
<p className="font-12 color-grey-9">提交{item.contributions}次</p>
|
||||
</div>
|
||||
</AlignCenter>
|
||||
|
|
|
@ -10,7 +10,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
if(pathname && pathname==="source"){
|
||||
let a = list.filter(item=>item.menu_name === "resources");
|
||||
if(a && a.length === 0){
|
||||
history.push(`/projects/${owner}/${projectsId}`);
|
||||
history.push(`/${owner}/${projectsId}`);
|
||||
}
|
||||
}
|
||||
setMenuName(list);
|
||||
|
@ -28,7 +28,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
{
|
||||
item.menu_name === "home" &&
|
||||
<li className={pathname==="about" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/about`, state }}>
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/about`, state }}>
|
||||
<i className={(pathname==="" || urlFlag) ? "iconfont icon-zhuye1 color-grey-3 mr5 font-14":"iconfont icon-zhuye1 color-grey-6 font-14 mr5"}></i>
|
||||
<span>主页</span>
|
||||
</Link>
|
||||
|
@ -37,7 +37,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
{
|
||||
item.menu_name === "code" &&
|
||||
<li className={(pathname==="" || urlFlag) ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}`, state }}>
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}`, state }}>
|
||||
<i className={(pathname==="" || urlFlag) ? "iconfont icon-daimaku color-grey-3 mr5 font-14":"iconfont icon-daimaku color-grey-6 font-14 mr5"}></i>
|
||||
<span>代码库</span>
|
||||
</Link>
|
||||
|
@ -47,7 +47,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
item.menu_name === "issues" &&
|
||||
<li className={pathname==="issues" ? "active" : ""}>
|
||||
<Tooltip title="易修是Issue的中文名,即问题列表" placement="bottom">
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}>
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/issues`, state }}>
|
||||
<i className={pathname==="issues" ? "iconfont icon-renwu color-grey-3 mr5 font-14":"iconfont icon-renwu color-grey-6 font-14 mr5"}></i>
|
||||
<span>易修</span>
|
||||
{projectDetail && projectDetail.issues_count ? <span className="num">{projectDetail.issues_count}</span> : ""}
|
||||
|
@ -58,7 +58,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
{
|
||||
item.menu_name === "pulls" && projectDetail && parseInt(projectDetail.type) !== 2 && platform ?
|
||||
<li className={pathname==="pulls" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/pulls`, state }}>
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/pulls`, state }}>
|
||||
<i className={pathname==="pulls" ? "iconfont icon-hebingqingqiu1 color-grey-3 mr5 font-14":"iconfont icon-hebingqingqiu1 color-grey-6 font-14 mr5"}></i>
|
||||
<span>合并请求</span>
|
||||
{projectDetail && projectDetail.pull_requests_count ? <span className="num">{projectDetail.pull_requests_count}</span> : ""}
|
||||
|
@ -68,7 +68,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
{
|
||||
item.menu_name === "wiki" &&
|
||||
<li className={pathname === "wiki" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/wiki`, state }}>
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/wiki`, state }}>
|
||||
<i className={pathname==="wiki" ? "iconfont icon-wiki_icon color-grey-3 mr5 font-14":"iconfont icon-wiki_icon color-grey-6 font-14 mr5"}></i>
|
||||
<span>Wiki</span>
|
||||
</Link>
|
||||
|
@ -77,7 +77,8 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
{
|
||||
item.menu_name === "devops" && platform ?
|
||||
<li className={pathname==="devops" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}>
|
||||
{/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
|
||||
<i className="iconfont icon-gongzuoliu font-13 mr8"></i>工作流(beta版)
|
||||
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
|
||||
</Link>
|
||||
|
@ -85,19 +86,19 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
:""
|
||||
}
|
||||
{
|
||||
item.menu_name === "resources" &&
|
||||
<li className={pathname==="source" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/source`, state }}>
|
||||
<i className={pathname==="source" ? "iconfont icon-ziyuanpaihanghetuijian color-grey-3 mr5 font-14":"iconfont icon-ziyuanpaihanghetuijian color-grey-6 font-14 mr5"}></i>
|
||||
<span>资源库</span>
|
||||
{projectDetail && projectDetail.source_count ? <span className="num">{projectDetail.source_count}</span> :""}
|
||||
</Link>
|
||||
</li>
|
||||
// item.menu_name === "resources" &&
|
||||
// <li className={pathname==="source" ? "active" : ""}>
|
||||
// <Link to={{ pathname: `/${owner}/${projectsId}/source`, state }}>
|
||||
// <i className={pathname==="source" ? "iconfont icon-ziyuanpaihanghetuijian color-grey-3 mr5 font-14":"iconfont icon-ziyuanpaihanghetuijian color-grey-6 font-14 mr5"}></i>
|
||||
// <span>资源库</span>
|
||||
// {projectDetail && projectDetail.source_count ? <span className="num">{projectDetail.source_count}</span> :""}
|
||||
// </Link>
|
||||
// </li>
|
||||
}
|
||||
{
|
||||
item.menu_name === "versions" &&
|
||||
<li className={pathname==="milestones" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/milestones`, state }}>
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/milestones`, state }}>
|
||||
<i className={pathname==="milestones" ? "iconfont icon-lichengbei color-grey-3 mr5 font-14":"iconfont icon-lichengbei color-grey-6 font-14 mr5"}></i>
|
||||
<span>里程碑</span>
|
||||
{projectDetail && projectDetail.versions_count ? <span className="num">{projectDetail.versions_count}</span> :""}
|
||||
|
@ -107,17 +108,17 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
{
|
||||
item.menu_name === "activity" &&
|
||||
<li className={pathname==="activity" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${owner}/${projectsId}/activity`, state }}>
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/activity`, state }}>
|
||||
<i className={pathname==="activity" ? "iconfont icon-tongzhi color-grey-3 mr5 font-14":"iconfont icon-tongzhi color-grey-6 font-14 mr5"}></i>
|
||||
<span>动态</span>
|
||||
</Link>
|
||||
</li>
|
||||
}
|
||||
{
|
||||
item.menu_name === "setting" &&
|
||||
<li className={pathname === "setting" ? "active" : ""}>
|
||||
<Link to={`/projects/${owner}/${projectsId}/setting`}>
|
||||
<i className={url && url.indexOf("/setting") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
||||
item.menu_name === "settings" &&
|
||||
<li className={pathname === "settings" ? "active" : ""}>
|
||||
<Link to={`/${owner}/${projectsId}/settings`}>
|
||||
<i className={url && url.indexOf("/settings") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
||||
<span>仓库设置</span>
|
||||
</Link>
|
||||
</li>
|
||||
|
|
|
@ -1,26 +1,15 @@
|
|||
import React from 'react';
|
||||
import { Tooltip , message } from 'antd';
|
||||
import './sub.scss';
|
||||
import CopyTool from '../../Component/CopyTool';
|
||||
|
||||
function Invite({code,className}) {
|
||||
|
||||
function jsCopy(id) {
|
||||
const copyEle = document.querySelector(id); // 获取要复制的节点
|
||||
const range = document.createRange(); // 创造range
|
||||
window.getSelection().removeAllRanges(); //清除页面中已有的selection
|
||||
range.selectNode(copyEle); // 选中需要复制的节点
|
||||
window.getSelection().addRange(range); // 执行选中元素
|
||||
document.execCommand("Copy"); // 执行copy操作
|
||||
message.success('复制成功');
|
||||
}
|
||||
return(
|
||||
<div className={className}>
|
||||
<span className="font-16 color-grey-6">邀请码</span>
|
||||
<span className="font-16 color-ooo">邀请码</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>
|
||||
<input value={code} id="devitecode" style={{width:"62px",border:"none",cursor:"default"}} readOnly/>
|
||||
<CopyTool timeOut={true} beforeText={<p className="edu-txt-center">可以通过邀请码邀请成员加入项目<br/>点击复制邀请码。</p>} className="ml8 font-16" inputId="devitecode"/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
import React , {useState } from 'react';
|
||||
import { Anchor , Input } from 'antd';
|
||||
import './sub.scss';
|
||||
|
||||
const { Link } = Anchor;
|
||||
const { Search } = Input;
|
||||
|
||||
function ReadmeCatelogue({ menuList }) {
|
||||
const [ goHref , setGoHref ] = useState("");
|
||||
const [ value , setValue ] = useState("");
|
||||
const [ menu , setMenu] = useState(menuList);
|
||||
|
||||
|
||||
function onChange(link){
|
||||
setGoHref(link);
|
||||
};
|
||||
|
||||
function changeValue(e) {
|
||||
setValue(e.target.value);
|
||||
if(e.target.value){
|
||||
let m = menu.filter(i=>i.text.indexOf(e.target.value)>-1);
|
||||
setMenu(m);
|
||||
}else{
|
||||
setMenu(menuList);
|
||||
}
|
||||
}
|
||||
return(
|
||||
<div>
|
||||
<div className="searchBox">
|
||||
<Input
|
||||
placeholder={"请输入关键字"}
|
||||
value={value}
|
||||
onChange={changeValue}
|
||||
prefix={<i className="iconfont icon-sousuo_icon1 font-14"></i>}/>
|
||||
</div>
|
||||
{
|
||||
menu && menu.length>0?
|
||||
<div className="anchorBox">
|
||||
<Anchor affix={false} onChange={onChange}>
|
||||
{
|
||||
menu.map((item,key)=>{
|
||||
return(
|
||||
<div style={{paddingLeft:`${item.level *10}px`}} className={goHref===item.href?"items active":"items"}>
|
||||
<Link href={`${item.href}`} title={item.text} />
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Anchor>
|
||||
</div>
|
||||
:""
|
||||
}
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default ReadmeCatelogue;
|
|
@ -0,0 +1,71 @@
|
|||
.boxPanel {
|
||||
width: 1200px;
|
||||
margin: 20px auto;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #eee;
|
||||
min-height: 500px;
|
||||
}
|
||||
.boxPanel .contrbuteList {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 20px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.boxPanel .contrbuteList > div {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.descmodal .ant-row.ant-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.descmodal .ant-col.ant-form-item-label {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.menuslist {
|
||||
z-index: 100;
|
||||
width: 297px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.menuslist .searchBox {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.menuslist .anchorBox {
|
||||
max-height: 255px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper {
|
||||
margin-left: 0px;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper .items {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper .items .ant-anchor-link-title {
|
||||
color: #333333 !important;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper .items:hover {
|
||||
background-color: #F3F4F6;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper .items.active {
|
||||
background-color: #2A61FF;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper .items.active .ant-anchor-link-title {
|
||||
color: #fff !important;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper .ant-anchor-link {
|
||||
padding: 0px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.menuslist .ant-anchor-wrapper .ant-anchor-ink::before {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=sub.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["sub.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EAIA;;AAHA;EACE;;;AAMJ;EACE;;AAEF;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AACA;EACE;EACA;EACA;;AACA;EACE;;AAEF;EACE;;AAEF;EACE;;AACA;EACE;;AAIN;EACE;EACA;EACA;;AAEF;EACE","file":"sub.css"}
|
|
@ -24,7 +24,47 @@
|
|||
}
|
||||
}
|
||||
|
||||
.detailsCode{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.menuslist{
|
||||
z-index: 100;
|
||||
width: 297px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
|
||||
border-radius: 4px;
|
||||
.searchBox{
|
||||
padding:15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.anchorBox{
|
||||
max-height: 255px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.ant-anchor-wrapper{
|
||||
margin-left: 0px;
|
||||
padding:5px 15px;
|
||||
.items{
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
cursor: pointer;
|
||||
.ant-anchor-link-title{
|
||||
color: #333333!important;
|
||||
}
|
||||
&:hover{
|
||||
background-color: #F3F4F6;
|
||||
}
|
||||
&.active{
|
||||
background-color: #2A61FF;
|
||||
.ant-anchor-link-title{
|
||||
color: #fff!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-anchor-link{
|
||||
padding:0px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.ant-anchor-ink::before{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,10 +16,10 @@ function Commits({ commits , projectsId , owner }){
|
|||
<div className="prInfo">
|
||||
<FlexAJ>
|
||||
<AlignCenter>
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitKey" style={{marginLeft:0}}>{truncateCommitId(`${item.sha}`)}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="commitKey" style={{marginLeft:0}}>{truncateCommitId(`${item.sha}`)}</Link>
|
||||
<p className="ml15 font-16 color-grey-3 task-hide" style={{maxWidth:"700px"}}>{item.message}</p>
|
||||
</AlignCenter>
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(item.sha)}`} className="color-blue">浏览代码</Link>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(item.sha)}`} className="color-blue">浏览代码</Link>
|
||||
</FlexAJ>
|
||||
<AlignCenter className="mt15">
|
||||
<User url={getImageUrl(`/${item.committer && item.committer.image_url}`)} name={`${item.committer && item.committer.name}`}></User><span>:提交于{item.time_from_now}</span>
|
||||
|
|
|
@ -47,7 +47,7 @@ function Files({data,history,owner,projectsId}){
|
|||
<span>{item.name}</span>
|
||||
</AlignCenter>
|
||||
<span>
|
||||
<Button className="mr20" onClick={()=>{history.push(`/projects/${owner}/${projectsId}/tree/${truncateCommitId(item.sha)}/${item.name}`)}}>查看文件</Button>
|
||||
<Button className="mr20" onClick={()=>{history.push(`/${owner}/${projectsId}/tree/${truncateCommitId(item.sha)}/${item.name}`)}}>查看文件</Button>
|
||||
<span className="color-green">+{item.addition}</span>
|
||||
<span className="color-red ml20">-{item.deletion}</span>
|
||||
</span>
|
||||
|
|
|
@ -228,7 +228,7 @@ class MergeDetail extends Component {
|
|||
<div>
|
||||
{
|
||||
data && data.issue.user_permission ?
|
||||
<Link to={`/projects/${owner}/${projectsId}/pulls/${mergeid}/updatemerge`} className="color-blue fr">编辑</Link>
|
||||
<Link to={`/${owner}/${projectsId}/pulls/${mergeid}/updatemerge`} className="color-blue fr">编辑</Link>
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
|
@ -248,8 +248,8 @@ class MergeDetail extends Component {
|
|||
<div className="detailHeader-wrapper">
|
||||
<div className="normal f-wrap-between">
|
||||
<ul className="headerMenu-wrapper">
|
||||
<li className={url.indexOf("Messagecount") > 0 ? "active" : ""}><Link to={`/projects/${owner}/${projectsId}/pulls/${mergeid}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit") > 0 ? "active" : ""}><Link to={`/projects/${owner}/${projectsId}/pulls/${mergeid}/MergeSubmit`}>代码提交</Link></li>
|
||||
<li className={url.indexOf("Messagecount") > 0 ? "active" : ""}><Link to={`/${owner}/${projectsId}/pulls/${mergeid}/Messagecount`}>对话内容</Link></li>
|
||||
<li className={url.indexOf("MergeSubmit") > 0 ? "active" : ""}><Link to={`/${owner}/${projectsId}/pulls/${mergeid}/MergeSubmit`}>代码提交</Link></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -49,7 +49,7 @@ class MergeItem extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { issues, project_name, project_author_name , user_admin_or_member} = this.props;
|
||||
const { issues, project_name, project_author_name , user_admin_or_developer} = this.props;
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { current_user } = this.props;
|
||||
const renderList = () => {
|
||||
|
@ -62,7 +62,7 @@ class MergeItem extends Component {
|
|||
<p className="mb15 df" style={{ alignItems: "center" }}>
|
||||
<i className={`iconfont icon-hebingqingqiu1 font-14 mr3 i_${status}`}></i>
|
||||
<Link
|
||||
to={`/projects/${owner}/${projectsId}/pulls/${item.pull_request_id}/Messagecount`}
|
||||
to={`/${owner}/${projectsId}/pulls/${item.pull_request_id}/Messagecount`}
|
||||
className="hide-1 font-15 color-grey-3 fwb lineh-30 mr10"
|
||||
style={{ maxWidth: "300px" }}
|
||||
>
|
||||
|
@ -78,7 +78,7 @@ class MergeItem extends Component {
|
|||
</p>
|
||||
<p className="grid-item font-13">
|
||||
<Link
|
||||
to={`/users/${item && item.author_login}`}
|
||||
to={`/${item && item.author_login}`}
|
||||
className="show-user-link"
|
||||
>
|
||||
<img
|
||||
|
@ -91,7 +91,7 @@ class MergeItem extends Component {
|
|||
</Link>
|
||||
<AlignCenter>
|
||||
<Link
|
||||
to={`/users/${item && item.author_login}`}
|
||||
to={`/${item && item.author_login}`}
|
||||
className="show-user-link color-grey-8 ml5"
|
||||
>
|
||||
{item && item.author_name}
|
||||
|
@ -109,7 +109,7 @@ class MergeItem extends Component {
|
|||
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)}`}
|
||||
to={`/${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
|
||||
|
@ -133,7 +133,7 @@ class MergeItem extends Component {
|
|||
item.pull_request_base &&
|
||||
<Tag className="pr-branch-tag">
|
||||
<Link
|
||||
to={`/projects/${owner}/${projectsId}/tree/${turnbar(item.pull_request_base)}`}
|
||||
to={`/${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}`} */}
|
||||
|
@ -156,7 +156,7 @@ class MergeItem extends Component {
|
|||
<li>
|
||||
{item.assign_user_name ? (
|
||||
<Link
|
||||
to={`/users/${item.assign_user_login}`}
|
||||
to={`/${item.assign_user_login}`}
|
||||
className="show-user-link"
|
||||
>
|
||||
{item.assign_user_name}
|
||||
|
@ -175,7 +175,7 @@ class MergeItem extends Component {
|
|||
{item.journals_count ? (
|
||||
<Link
|
||||
className="mr5 color-grey-8"
|
||||
to={`/projects/${owner}/${projectsId}/pulls/${item.pull_request_id}/Messagecount`}
|
||||
to={`/${owner}/${projectsId}/pulls/${item.pull_request_id}/Messagecount`}
|
||||
>
|
||||
<i className="iconfont icon-huifu1 font-15 mr5 ver-middle"></i>
|
||||
{item.journals_count}
|
||||
|
@ -183,7 +183,7 @@ class MergeItem extends Component {
|
|||
) : (
|
||||
""
|
||||
)}
|
||||
{user_admin_or_member && item.pull_request_status === 0 ? (
|
||||
{user_admin_or_developer && item.pull_request_status === 0 ? (
|
||||
<div
|
||||
className="milepostleft"
|
||||
style={{
|
||||
|
@ -196,7 +196,7 @@ class MergeItem extends Component {
|
|||
>
|
||||
<div className="grid-item mr15 color-grey-9">
|
||||
<Link
|
||||
to={`/projects/${owner}/${projectsId}/pulls/${item.pull_request_id}/updatemerge`}
|
||||
to={`/${owner}/${projectsId}/pulls/${item.pull_request_id}/updatemerge`}
|
||||
className="color-grey-9"
|
||||
>
|
||||
<i className="iconfont icon-bianji3 font-14 mr5"></i>
|
||||
|
|
|
@ -100,7 +100,7 @@ class MergeSubmit extends Component{
|
|||
width:"10%",
|
||||
render: (text,item) => (
|
||||
<span className="f-wrap-alignCenter">
|
||||
<Link to={`/users/${item.login}`} className="show-user-link">
|
||||
<Link to={`/${item.login}`} className="show-user-link">
|
||||
<img src={getImageUrl(`/${item.image_url}`)} alt="" width="28px" height="28px" className="mr3 radius"/>
|
||||
<label className="hide-1" style={{maxWidth:"75px",'vertical-align':'middle'}}>{text}</label>
|
||||
</Link>
|
||||
|
@ -110,7 +110,7 @@ class MergeSubmit extends Component{
|
|||
title:"SHA",
|
||||
dataIndex: 'sha',
|
||||
render: (text) => (
|
||||
<Link to={`/projects/${owner}/${projectsId}/commits/${truncateCommitId(`${text}`)}`} className="commitKey">{text}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${text}`)}`} className="commitKey">{text}</Link>
|
||||
)
|
||||
},{
|
||||
title:"备注",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue