-
+
{
@@ -774,7 +774,7 @@ class NewHeader extends Component {
{user && user.login &&
-
+
@@ -810,7 +810,7 @@ class NewHeader extends Component {
{user === undefined ?
- this.educoderlogin()} className="mr5 color-grey-6">登录
+ this.educoderlogin()} className="mr5 color-white">登录
{
settings && settings.common && settings.common.register &&
注册
@@ -818,7 +818,7 @@ class NewHeader extends Component {
: user.login === "" ?
- this.educoderlogin()} className="mr5 color-grey-6">登录
+ this.educoderlogin()} className="mr5 color-white">登录
{
settings && settings.common && settings.common.register &&
注册
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index 859ddcf9..75ea6890 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -27,13 +27,13 @@ body>.-task-title {
width: 100%;
height:70px;
min-width: 1200px;
- z-index: 1000;
- background:rgba(255,255,255,1);
+ z-index: 10000;
+ background:#242424;
position: fixed;
box-shadow: 0px 0px 14px rgb(0 0 0 / 10%);
}
.headerContent{
- width:1200px;
+ padding:0px 25px;
margin:0px auto;
display: flex;
align-items: center;
@@ -329,4 +329,134 @@ body>.-task-title {
.progress-container {
flex: 1 0 0;
margin-left: 20px;
+}
+.newFooter > div{
+ padding: 90px 20px;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -ms-flex-align: start;
+ align-items: flex-start;
+ background: #242424;
+ min-width: 1200px;
+}
+
+.newFooter .module-list{
+ width: 200px;
+ text-align: left;
+}
+.newFooter .module-list>.title{
+ font-size: 16px;
+ color: #ddd;
+ margin-bottom: 20px;
+ font-weight: 400;
+ background-color: transparent;
+ border: none;
+ padding: 0px;
+}
+.newFooter .module-list>a {
+ display: block;
+ color: #bbb;
+ line-height: 34px;
+ font-weight: 300;
+ font-size: 12px;
+}
+.newFooter .module-introduce{
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -ms-flex-align: center;
+ align-items: center;
+ width: 290px;
+ margin-top: -12px;
+}
+.newFooter .module-introduce p {
+ font-size: 12px;
+ color: #bbb;
+ line-height: 32px;
+ margin-top: 12px;
+ font-weight: 300;
+ text-align: justify;
+}
+.module-introduce ul {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-pack: distribute;
+ justify-content: space-around;
+ padding: 0;
+ margin-top: 20px;
+}
+.module-introduce ul {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-pack: distribute;
+ justify-content: space-around;
+ padding: 0;
+ margin-top: 20px;
+}
+.module-introduce ul li:first-child {
+ margin-right: 50px;
+}
+.module-introduce ul li {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -ms-flex-align: center;
+ align-items: center;
+}
+.module-introduce ul li>span {
+ font-size: 12px;
+ color: #bbb;
+ padding-top: 10px;
+}
+.module-introduce ol {
+ margin-top: 16px;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-pack: distribute;
+ justify-content: space-around;
+ padding: 0;
+ height: 108px;
+ width: 100%;
+}
+.module-introduce ol li {
+ height: 100%;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+ -ms-flex-align: center;
+ align-items: center;
+}
+.module-introduce ol li a {
+ font-size: 14px;
+ color: #bbb;
+ margin-top: 20px;
+}
+.module-introduce section {
+ width: 100%;
+ height: 115px;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+ -ms-flex-align: start;
+ align-items: flex-start;
+ font-size: 14px;
+ color: #bbb;
+ font-weight: 300;
+}
+.module-introduce .footer-line {
+ width: 310px;
+ height: 1px;
+ background-color: #3e4042;
+ margin: 32px 0;
}
\ No newline at end of file
--
2.34.1
From 0294439f18a5a4cf8edf247656bb326468a09682 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Mon, 22 Mar 2021 14:19:50 +0800
Subject: [PATCH 07/78] =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E4=B8=8D?=
=?UTF-8?q?=E5=BC=B9=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/tpm/TPMIndex.css | 2 +-
src/modules/tpm/TPMIndexHOC.js | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index 75ea6890..dc99c541 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -355,7 +355,7 @@ body>.-task-title {
border: none;
padding: 0px;
}
-.newFooter .module-list>a {
+.newFooter .module-list a {
display: block;
color: #bbb;
line-height: 34px;
diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js
index ac6ec4a1..4ec284ba 100644
--- a/src/modules/tpm/TPMIndexHOC.js
+++ b/src/modules/tpm/TPMIndexHOC.js
@@ -171,12 +171,14 @@ export function TPMIndexHOC(WrappedComponent) {
})
}
}
- if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){
- this.setState({
- giteaVisible:true,
- email:response.data.email,
- is_sync_pwd:response.data.is_sync_pwd
- })
+ if(response.data && response.data.login){
+ if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){
+ this.setState({
+ giteaVisible:true,
+ email:response.data.email,
+ is_sync_pwd:response.data.is_sync_pwd
+ })
+ }
}
}
}).catch((error) => {
--
2.34.1
From b1725a00eed9c121c2fac3891d22510860a85dd8 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Mon, 22 Mar 2021 16:54:41 +0800
Subject: [PATCH 08/78] style
---
src/modules/tpm/TPMIndex.css | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index dc99c541..c65b1fb7 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -362,6 +362,9 @@ body>.-task-title {
font-weight: 300;
font-size: 12px;
}
+.newFooter .module-list a:hover {
+ color: #fff;
+}
.newFooter .module-introduce{
display: flex;
-ms-flex-direction: column;
--
2.34.1
From 6b441fc9192654cd4f55e500a5949f578d845b96 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Tue, 23 Mar 2021 17:00:09 +0800
Subject: [PATCH 09/78] delete
---
src/forge/Head/Header.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js
index be36d6db..424ca818 100644
--- a/src/forge/Head/Header.js
+++ b/src/forge/Head/Header.js
@@ -134,6 +134,24 @@ class NewHeader extends Component {
})
};
+
+ hidetojoinclass = () => {
+ this.setState({
+ tojoinclasstype: false,
+ tojoinitemtype: false,
+ tojoinclasstitle: undefined,
+ rolearr: ["", ""],
+ Checkboxteacherchecked: false,
+ Checkboxstudentchecked: false,
+ Checkboxteachingchecked: false,
+ Checkboxteachertype: false,
+ Checkboxteachingtype: false,
+ code_notice: false,
+ checked_notice: false,
+ RadioGroupvalue: undefined
+ })
+ }
+
// 关闭
cancelModulationModels = () => {
this.setState({ isRenders: false })
--
2.34.1
From 3a8d9698db73afae080b011fe490f5f17a300ce0 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Tue, 23 Mar 2021 17:42:57 +0800
Subject: [PATCH 10/78] condition
---
src/forge/Head/Header.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js
index 424ca818..8155a183 100644
--- a/src/forge/Head/Header.js
+++ b/src/forge/Head/Header.js
@@ -294,9 +294,13 @@ class NewHeader extends Component {
}
render() {
- const { match} = this.props;
- let current_user = this.props.user;
- let {
+ const { match } = this.props;
+ const current_user = this.props.user;
+ let { Addcoursestypes,
+ tojoinitemtype,
+ tojoinclasstitle,
+ code_notice,
+ checked_notice,
AccountProfiletype,
user,
isRender,
--
2.34.1
From 7b4723b11123c79d4cc323c0bea489eedfa9b886 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 24 Mar 2021 14:14:00 +0800
Subject: [PATCH 11/78] header
---
src/forge/Head/Header.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js
index 8155a183..f232e76f 100644
--- a/src/forge/Head/Header.js
+++ b/src/forge/Head/Header.js
@@ -453,7 +453,7 @@ class NewHeader extends Component {
{
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
-
+
:""
}
--
2.34.1
From 3bebbdc44d797dd71b5021abfab97789f78e6f7e Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 25 Mar 2021 14:41:08 +0800
Subject: [PATCH 12/78] readme
---
src/forge/Main/CoderDepot.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx
index e2dbc49d..1e4307c5 100644
--- a/src/forge/Main/CoderDepot.jsx
+++ b/src/forge/Main/CoderDepot.jsx
@@ -450,7 +450,7 @@ function CoderDepot(props){
(dirInfo && dirInfo.length === 0) && !fileInfo ? :""
}
{/* readme文件显示(显示文件详情时不显示readme文件) */}
- { dirInfo && (readme && readme.content) ? :"" }
+ { dirInfo && (projectDetail && projectDetail.readme) ? :"" }
{
--
2.34.1
From 987688bcc996d782a4d1458fa13d669bb10ab220 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 25 Mar 2021 22:05:27 +0800
Subject: [PATCH 13/78] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/New/Index.js | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js
index aaaab6c8..35615f36 100644
--- a/src/forge/New/Index.js
+++ b/src/forge/New/Index.js
@@ -197,8 +197,6 @@ class Index extends Component {
const { project_language_id, project_category_id, license_id, ignore_id , owners_id , owners_name } = this.state;
const decoderPass = Base64.encode(values.password);
const url = (projectsType && projectsType === "mirror") ? "/projects/migrate.json" : "/projects.json";
- // 新建项目的时候,暂存数据,如果失败,返回的时候可以重新赋值
- sessionStorage.newProjectValue=JSON.stringify({...values,project_language_id,project_category_id,license_id,ignore_id});
axios.post(url, {
...values,
auth_password:decoderPass,
@@ -208,9 +206,14 @@ class Index extends Component {
ignore_id,
user_id:owners_id
}).then((result) => {
- if (result && result.data.id) {
- projectsType && projectsType !== "mirror" && this.props.showNotification(`托管项目创建成功!`);
- this.props.history.push(`/${result.data.login}/${result.data.identifier}`);
+ if (result) {
+ if (result.data.id) {
+ this.setState({
+ isSpin: false
+ })
+ this.props.showNotification(`${projectsType && projectsType === "mirror" ? "镜像" : "托管"}项目创建成功!`);
+ this.props.history.push(`/projects/${owners_name}/${result.data.identifier}`);
+ }
}
this.setState({
isSpin: false
--
2.34.1
From 882d8aef75737b85d829a149bfbd64c78681ed6b Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 26 Mar 2021 10:04:01 +0800
Subject: [PATCH 14/78] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=86=B2=E7=AA=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/tpm/TPMIndexHOC.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js
index 4ec284ba..f5d52a8e 100644
--- a/src/modules/tpm/TPMIndexHOC.js
+++ b/src/modules/tpm/TPMIndexHOC.js
@@ -180,6 +180,15 @@ export function TPMIndexHOC(WrappedComponent) {
})
}
}
+ if(response.data && response.data.login){
+ if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){
+ this.setState({
+ giteaVisible:true,
+ email:response.data.email,
+ is_sync_pwd:response.data.is_sync_pwd
+ })
+ }
+ }
}
}).catch((error) => {
console.log(error)
--
2.34.1
From 7f7a1021dfd219767c73034a6a953a993cbee9fe Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Tue, 30 Mar 2021 13:46:52 +0800
Subject: [PATCH 15/78] toubu
---
src/common/UrlTool.js | 2 +-
src/modules/question/NewMyShixunModel.js | 5 -----
src/modules/tpm/TPMIndex.css | 4 ++--
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js
index 07e141eb..f648078c 100644
--- a/src/common/UrlTool.js
+++ b/src/common/UrlTool.js
@@ -162,7 +162,7 @@ export function getmyUrl(geturl) {
}
export function getUploadActionUrl(path, goTest) {
- return `${getUrl()}/api/attachments.json${isDev ?`${isDev ?`?debug=${window._debugType || 'admin'}` : ""}` : ""}`;
+ return `${getUrl()}/api/attachments.json`;
}
export function getUploadLogoActionUrl() {
diff --git a/src/modules/question/NewMyShixunModel.js b/src/modules/question/NewMyShixunModel.js
index 2ae8625b..08cd7b72 100644
--- a/src/modules/question/NewMyShixunModel.js
+++ b/src/modules/question/NewMyShixunModel.js
@@ -1068,11 +1068,6 @@ class NewMyShixunModel extends Component {
")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window);
\ No newline at end of file
+!function(c){var l,a,h,i,o,z='
',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window);
diff --git a/src/AppConfig.js b/src/AppConfig.js
index 825a2a3b..36c1529d 100644
--- a/src/AppConfig.js
+++ b/src/AppConfig.js
@@ -32,7 +32,7 @@ export function initAxiosInterceptors(props) {
// 判断网络是否连接
initOnlineOfflineListener();
- var proxy = "https://testforgeplus.trustie.net";
+ var proxy = "https://testforgeplus.educoder.net";
//响应前的设置
axios.interceptors.request.use(
config => {
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index 7a9fb896..8ee6bc32 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -135,7 +135,6 @@ body>.-task-title {
height: 60px !important;
}
-
.HeaderSearch {
margin-top: 18px;
margin-right: 20px;
--
2.34.1
From 2d79d144a0768e3f7199cb2ae7e656d210dcdd52 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 11 Jun 2021 17:21:11 +0800
Subject: [PATCH 35/78] =?UTF-8?q?=E9=82=AE=E7=AE=B1=E5=BC=B9=E6=A1=86?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/tpm/TPMIndexHOC.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js
index ce5c4514..51cbb0de 100644
--- a/src/modules/tpm/TPMIndexHOC.js
+++ b/src/modules/tpm/TPMIndexHOC.js
@@ -181,10 +181,11 @@ export function TPMIndexHOC(WrappedComponent) {
}
}
if(response.data && response.data.login){
- if(response.data.need_edit_info){
+ if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){
this.setState({
giteaVisible:true,
- email:response.data.email
+ email:response.data.email,
+ is_sync_pwd:response.data.is_sync_pwd
})
}
}
@@ -212,8 +213,11 @@ export function TPMIndexHOC(WrappedComponent) {
}
onOk =(values)=>{
- let url = `/users/sync_user_info.json`;
- const { current_user } = this.state;
+ let url = `/accounts/gitea_register.json`;
+ const { email , current_user , is_sync_pwd } = this.state;
+ if(email && !is_sync_pwd){
+ url = `/users/change_password.json`;
+ }
axios.post(url,{
login:current_user && current_user.login,
...values
--
2.34.1
From f25db9ccf1b3551bdc0568b432f00b8d1194cb3b Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 16 Jun 2021 09:47:52 +0800
Subject: [PATCH 36/78] =?UTF-8?q?eudocderforge=E5=A4=B4=E5=83=8Furl?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/UrlTool.js | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js
index f648078c..6c4fcfb6 100644
--- a/src/common/UrlTool.js
+++ b/src/common/UrlTool.js
@@ -8,12 +8,18 @@ const isDev = window.location.port == 3007;
const isdev2= window.location.hostname ==='www.educoder.net'
export const TEST_HOST = "https://testforgeplus.trustie.net/"
export function getImageUrl(path) {
- // https://www.educoder.net
- // https://testbdweb.trustie.net
- // const local = 'http://localhost:3000'
- const local = 'https://testforgeplus.trustie.net';
- if (isDev) {
- return `${local}/${path}`
+ const local = 'https://testforgeplus.educoder.net';
+ const normal = 'https://ali-cdn.educoder.net/images';
+ const normalend = 'https://ali-cdn.educoder.net';
+ if(path.substr(0, 7) !== "/system"){
+ if (isDev) {
+ return `${local}/${path}`
+ }
+ if(path.substr(0, 7) !== "/images"){
+ return `${normal}${path}`;
+ }else{
+ return `${normalend}${path}`;
+ }
}
return `${path}`;
}
--
2.34.1
From 7d0abfb76483e95ff825b02a920c5baea77c5418 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 28 May 2021 16:19:40 +0800
Subject: [PATCH 37/78] =?UTF-8?q?cherry-pick=20develop=20=E4=B8=AA?=
=?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E7=AC=AC=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/users/Infos.js | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 1cd3969d..ccc26da5 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -123,6 +123,8 @@ class Infos extends Component {
});
const { current_user } = this.props;
const { username } = this.props.match.params;
+ const { pathname } = this.props.location;
+ const { notice } = this.state;
let url = `/users/${username || (current_user && current_user.login)}.json`;
axios.get(url).then((result) => {
@@ -201,25 +203,16 @@ class Infos extends Component {
-
-
-
-
- {
- user && user.gender===1?
-
- :
-
- }
-
-
-
-
+
+
+ {user && user.user_identity && (
+
+ {user && user.user_identity}
+
+ )}
+
{user && user.username}
-
- {user && user.description}
-
{/* {user && current_user && user.login === current_user.login && (
--
2.34.1
From c9a9da6de9ded188ae61a12dc52d2e4f3f14bc42 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 2 Jun 2021 18:22:29 +0800
Subject: [PATCH 38/78] git cherry-pick 975d49
---
src/forge/users/GeneralView/ConcentrateBox.jsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/forge/users/GeneralView/ConcentrateBox.jsx b/src/forge/users/GeneralView/ConcentrateBox.jsx
index 78573984..b0a7b444 100644
--- a/src/forge/users/GeneralView/ConcentrateBox.jsx
+++ b/src/forge/users/GeneralView/ConcentrateBox.jsx
@@ -21,7 +21,8 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his
const [ copyAllList , setCopyAllList ] = useState([]);
useEffect(()=>{
- if(visible){
+ if(visible && loadCount === 0){
+ setLoadCount(loadCount+1);
setIsSpin(true);
getProjectList();
}else{
--
2.34.1
From f94edf90a508d2a9c96c002aa28fd99a8c314920 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 28 May 2021 17:02:54 +0800
Subject: [PATCH 39/78] git cherry-pick
d41dce26b124f4fa506efb81dd11b476c7790e52
---
src/forge/users/GeneralView/Index.jsx | 83 +++++----------------------
1 file changed, 14 insertions(+), 69 deletions(-)
diff --git a/src/forge/users/GeneralView/Index.jsx b/src/forge/users/GeneralView/Index.jsx
index 24efe37c..ce1e4377 100644
--- a/src/forge/users/GeneralView/Index.jsx
+++ b/src/forge/users/GeneralView/Index.jsx
@@ -13,21 +13,12 @@ import Calendar from '../Echart/Calendar';
import ConcentrateProject from './ConcentrateProject';
import Activity from './Activity';
import moment from 'moment';
-import Axios from 'axios';
-import Nodata from '../../Nodata';
-const { Option } = Select;
const aLimit = 5;
function Index(props) {
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(0);
- const [ projectTrends , setProjectTrends ] = useState(undefined);
-
- const [ year , setYear ] = useState(moment().get('year'));
- const [ yearList , setYearList ] = useState(undefined);
- const [ activityDate , setActivityDate ] = useState(undefined);
-
- const [ statisticData , setStatisticData ] = useState(undefined);
+ const [ createYear , setCreateYear ] = useState(undefined);
const username = props.match.params.username;
const current_user = props.current_user;
@@ -36,64 +27,21 @@ function Index(props) {
useEffect(()=>{
if(user){
let c = user.created_time && user.created_time.split("-")[0];
- let y = moment().get('year');
- let array = []
- for(var i = y ; i >= parseInt(c,0);i--){
- array.push(i);
- }
- setYearList(array);
+ setCreateYear(parseInt(c,0));
}
},[user])
// 在贡献度日历表中选择一个时间
function chooseTime(data) {
if(data){
- setPage(1);
- setActivityDate(data[0]);
+ console.log(data);
}
}
- // 年份下拉框option
- function renderYear(list){
- return list.map((i,k)=>{
- return(
-
- )
- })
- }
-
- useEffect(()=>{
- getActivity();
- },[activityDate,page])
-
- // 获取动态列表
- function getActivity() {
- const url = `/users/${username}/project_trends.json`;
- Axios.get(url,{
- params:{
- date:activityDate,
- limit:aLimit,page
- }
- }).then(result=>{
- if(result && result.data){
- setProjectTrends(result.data.project_trends);
- setTotal(result.data.total_count);
- }
- }).catch(error=>{})
- }
-
- // 获取近期活动统计
- useEffect(()=>{
- getStatistics();
- },[])
-
- function getStatistics() {
- const url = `/users/${username}/statistics/activity.json`;
- Axios.get(url).then(result=>{
- if(result && result.data){
- setStatisticData(result.data);
- }
- }).catch(error=>{})
+ function renderYear(){
+ let y = moment().get('year');
+ for(var i = y ; i > createYear;i--){
+ }
}
return(
@@ -106,24 +54,21 @@ function Index(props) {
/>
-
+
贡献度
-
-
-
-
+
动态
- { projectTrends && projectTrends.length > 0 &&
}
- { projectTrends && projectTrends.length === 0 && }
+
{ total > aLimit && }
--
2.34.1
From e1b73f582a86868640743c8ed03f022c6a563845 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Mon, 31 May 2021 09:48:30 +0800
Subject: [PATCH 40/78] git cherry-pick
a9285f37e709d9258971fcebf656a284e9387cbb
---
src/forge/users/Echart/Calendar.jsx | 42 ++++-----------
src/forge/users/Echart/Line.jsx | 22 ++++----
src/forge/users/GeneralView/Index.jsx | 76 ++++++++++++++++++++++-----
3 files changed, 84 insertions(+), 56 deletions(-)
diff --git a/src/forge/users/Echart/Calendar.jsx b/src/forge/users/Echart/Calendar.jsx
index 743a0a55..1fde5284 100644
--- a/src/forge/users/Echart/Calendar.jsx
+++ b/src/forge/users/Echart/Calendar.jsx
@@ -10,7 +10,7 @@ function Calendar({ userLogin , time , chooseTime }) {
useEffect(()=>{
if(time){
let e,b = "";
- if(parseInt(time,0) === parseInt(moment().get('year'),0)){
+ if(time === "0"){
let y = moment().get('year');
let m = moment().get('month');
let d = moment().get('date');
@@ -52,18 +52,9 @@ function Calendar({ userLogin , time , chooseTime }) {
}
function getVirtulData(data) {
- var date = +echarts.number.parseDate(baginT);
- var end = +echarts.number.parseDate(endT);
- var dayTime = 3600 * 24 * 1000;
var array = [];
- for (var time = date; time <= end; time += dayTime) {
- let stamp = timestampToTime(time);
- let stampFilter = data.filter(i=>i.date === stamp);
- if(stampFilter && stampFilter.length > 0){
- array.push([stampFilter[0].date,stampFilter[0].contributions]);
- }else{
- array.push([stamp,0]);
- }
+ for(var i=0;i
+
)
}
export default Calendar;
\ No newline at end of file
diff --git a/src/forge/users/Echart/Line.jsx b/src/forge/users/Echart/Line.jsx
index e8c9ac64..f7b515cd 100644
--- a/src/forge/users/Echart/Line.jsx
+++ b/src/forge/users/Echart/Line.jsx
@@ -15,20 +15,22 @@ function Line({data}) {
let option = {
color: ["#f8e367", "#58c0f0", "#ff9e48"],
title: {
- show:false
+ text: '近期活动统计',
+ left: '3%',
+ top:"3%"
},
tooltip: {
trigger: 'axis'
},
legend: {
- data: ['提交数', '易修数', '合并请求数'],
+ data: ['commits', 'issues', 'pull_requests'],
right: 'center',
- bottom: '4%',
+ bottom: '0',
},
grid: {
left: '4%',
- right: '5%',
- bottom: '16%',
+ right: '4%',
+ bottom: '12%',
containLabel: true
},
toolbox: {
@@ -51,23 +53,21 @@ function Line({data}) {
},
axisTick:{
show:false
- },
- minInterval:1,
- splitNumber: 5,
+ }
},
series: [
{
- name: '提交数',
+ name: 'commits',
type: 'line',
data: d.commits_count
},
{
- name: '易修数',
+ name: 'issues',
type: 'line',
data: d.issues_count
},
{
- name: '合并请求数',
+ name: 'pull_requests',
type: 'line',
data: d.pull_requests_count
}
diff --git a/src/forge/users/GeneralView/Index.jsx b/src/forge/users/GeneralView/Index.jsx
index ce1e4377..4d74fa5a 100644
--- a/src/forge/users/GeneralView/Index.jsx
+++ b/src/forge/users/GeneralView/Index.jsx
@@ -13,12 +13,20 @@ import Calendar from '../Echart/Calendar';
import ConcentrateProject from './ConcentrateProject';
import Activity from './Activity';
import moment from 'moment';
+import Axios from 'axios';
+const { Option } = Select;
const aLimit = 5;
function Index(props) {
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(0);
- const [ createYear , setCreateYear ] = useState(undefined);
+ const [ projectTrends , setProjectTrends ] = useState(undefined);
+
+ const [ year , setYear ] = useState("0");
+ const [ yearList , setYearList ] = useState(undefined);
+ const [ activityDate , setActivityDate ] = useState(undefined);
+
+ const [ statisticData , setStatisticData ] = useState(undefined);
const username = props.match.params.username;
const current_user = props.current_user;
@@ -27,21 +35,63 @@ function Index(props) {
useEffect(()=>{
if(user){
let c = user.created_time && user.created_time.split("-")[0];
- setCreateYear(parseInt(c,0));
+ let y = moment().get('year');
+ let array = []
+ for(var i = y ; i >= parseInt(c,0);i--){
+ array.push(i);
+ }
+ setYearList(array);
}
},[user])
// 在贡献度日历表中选择一个时间
function chooseTime(data) {
if(data){
- console.log(data);
+ setActivityDate(data[0]);
}
}
- function renderYear(){
- let y = moment().get('year');
- for(var i = y ; i > createYear;i--){
- }
+ // 年份下拉框option
+ function renderYear(list){
+ return list.map((i,k)=>{
+ return(
+
+ )
+ })
+ }
+
+ useEffect(()=>{
+ getActivity();
+ },[activityDate,page])
+
+ // 获取动态列表
+ function getActivity() {
+ const url = `/users/${username}/project_trends.json`;
+ Axios.get(url,{
+ params:{
+ date:activityDate,
+ limit:aLimit,page
+ }
+ }).then(result=>{
+ if(result && result.data){
+ setProjectTrends(result.data.project_trends);
+ setTotal(result.data.total_count);
+ }
+ }).catch(error=>{})
+ }
+
+ // 获取近期活动统计
+ useEffect(()=>{
+ getStatistics();
+ },[])
+
+ function getStatistics() {
+ const url = `/users/${username}/statistics/activity.json`;
+ Axios.get(url).then(result=>{
+ if(result && result.data){
+ setStatisticData(result.data);
+ }
+ }).catch(error=>{})
}
return(
@@ -54,21 +104,21 @@ function Index(props) {
/>
-
+
贡献度
-
- 选择年份
- { createYear && renderYear()}
+ setYear(e)}>
+
+ { yearList && renderYear(yearList) }
-
+
动态
-
+ { projectTrends && projectTrends.length > 0 &&
}
{ total > aLimit && }
--
2.34.1
From 28d3b5bedd0e37826fb2b8cf03e94813f5b7f210 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Mon, 31 May 2021 17:44:30 +0800
Subject: [PATCH 41/78] git cherry-pick
1432afebfd1e2e8fc5df3cb9e0d2b808995b6a4a
---
src/forge/users/Statistics/Index.jsx | 103 ++++++++++++--------------
src/forge/users/Statistics/Index.scss | 2 +-
2 files changed, 47 insertions(+), 58 deletions(-)
diff --git a/src/forge/users/Statistics/Index.jsx b/src/forge/users/Statistics/Index.jsx
index aca25eb1..6375ac61 100644
--- a/src/forge/users/Statistics/Index.jsx
+++ b/src/forge/users/Statistics/Index.jsx
@@ -74,21 +74,19 @@ function Index(props) {
if(result && result.data){
setRadarData(result.data);
let score = result.data.user && result.data.user.each_language_score;
- if(score){
- var sortData = [];
- for (var item in score) {
- sortData.push([item, score[item]])
- }
- sortData.sort(function(a, b) {
- return b[1] - a[1];
- });
- setTopThree(sortData.slice(0,3));
+ var sortData = []
+ for (var item in score) {
+ sortData.push([item, score[item]])
}
+ sortData.sort(function(a, b) {
+ return b[1] - a[1];
+ });
+ setTopThree(sortData.slice(0,3));
let percent = result.data.user && result.data.user.languages_percent;
let arr = [];
Object.keys(percent).map((item,key)=>{
- arr.push({name:item,p:parseFloat(percent[item]*100).toFixed(1),color:getColor()});
+ arr.push({name:item,p:percent[item]*100,color:getColor()});
})
setPercentData(arr);
}
@@ -128,7 +126,7 @@ function Index(props) {
return(
-
+
开发能力
-
-
从五个维度刻画你的开发能力:语言能力、影响力、贡献度、活跃度、项目经验,同时可以查看社区平均数据。
-
- {
- topThree && topThree.length > 0 &&
-
-
- { topThree[1] && }
- { topThree[2] && }
+
+ {
+ topThree &&
+
+
+
+
+
+ }
+ {
+ percentData &&
+
+
+ {
+ percentData.map((i,k)=>{
+ return(
+
+ )
+ })
+ }
- }
- {
- percentData &&
-
-
- {
- percentData.map((i,k)=>{
- return(
-
- )
- })
- }
-
-
- {
- percentData.map((i,k)=>{
- return(
-
- {i.name}
- {`${i.p}%`}
-
- )
- })
- }
-
+
+ {
+ percentData.map((i,k)=>{
+ return(
+
+ {i.name}
+ {`${i.p}%`}
+
+ )
+ })
+ }
- }
-
+
+ }
-
+
角色定位
-
-
根据你在项目开发过程中的工作,对你在项目中扮演的角色进行定位,包括:创建者、管理者、开发者、测试者、文档工作者等。
-
-
+
-
+
专业定位
-
-
展示你擅长、关注、感兴趣的专业范围,通过你参与项目、收藏项目、关注项目、复刻项目等数据来统计。
-
-
+
)
diff --git a/src/forge/users/Statistics/Index.scss b/src/forge/users/Statistics/Index.scss
index 4ea048bf..a2f944b9 100644
--- a/src/forge/users/Statistics/Index.scss
+++ b/src/forge/users/Statistics/Index.scss
@@ -1,5 +1,5 @@
.boxes{
- padding:15px 0px;
+ padding:20px 30px;
.roundBox{
margin:20px auto;
display: flex;
--
2.34.1
From dd20d02477826301eff100d7e57895b311392d65 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Wed, 2 Jun 2021 18:22:29 +0800
Subject: [PATCH 42/78] =?UTF-8?q?=E5=90=8C=E4=B8=8A=3Dissue=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/users/Echart/Calendar.jsx | 42 ++++++++---
src/forge/users/Echart/Line.jsx | 22 +++---
src/forge/users/GeneralView/Index.jsx | 16 ++--
src/forge/users/Infos.js | 32 ++++----
src/forge/users/Statistics/Index.jsx | 101 ++++++++++++++------------
src/forge/users/Statistics/Index.scss | 2 +-
6 files changed, 129 insertions(+), 86 deletions(-)
diff --git a/src/forge/users/Echart/Calendar.jsx b/src/forge/users/Echart/Calendar.jsx
index 1fde5284..743a0a55 100644
--- a/src/forge/users/Echart/Calendar.jsx
+++ b/src/forge/users/Echart/Calendar.jsx
@@ -10,7 +10,7 @@ function Calendar({ userLogin , time , chooseTime }) {
useEffect(()=>{
if(time){
let e,b = "";
- if(time === "0"){
+ if(parseInt(time,0) === parseInt(moment().get('year'),0)){
let y = moment().get('year');
let m = moment().get('month');
let d = moment().get('date');
@@ -52,9 +52,18 @@ function Calendar({ userLogin , time , chooseTime }) {
}
function getVirtulData(data) {
+ var date = +echarts.number.parseDate(baginT);
+ var end = +echarts.number.parseDate(endT);
+ var dayTime = 3600 * 24 * 1000;
var array = [];
- for(var i=0;ii.date === stamp);
+ if(stampFilter && stampFilter.length > 0){
+ array.push([stampFilter[0].date,stampFilter[0].contributions]);
+ }else{
+ array.push([stamp,0]);
+ }
}
return array;
}
@@ -74,7 +83,11 @@ function Calendar({ userLogin , time , chooseTime }) {
title: {
show:false
},
- tooltip: {},
+ tooltip: {
+ formatter:function(params){
+ return params.data[0] + ': ' + params.data[1] + '个贡献';
+ }
+ },
visualMap: {
min: 0,
max: max,
@@ -83,15 +96,23 @@ function Calendar({ userLogin , time , chooseTime }) {
left: 'center',
bottom: 40,
inRange:{
- color:['#C7DBFF', '#5291FF']
+ color:['#fafafa', '#216e39']
}
},
calendar: {
- top: 60,
- left: 30,
- right: 0,
+ top: 50,
+ left: 40,
+ right: 30,
cellSize: ['auto', 13],
range: [baginT, endT],
+ splitLine:{
+ show:false,
+ lineStyle:{
+ color:"#fff",
+ width:1,
+ type:"solid"
+ }
+ },
itemStyle: {
borderWidth: 0.5
},
@@ -100,7 +121,8 @@ function Calendar({ userLogin , time , chooseTime }) {
nameMap:"cn"
},
dayLabel:{
- nameMap:"cn"
+ nameMap:"cn",
+ firstDay:1
}
},
series: {
@@ -117,7 +139,7 @@ function Calendar({ userLogin , time , chooseTime }) {
return(
-
+
)
}
export default Calendar;
\ No newline at end of file
diff --git a/src/forge/users/Echart/Line.jsx b/src/forge/users/Echart/Line.jsx
index f7b515cd..e8c9ac64 100644
--- a/src/forge/users/Echart/Line.jsx
+++ b/src/forge/users/Echart/Line.jsx
@@ -15,22 +15,20 @@ function Line({data}) {
let option = {
color: ["#f8e367", "#58c0f0", "#ff9e48"],
title: {
- text: '近期活动统计',
- left: '3%',
- top:"3%"
+ show:false
},
tooltip: {
trigger: 'axis'
},
legend: {
- data: ['commits', 'issues', 'pull_requests'],
+ data: ['提交数', '易修数', '合并请求数'],
right: 'center',
- bottom: '0',
+ bottom: '4%',
},
grid: {
left: '4%',
- right: '4%',
- bottom: '12%',
+ right: '5%',
+ bottom: '16%',
containLabel: true
},
toolbox: {
@@ -53,21 +51,23 @@ function Line({data}) {
},
axisTick:{
show:false
- }
+ },
+ minInterval:1,
+ splitNumber: 5,
},
series: [
{
- name: 'commits',
+ name: '提交数',
type: 'line',
data: d.commits_count
},
{
- name: 'issues',
+ name: '易修数',
type: 'line',
data: d.issues_count
},
{
- name: 'pull_requests',
+ name: '合并请求数',
type: 'line',
data: d.pull_requests_count
}
diff --git a/src/forge/users/GeneralView/Index.jsx b/src/forge/users/GeneralView/Index.jsx
index 4d74fa5a..8fd8d0a0 100644
--- a/src/forge/users/GeneralView/Index.jsx
+++ b/src/forge/users/GeneralView/Index.jsx
@@ -14,6 +14,7 @@ import ConcentrateProject from './ConcentrateProject';
import Activity from './Activity';
import moment from 'moment';
import Axios from 'axios';
+import Nodata from '../../Nodata';
const { Option } = Select;
const aLimit = 5;
@@ -22,7 +23,7 @@ function Index(props) {
const [ total , setTotal ] = useState(0);
const [ projectTrends , setProjectTrends ] = useState(undefined);
- const [ year , setYear ] = useState("0");
+ const [ year , setYear ] = useState(moment().get('year'));
const [ yearList , setYearList ] = useState(undefined);
const [ activityDate , setActivityDate ] = useState(undefined);
@@ -104,21 +105,24 @@ function Index(props) {
/>
-
+
贡献度
- setYear(e)}>
-
+ {setYear(e);setActivityDate(undefined)}}>
{ yearList && renderYear(yearList) }
-
+
+
+
动态
{ projectTrends && projectTrends.length > 0 &&
}
+ { projectTrends && projectTrends.length === 0 && }
{ total > aLimit && }
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index ccc26da5..525a2b82 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -1,6 +1,6 @@
import React, { Component } from "react";
import { Link } from "react-router-dom";
-import { Button, Spin , Menu } from "antd";
+import { Avatar, Tag, Button, Spin , Menu } from "antd";
import FocusButton from "../UsersList/focus_button";
import axios from "axios";
@@ -14,10 +14,7 @@ import './Index.scss';
import Loadable from "react-loadable";
import Loading from "../../Loading";
-const UpdateInfo = Loadable({
- loader: () => import("./Material/Index"),
- loading: Loading,
-});
+
const InfosDevOps = Loadable({
loader: () => import("./devOpsCI"),
loading: Loading,
@@ -135,12 +132,21 @@ class Infos extends Component {
undo_events:e
});
})
- .catch((error) => {
- this.setState({
- isSpin: false,
- });
- });
- };
+ }
+
+ // change_project_type = (type) => {
+ // const {user} = this.state
+ // this.setState({
+ // project_type: type ,
+ // route_type: undefined
+ // })
+ // let url = `/users/${user && user.login}`
+ // if (type){
+ // url = `/users/${user && user.login}/projects/${type}`
+ // }
+ // this.props.history.push(url)
+
+ // };
change_devops_type=(type)=>{
const {user} = this.state;
@@ -241,7 +247,7 @@ class Infos extends Component {
)}
-
+
- { !route_type && menuKey &&
+ { !route_type &&