Conficts
This commit is contained in:
commit
876a1ccc3c
|
|
@ -20,7 +20,7 @@
|
|||
<meta name="theme-color" content="#000000">
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||
|
||||
<script type="text/javascript">
|
||||
<!-- <script type="text/javascript">
|
||||
window.__isR = true;
|
||||
if (
|
||||
(navigator.userAgent.indexOf('MSIE 9') != -1
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
location.pathname.indexOf("/compatibility") == -1) {
|
||||
location.href = '/compatibility.html'
|
||||
}
|
||||
</script>
|
||||
</script> -->
|
||||
|
||||
<link rel=" stylesheet" type="text/css" href="%PUBLIC_URL%css/iconfont.css">
|
||||
<link rel=" stylesheet" type="text/css" href="%PUBLIC_URL%css/edu-purge.css">
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<div id="md_div" style="display: none;"></div>
|
||||
<div id="root" class="page -layout-v -fit widthunit"></div>
|
||||
<div id="picture_display" style="display: none;"></div>
|
||||
<script src="%PUBLIC_URL%js/js_min_all.js"></script>
|
||||
<script src="%PUBLIC_URL%js/jquery-1.8.3.min.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/codemirror.js"></script>
|
||||
<script src="%PUBLIC_URL%js/editormd/editormd.min.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/merge/merge.js"></script>
|
||||
|
|
|
|||
12
src/App.js
12
src/App.js
|
|
@ -213,13 +213,13 @@ class App extends Component {
|
|||
<Provider store={store}>
|
||||
<ConfigProvider locale={zhCN}>
|
||||
<MuiThemeProvider theme={theme}>
|
||||
<Accountnewprofile {...this.props}{...this.state} />
|
||||
{/* <Accountnewprofile {...this.props}{...this.state} /> */}
|
||||
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog>
|
||||
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
|
||||
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
|
||||
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
|
||||
<AccountProfile {...this.props} {...this.state} />
|
||||
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy} />
|
||||
{/* <Notcompletedysl {...this.props} {...this.state}></Notcompletedysl> */}
|
||||
{/* <Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl> */}
|
||||
{/* <Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview> */}
|
||||
{/* <AccountProfile {...this.props} {...this.state} /> */}
|
||||
{/* <Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy} /> */}
|
||||
<Router>
|
||||
<Switch>
|
||||
{/*项目*/}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
import axios from 'axios';
|
||||
import { requestProxy } from "./indexEduplus2RequestProxy";
|
||||
import { broadcastChannelOnmessage , isDev, queryString } from 'educoder';
|
||||
import { broadcastChannelOnmessage, isDev, queryString } from 'educoder';
|
||||
import { notification } from 'antd';
|
||||
import cookie from 'react-cookies';
|
||||
import './index.css';
|
||||
const $ = window.$;
|
||||
let timestamp;
|
||||
let checkSubmitFlg = false;
|
||||
let message501 = false;
|
||||
|
||||
broadcastChannelOnmessage('refreshPage', () => {
|
||||
|
|
@ -39,9 +36,7 @@ function clearAllCookie() {
|
|||
}
|
||||
clearAllCookie();
|
||||
function setpostcookie() {
|
||||
|
||||
const str = window.location.pathname;
|
||||
let newdomain = ".educoder.net"
|
||||
if (str.indexOf("/wxcode") !== -1) {
|
||||
console.log("123")
|
||||
cookie.remove('_educoder_session', { path: '/' });
|
||||
|
|
@ -53,7 +48,6 @@ function setpostcookie() {
|
|||
cookie.save('_educoder_session', _educoder_sessions[1], { domain: '.educoder.net', path: '/' });
|
||||
let autologin_trusties = _search.split('&')[1].split('=');
|
||||
cookie.save('autologin_trustie', autologin_trusties[1], { domain: '.educoder.net', path: '/' });
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -63,9 +57,9 @@ window._debugType = debugType;
|
|||
export function initAxiosInterceptors(props) {
|
||||
initOnlineOfflineListener()
|
||||
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
|
||||
var
|
||||
// proxy = "http://localhost:3000"
|
||||
proxy = "https://forgeplus.trustie.net"
|
||||
var
|
||||
// proxy = "http://localhost:3000"
|
||||
proxy = "https://testforgeplus.trustie.net"
|
||||
|
||||
const requestMap = {};
|
||||
window.setfalseInRequestMap = function (keyName) {
|
||||
|
|
@ -109,12 +103,10 @@ export function initAxiosInterceptors(props) {
|
|||
});
|
||||
|
||||
axios.interceptors.response.use(function (response) {
|
||||
|
||||
// console.log(".............")
|
||||
if (response === undefined) {
|
||||
return
|
||||
}
|
||||
const config = response.config
|
||||
const config = response.config;
|
||||
if (response.data.status === -1) {
|
||||
if (window.location.pathname.startsWith('/tasks/')) {
|
||||
props.showSnackbar(response.data.message || '服务器异常,请联系管理员。')
|
||||
|
|
@ -127,12 +119,10 @@ export function initAxiosInterceptors(props) {
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
throw new axios.Cancel('Operation canceled by the user.');
|
||||
}
|
||||
|
||||
if (response.data.status === 403 || response.data.status === "403") {
|
||||
|
||||
locationurl('/403');
|
||||
}
|
||||
|
||||
|
|
@ -159,8 +149,6 @@ export function initAxiosInterceptors(props) {
|
|||
message501 = false
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
|
||||
requestMap[response.config.url] = false;
|
||||
setpostcookie();
|
||||
return response;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ class Index extends Component {
|
|||
)}
|
||||
></Route>
|
||||
<Route
|
||||
exact
|
||||
path="/projects"
|
||||
render={(props) => (
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ class CoderRootDirectory extends Component {
|
|||
if (search && search.indexOf("?url=") > -1) {
|
||||
let url = search.split("?url=")[1];
|
||||
this.setState({
|
||||
filePath: url,
|
||||
filePath: decodeURI(url),
|
||||
});
|
||||
this.getFileDetail(url);
|
||||
this.getFileDetail(decodeURI(url));
|
||||
} else {
|
||||
const { branch } = this.state;
|
||||
this.getProjectRoot(branchName || branch);
|
||||
|
|
@ -195,6 +195,9 @@ class CoderRootDirectory extends Component {
|
|||
}
|
||||
}).then((result)=>{
|
||||
let entries = result.data && result.data.entries;
|
||||
this.setState({
|
||||
isSpin:false
|
||||
})
|
||||
if( entries && entries.length > 0){
|
||||
let { chooseType } = this.state;
|
||||
// 当前返回的子目录只有一条数据,且这条数据返回的是文件类型
|
||||
|
|
@ -202,14 +205,12 @@ class CoderRootDirectory extends Component {
|
|||
this.setState({
|
||||
fileDetail:entries,
|
||||
rootList:undefined,
|
||||
isSpin:false,
|
||||
subFileType:false
|
||||
})
|
||||
}else{
|
||||
this.setState({
|
||||
fileDetail:undefined,
|
||||
rootList:entries,
|
||||
isSpin:false,
|
||||
branchLastCommit:result.data.last_commit && result.data.last_commit.commit,
|
||||
lastCommitAuthor:result.data.last_commit && (result.data.last_commit.author || (result.data.last_commit.commit && result.data.last_commit.commit.author))
|
||||
})
|
||||
|
|
@ -326,9 +327,9 @@ class CoderRootDirectory extends Component {
|
|||
if (search && search.indexOf("?url=") > -1) {
|
||||
let url = search.split("?url=")[1];
|
||||
this.setState({
|
||||
filePath: url,
|
||||
filePath: decodeURI(url),
|
||||
});
|
||||
this.getFileDetail(url, value);
|
||||
this.getFileDetail(decodeURI(url), value);
|
||||
} else {
|
||||
this.getProjectRoot(value);
|
||||
}
|
||||
|
|
@ -427,7 +428,7 @@ class CoderRootDirectory extends Component {
|
|||
width: "60%",
|
||||
render: (text, item) =>
|
||||
item.commit && item.commit.message ?
|
||||
<span className="task-hide" style={{ display: "block", maxWidth: "670px" }} >
|
||||
<span title={item.commit.message} className="task-hide" style={{ display: "block", maxWidth: "670px" }} >
|
||||
{item.commit.message}
|
||||
</span>
|
||||
: ""
|
||||
|
|
@ -448,7 +449,7 @@ class CoderRootDirectory extends Component {
|
|||
const urlRoot = filePath === undefined ? "" : `/${filePath}`;
|
||||
let array = filePath && filePath.split("/");
|
||||
return (
|
||||
<Spin spinning={isSpin}>
|
||||
<Spin spinning={false}>
|
||||
<div className="main">
|
||||
<div className="f-wrap-between mb20">
|
||||
<div className="f-wrap-alignCenter">
|
||||
|
|
|
|||
|
|
@ -107,9 +107,6 @@ class CoderRootFileDetail extends Component {
|
|||
EditFile = (flag) => {
|
||||
const { onEdit } = this.props;
|
||||
onEdit && onEdit(flag);
|
||||
// this.setState({
|
||||
// readOnly: false,
|
||||
// });
|
||||
};
|
||||
|
||||
DownLoadFile =(url) => {
|
||||
|
|
|
|||
|
|
@ -378,14 +378,12 @@ class MessageCount extends Component {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt15">
|
||||
{data.issue.description &&
|
||||
data.issue.description.length > 0 ? (
|
||||
this.commentCtx(data.issue.description)
|
||||
) : (
|
||||
<span className="color-grey-9 ml3 mr3">没有描述</span>
|
||||
)}
|
||||
</div>
|
||||
{
|
||||
data.issue.description ?
|
||||
<div className="mt15">{this.commentCtx(data.issue.description)}</div>
|
||||
:
|
||||
<p className="color-grey-9 ml3 mr3 mt15">没有描述</p>
|
||||
}
|
||||
</div>
|
||||
<div className="mt15">
|
||||
{pr_status === 2 && (
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import React, { Component } from "react";
|
||||
import Editor from "react-monaco-editor";
|
||||
|
||||
import UserSubmitComponent from "./UserSubmitComponent";
|
||||
|
||||
import "./index.css";
|
||||
|
|
@ -29,6 +28,7 @@ class m_editor extends Component {
|
|||
lineHeight: 24,
|
||||
renderLineHighlight: "line",
|
||||
revealHorizontalRightPadding: 5,
|
||||
placeholder:"请输入内容",
|
||||
readOnly: readOnly,
|
||||
cursorStyle: readOnly ? "underline-thin" : "line",
|
||||
folding: true,
|
||||
|
|
@ -46,16 +46,17 @@ class m_editor extends Component {
|
|||
<div>
|
||||
<div className="branchTable">
|
||||
<Editor
|
||||
height="600px"
|
||||
height="400px"
|
||||
language={language ? language : "plaintext"}
|
||||
theme={"vs-grey"}
|
||||
defaultValue="请输入内容"
|
||||
placeholder="请输入内容"
|
||||
value={editorValue}
|
||||
options={editor_options}
|
||||
onChange={this.changeEditor}
|
||||
editorWillMount={this.editorWillMount}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{!readOnly && (
|
||||
<UserSubmitComponent
|
||||
{...this.props}
|
||||
|
|
|
|||
|
|
@ -52,12 +52,9 @@ class NewMilepost extends Component {
|
|||
const { projectsId , owner } = this.props.match.params;
|
||||
const url = `/${owner}/${projectsId}/milestones.json`;
|
||||
let time = undefined;
|
||||
if (this.state.selectedValue === undefined) {
|
||||
|
||||
} else {
|
||||
time = this.state.selectedValue.format("YYYY-MM-DD")
|
||||
if (this.state.selectedValue) {
|
||||
time = this.state.selectedValue.format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
axios.post(url, {
|
||||
...values,
|
||||
project_id: projectsId,
|
||||
|
|
@ -68,10 +65,8 @@ class NewMilepost extends Component {
|
|||
this.setState({ isSpin: false })
|
||||
this.props.history.push(`/projects/${owner}/${projectsId}/milestones`);
|
||||
}
|
||||
|
||||
}).catch(error => {
|
||||
this.setState({ isSpin: false })
|
||||
console.log(error);
|
||||
})
|
||||
}else{
|
||||
this.setState({ isSpin: false })
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ body>.-task-title {
|
|||
width: 100%;
|
||||
height:70px;
|
||||
min-width: 1200px;
|
||||
z-index: 1000;
|
||||
z-index: 10000;
|
||||
-moz-box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.1);
|
||||
background:rgba(255,255,255,1);
|
||||
box-shadow:0px 2px 10px 0px rgba(0,0,0,0.1);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import './TPMIndex.css';
|
|||
import LoginDialog from '../login/LoginDialog';
|
||||
import AccountProfile from '../user/AccountProfile';
|
||||
import AccountPhoneemail from '../user/AccountPhoneemail';
|
||||
import cookies from 'react-cookies';
|
||||
|
||||
export function TPMIndexHOC(WrappedComponent) {
|
||||
return class II extends React.Component {
|
||||
|
|
@ -154,7 +153,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
this.gettablogourlnull();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
fetchUsers = () => {
|
||||
let url = `/users/get_user_info.json`;
|
||||
axios.get(url).then((response) => {
|
||||
|
|
@ -163,6 +162,9 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
this.setState({
|
||||
tpmLoading: false
|
||||
})
|
||||
if (this.props.match.path === "/" && response.data.login) {
|
||||
this.props.history.push(`/users/${response.data.login}`);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
|
|
@ -184,15 +186,16 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
json[key] = value;
|
||||
}
|
||||
} while (arr);
|
||||
|
||||
return json;
|
||||
};
|
||||
|
||||
hideLoginDialog = () => {
|
||||
this.setState({
|
||||
isRender: false,
|
||||
isloginCancel: undefined
|
||||
})
|
||||
}
|
||||
|
||||
showLoginDialog = () => {
|
||||
this.setState({
|
||||
isRender: true,
|
||||
|
|
@ -209,6 +212,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
AccountProfiletype: false
|
||||
})
|
||||
}
|
||||
|
||||
showProfileCompleteDialog = () => {
|
||||
this.dialogObj = {}
|
||||
this.setState({
|
||||
|
|
@ -393,11 +397,15 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
tip={this._gLoadingTip || "加载中..."}
|
||||
>
|
||||
<div className="newContainer newContainers">
|
||||
<WrappedComponent initCommonState={(user) => this.initCommonState(user)}
|
||||
{...this.props} {...this.state}
|
||||
{...common}
|
||||
>
|
||||
</WrappedComponent>
|
||||
{
|
||||
current_user &&
|
||||
<WrappedComponent initCommonState={(user) => this.initCommonState(user)}
|
||||
{...this.props} {...this.state}
|
||||
{...common}
|
||||
>
|
||||
</WrappedComponent>
|
||||
}
|
||||
|
||||
</div>
|
||||
</Spin>
|
||||
<NewFooter
|
||||
|
|
|
|||
Loading…
Reference in New Issue