From 1a024f801124030e7db8356787ea368e2431cf5e Mon Sep 17 00:00:00 2001
From: Jasder <2053003901@@qq.com>
Date: Sun, 9 Aug 2020 22:20:51 +0800
Subject: [PATCH 01/56] =?UTF-8?q?FIX=20=E5=8E=BB=E6=8E=89=E4=BD=BF?=
=?UTF-8?q?=E7=94=A8=E6=89=8B=E5=86=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Index.js | 6 ++----
src/forge/users/Index.jsx | 4 +---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/forge/Index.js b/src/forge/Index.js
index 20eabd5c..98276e08 100644
--- a/src/forge/Index.js
+++ b/src/forge/Index.js
@@ -6,7 +6,6 @@ import { withRouter } from "react-router";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
-import Handbook from './Component/Handbook';
import "./css/index.scss";
import Loadable from "react-loadable";
@@ -14,7 +13,7 @@ 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({
@@ -33,11 +32,10 @@ const Infos = Loadable({
});
class Index extends Component {
-
+
render() {
return (
-
import("./Infos"),
loading: Loading,
@@ -15,7 +14,6 @@ export default withRouter(
(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)=>{
return(
-
)
}))))
-)
\ No newline at end of file
+)
From 5601b71937d553b0d11b066e8d3687e1ffaaaaa4 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Sun, 9 Aug 2020 23:08:11 +0800
Subject: [PATCH 02/56] junke
---
src/modules/tpm/NewHeader.js | 68 +++++++++++++++++-------------------
1 file changed, 33 insertions(+), 35 deletions(-)
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index 2ead4e4f..e2c47bb3 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -50,7 +50,8 @@ class NewHeader extends Component {
}
}
componentDidMount() {
- this.getAppdata();
+ // this.getAppdata();
+ this.geturlsdata();
window._header_componentHandler = this;
//下拉框的显示隐藏
@@ -547,23 +548,19 @@ class NewHeader extends Component {
geturlsdata = () => {
let url = "/setting.json";
axios.get(url).then((response) => {
- if (response) {
- if (response.data) {
- this.setState({
- mygetHelmetapi2: response.data.setting
- });
- localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
- localStorage.setItem('chromesettingresponse', JSON.stringify(response));
- try {
- if (response.data.setting.tab_logo_url) {
- this.gettablogourldata(response);
- } else {
- this.gettablogourlnull();
- }
- } catch (e) {
+ if (response && response.data) {
+ this.setState({
+ mygetHelmetapi2: response.data.setting
+ });
+ // localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
+ // localStorage.setItem('chromesettingresponse', JSON.stringify(response));
+ try {
+ if (response.data.setting.tab_logo_url) {
+ this.gettablogourldata(response);
+ } else {
this.gettablogourlnull();
}
- } else {
+ } catch (e) {
this.gettablogourlnull();
}
} else {
@@ -571,29 +568,30 @@ class NewHeader extends Component {
}
}).catch((error) => {
this.gettablogourlnull();
-
});
}
matchpaths = (url) => {
const { match } = this.props;
- if (url === '/forums' && match.path === '/forums') {
- return true
- } else if (url.startsWith('/projects') && match.path.startsWith('/projects')) {
- return true
- } else if (url.startsWith('/paths') && match.path.startsWith('/paths')) {
- return true
- } else if (url.startsWith('/courses') && match.path.startsWith('/courses')) {
- return true
- } else if (url.startsWith('/competitions') && match.path.startsWith('/competitions')) {
- return true
- } else if (url.startsWith('/statistics') && match.path.startsWith('/statistics')) {
- return true
- } else if (url.startsWith('/users') && match.path.startsWith('/users')) {
- return true
- } else {
- return false
+ if(url){
+ if (url === '/forums' && match.path === '/forums') {
+ return true
+ } else if (url.startsWith('/projects') && match.path.startsWith('/projects')) {
+ return true
+ } else if (url.startsWith('/paths') && match.path.startsWith('/paths')) {
+ return true
+ } else if (url.startsWith('/courses') && match.path.startsWith('/courses')) {
+ return true
+ } else if (url.startsWith('/competitions') && match.path.startsWith('/competitions')) {
+ return true
+ } else if (url.startsWith('/statistics') && match.path.startsWith('/statistics')) {
+ return true
+ } else if (url.startsWith('/users') && match.path.startsWith('/users')) {
+ return true
+ } else {
+ return false
+ }
}
}
@@ -741,7 +739,7 @@ class NewHeader extends Component {
var new_link = item.link;
var user_login = this.props.user && this.props.user.login;
var is_hidden = item.hidden
- if (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1) {
+ 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")
@@ -752,7 +750,7 @@ class NewHeader extends Component {
is_hidden = true
}
}
- if (user_login && new_link.indexOf("homes") > -1) {
+ if (user_login && (new_link && new_link.indexOf("homes") > -1)) {
new_link = new_link.replace(/homes/g, "users/" + user_login + "/user_activities")
}
return (
From 13c65565749097c99e66c533d3e6d1f24910b232 Mon Sep 17 00:00:00 2001
From: Jasder <2053003901@@qq.com>
Date: Sun, 9 Aug 2020 23:20:08 +0800
Subject: [PATCH 03/56] =?UTF-8?q?FIX=20=E6=9B=B4=E6=94=B9logo=E5=AF=BC?=
=?UTF-8?q?=E8=88=AA=E9=93=BE=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/tpm/NewHeader.js | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index e2c47bb3..a93dc45e 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -722,12 +722,12 @@ class NewHeader extends Component {
this.setgoshowqqgtounp(bool)}>
:""
}
- this.headtypesonClick("/", false)} className={"fl mr30"}>
+ this.headtypesonClick("/", false)} className={"fl mr30"}>
{
mygetHelmetapi2 && mygetHelmetapi2.nav_logo_url && mygetHelmetapi2.nav_logo_url ?
-
+
:
-
+
}
{
@@ -881,4 +881,3 @@ class NewHeader extends Component {
}
export default NewHeader;
-
From 2fa71241db65c960cf95aad8327d8ee8301a60d3 Mon Sep 17 00:00:00 2001
From: Jasder <2053003901@@qq.com>
Date: Sun, 9 Aug 2020 23:24:12 +0800
Subject: [PATCH 04/56] =?UTF-8?q?FIX=20=E6=9B=B4=E6=94=B9header=E7=9A=84?=
=?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/modules/tpm/TPMIndex.css | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index 1f40ed79..ea7c652b 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -24,7 +24,7 @@ body>.-task-title {
}
.newHeaders{
max-width: unset;
- background: #fff !important;
+ background: #24292d;
width: 100%;
height:70px;
min-width: 1200px;
@@ -412,4 +412,4 @@ body>.-task-title {
.progress-container {
flex: 1 0 0;
margin-left: 20px;
-}
\ No newline at end of file
+}
From f1614a4b6234614551ac421248c815f3c00dae95 Mon Sep 17 00:00:00 2001
From: Jasder <2053003901@@qq.com>
Date: Mon, 10 Aug 2020 11:27:41 +0800
Subject: [PATCH 05/56] Delete url
---
src/modules/tpm/NewHeader.js | 3 ---
src/modules/tpm/TPMIndex.css | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index a93dc45e..9a8f5485 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -760,9 +760,6 @@ class NewHeader extends Component {
)
})
}
-
- 问题反馈
-
: ""
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index ea7c652b..3d97b393 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -26,7 +26,7 @@ body>.-task-title {
max-width: unset;
background: #24292d;
width: 100%;
- height:70px;
+ height:60px;
min-width: 1200px;
z-index: 1000;
-moz-box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.1);
From 85d924db70fcf21cac2a3eb904df1b7ea789494b Mon Sep 17 00:00:00 2001
From: "sylor_huang@126.com"
Date: Thu, 13 Aug 2020 11:56:39 +0800
Subject: [PATCH 06/56] Fix: Add New File Language Api Wrong6
---
src/forge/Component/FileLanguage.jsx | 31 ++++++++++++++--------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/forge/Component/FileLanguage.jsx b/src/forge/Component/FileLanguage.jsx
index 177449c4..e2c9cc5d 100644
--- a/src/forge/Component/FileLanguage.jsx
+++ b/src/forge/Component/FileLanguage.jsx
@@ -1,3 +1,5 @@
+
+
import React , { useState , useEffect } from 'react';
import { Select } from 'antd';
import axios from 'axios';
@@ -57,28 +59,27 @@ const LANGUAGE = [
export default (({ language , select_language })=>{
const [ languages , setLanguage ] = useState(undefined);
-
- useEffect(()=>{
- const url = '/dev_ops/languages.json';
- axios.get(url).then(result=>{
- if(result){
- setLanguage(result.data);
- }
- }).catch(error=>{
- console.log(error);
- })
- },[])
+ // useEffect(()=>{
+ // const url = '/dev_ops/languages.json';
+ // axios.get(url).then(result=>{
+ // if(result){
+ // setLanguage(result.data);
+ // }
+ // }).catch(error=>{
+ // console.log(error);
+ // })
+ // },[])
function changelanguage(value){
- let array = value ? languages.filter(item=>item.name === value) :undefined;
- select_language(value,array && array[0]);
+ // let array = value ? languages.filter(item=>item.name === value) :undefined;
+ select_language(value);
}
return(
)
From f2f910b5e40c19b831139715e8a791d341051f37 Mon Sep 17 00:00:00 2001
From: "sylor_huang@126.com"
Date: Tue, 18 Aug 2020 10:36:33 +0800
Subject: [PATCH 07/56] Add Dun Check For Project
---
src/forge/Upload/Index.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/forge/Upload/Index.js b/src/forge/Upload/Index.js
index f366d5da..cfa22349 100644
--- a/src/forge/Upload/Index.js
+++ b/src/forge/Upload/Index.js
@@ -57,11 +57,26 @@ class Index extends Component {
handleChange = (info) => {
const { changeIsComplete } = this.props;
changeIsComplete && changeIsComplete(true);
+
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) });
this.fileIdList(fileList);
+
+ if ( info.file.status === 'done') {
+ let filelist = info.fileList && info.fileList.length>0 && info.fileList[info.fileList.length-1];
+ if(filelist && filelist.response && filelist.response.status === -1){
+ this.props.showNotification(filelist.response.message)
+ this.setState((state) => {
+ state.fileList.pop()
+ return {
+ fileList: state.fileList,
+ };
+ });
+ this.fileIdList(this.state.fileList);
+ }
+ }
}
}
From 0922df387581a917a19e9468726d63eecd84417e Mon Sep 17 00:00:00 2001
From: "sylor_huang@126.com"
Date: Wed, 19 Aug 2020 18:18:03 +0800
Subject: [PATCH 08/56] Hide LoginDialog
---
src/modules/login/LoginDialog.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js
index 44197524..47fad4b1 100644
--- a/src/modules/login/LoginDialog.js
+++ b/src/modules/login/LoginDialog.js
@@ -580,9 +580,9 @@ class LoginDialog extends Component {
- this.getloginurl("https://www.trustie.net/account/lost_password")}
+ this.getloginurl("http://39.105.176.215/account/lost_password")}
className="mr3 color-grey-9">找回密码
- this.getloginurl("https://www.trustie.net/login?login=false")} className="color-grey-9">注册
+ this.getloginurl("http://39.105.176.215/user_join")} className="color-grey-9">注册
From 3b0c708d82d9bd0c83f32957883339f3bca4c8f0 Mon Sep 17 00:00:00 2001
From: "sylor_huang@126.com"
Date: Thu, 20 Aug 2020 11:44:27 +0800
Subject: [PATCH 09/56] Fix: Issues
---
src/forge/users/Infos.js | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index a18b54e8..0a93846a 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -141,10 +141,7 @@ class Infos extends Component {
this.route_link("watchers")}
>
@@ -175,7 +172,7 @@ class Infos extends Component {
{user && user.watching_count}
this.route_link("fan_users")}
className={`with50 text-center pull-left ${route_type === "fan_users" ? "text-primary" : ""}`}
>
From e0e6cdcc79f5e90fcc0d957c2577bb06ee86cbc6 Mon Sep 17 00:00:00 2001
From: "sylor_huang@126.com"
Date: Thu, 20 Aug 2020 11:57:36 +0800
Subject: [PATCH 10/56] Fix: Issues
---
src/forge/Newfile/m_editor.js | 2 +-
src/forge/users/Infos.js | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/forge/Newfile/m_editor.js b/src/forge/Newfile/m_editor.js
index 806154b0..848d752d 100644
--- a/src/forge/Newfile/m_editor.js
+++ b/src/forge/Newfile/m_editor.js
@@ -49,7 +49,7 @@ class m_editor extends Component {
height="600px"
language={language ? language : "plaintext"}
theme={"vs-grey"}
- defaultValue="请输入内容"
+ defaultValue=""
value={editorValue}
options={editor_options}
onChange={this.changeEditor}
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 0a93846a..2c5c09f2 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -141,7 +141,7 @@ class Infos extends Component {
this.route_link("watchers")}
>
@@ -172,7 +172,7 @@ class Infos extends Component {
{user && user.watching_count}
this.route_link("fan_users")}
className={`with50 text-center pull-left ${route_type === "fan_users" ? "text-primary" : ""}`}
>
From a9161b86a2707610c0272a5cc9fc210d5cc3bd50 Mon Sep 17 00:00:00 2001
From: "sylor_huang@126.com"
Date: Thu, 20 Aug 2020 15:01:01 +0800
Subject: [PATCH 11/56] Change
---
src/forge/users/Infos.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 2c5c09f2..819c34a3 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -43,7 +43,7 @@ class Infos extends Component {
isSpin: false,
user: undefined,
project_type: undefined,
- route_type: undefined
+ route_type: undefined,
};
}
@@ -113,6 +113,7 @@ class Infos extends Component {
render() {
+ const extra_http = `${document.location.protocol}//${document.domain}`;
const { current_user, mygetHelmetapi } = this.props;
const { user, isSpin, project_type, route_type } = this.state;
return (
@@ -141,8 +142,7 @@ class Infos extends Component {
From 07e1525f09dce1da655c71da8f5ddfa3bed2e71c Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 20 Aug 2020 18:10:40 +0800
Subject: [PATCH 12/56] router
---
src/forge/Merge/MergeItem.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/forge/Merge/MergeItem.js b/src/forge/Merge/MergeItem.js
index d34f5382..d558591f 100644
--- a/src/forge/Merge/MergeItem.js
+++ b/src/forge/Merge/MergeItem.js
@@ -98,7 +98,7 @@ class MergeItem extends Component {
{item.is_original
From 74d26a40d371f7724d02af5da8b20b0017e28317 Mon Sep 17 00:00:00 2001
From: "sylor_huang@126.com"
Date: Mon, 24 Aug 2020 11:37:51 +0800
Subject: [PATCH 13/56] Change Edit Url
---
src/forge/users/Infos.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js
index 819c34a3..76c76cf3 100644
--- a/src/forge/users/Infos.js
+++ b/src/forge/users/Infos.js
@@ -142,7 +142,7 @@ class Infos extends Component {