diff --git a/.gitignore b/.gitignore
index 80a536ca6..881a5eea2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,11 @@ pids
*.seed
*.pid.lock
+# Ignore master key for decrypting credentials and more.
+/config/master.key
+/config/database.yml
+/.idea/*
+
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 15a15b218..000000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/forgeplus-react.iml b/.idea/forgeplus-react.iml
deleted file mode 100644
index c3cd732c0..000000000
--- a/.idea/forgeplus-react.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 03d9549ea..000000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index e95b9d032..000000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 956c9e829..000000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7f4..000000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index a13327b0e..000000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,543 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- versions
- 缺陷
- contents/file
- 新建翻转课堂
- nHeader
- 点赞
- fork
- .push(
- QuillForEditor
- setContents
- isedit
- textcount
- commentCtx
- Educoder
- title
-
-
- $PROJECT_DIR$/src/forge
- $PROJECT_DIR$/src
- $PROJECT_DIR$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1584692398144
-
-
- 1584692398144
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/AppConfig.js b/src/AppConfig.js
index 68dd5439a..406f60226 100644
--- a/src/AppConfig.js
+++ b/src/AppConfig.js
@@ -39,7 +39,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' :
- window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
+ window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || ''
}
// 超管
// debugType="admin";
@@ -126,10 +126,11 @@ export function initAxiosInterceptors(props) {
// https://github.com/axios/axios/issues/1497
// TODO 读取到package.json中的配置?
-
+
+
var //proxy = "http://localhost:3000"
- proxy="https://testforgeplus.trustie.net"
- // proxy="http://localhost:3000"
+ proxy="https://testforgeplus.trustie.net/"
+ // proxy="http://localhost:3000"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
@@ -225,7 +226,7 @@ export function initAxiosInterceptors(props) {
// let timestamp=railsgettimes(proxy);
// console.log(timestamp)
// `https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`
- // railsgettimes( `${proxy}/api/main/first_stamp.json`);
+ railsgettimes( `${proxy}/api/main/first_stamp.json`);
let newopens=md5(opens+timestamp)
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
@@ -237,7 +238,7 @@ export function initAxiosInterceptors(props) {
// 加api前缀
// railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
- // railsgettimes( `/api/main/first_stamp.json`);
+ railsgettimes( `/api/main/first_stamp.json`);
let newopens=md5(opens+timestamp)
config.url = url;
if (config.url.indexOf('?') == -1) {
diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js
index 095674a39..ed1114a3f 100644
--- a/src/forge/Main/CoderRootDirectory.js
+++ b/src/forge/Main/CoderRootDirectory.js
@@ -293,7 +293,7 @@ class CoderRootDirectory extends Component{
{
- subFileType !== "file" && isManager && isDeveloper &&
+ subFileType !== "file" && (isManager || isDeveloper) &&
新建文件
上传文件
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index bf53fe729..b3b68077b 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -296,7 +296,7 @@ class Detail extends Component{
const urlArr= url.split("/");
const urlFlag = (urlArr.length === 3);
- const { isManager } = this.props;
+ const { isManager } = this.state;
const { projectsId } = this.props.match.params;
const { state } = this.props.history.location;
diff --git a/src/forge/Merge/MergeSubmit.js b/src/forge/Merge/MergeSubmit.js
index 422730270..eb32752ba 100644
--- a/src/forge/Merge/MergeSubmit.js
+++ b/src/forge/Merge/MergeSubmit.js
@@ -165,7 +165,7 @@ class MergeSubmit extends Component{
{
data ?
- 【{ data.issue.tracker}】
+ 【{ data.issue.issue_classify==='issue'?data.issue.tracker:"合并"}】
:
""
}
@@ -173,7 +173,7 @@ class MergeSubmit extends Component{
- {data&&data.issue.issue_status==="关闭"?"关闭中":"开启中"}
+ {data&&data.issue.issue_status==="关闭"?"关闭中":data&&data.pull_request.status===0?"开启中":"已合并"}
由 { data && data.issue.author_name} 于 { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""}
diff --git a/src/forge/Merge/merge.js b/src/forge/Merge/merge.js
index 2416d670b..b20dd3866 100644
--- a/src/forge/Merge/merge.js
+++ b/src/forge/Merge/merge.js
@@ -166,7 +166,6 @@ class merge extends Component{
if(type===1){
this.setState({
status_type:'1',
- openselect:current_user.user_id,
closeselect:undefined,
issue_tag_ids:'标签',
fixed_version_ids:'里程碑',
@@ -179,7 +178,6 @@ class merge extends Component{
this.setState({
status_type:'2',
openselect:undefined,
- closeselect:current_user.user_id,
issue_tag_ids:'标签',
fixed_version_ids:'里程碑',
assigned_to_ids:'指派人',
diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js
index ed598c927..a985086af 100644
--- a/src/forge/Order/order.js
+++ b/src/forge/Order/order.js
@@ -222,7 +222,6 @@ class order extends Component{
if(type===1){
this.setState({
status_type:'1',
- openselect:current_user.user_id,
closeselect:undefined,
issue_tag_ids:'标签',
tracker_ids:'所有分类',
@@ -238,7 +237,6 @@ class order extends Component{
this.setState({
status_type:'2',
openselect:undefined,
- closeselect:current_user.user_id,
issue_tag_ids:'标签',
tracker_ids:'所有分类',
author_ids:'发布人',
@@ -257,11 +255,19 @@ class order extends Component{
// 筛选:全部、指派给我、由我创建
ChangeAssign=(type)=>{
const { limit, search,status_type} = this.state;
+ const { current_user } = this.props;
+
this.setState({
isSpin:true
})
if(type){
- const { current_user } = this.props;
+ if(current_user===undefined){
+ this.setState({
+ isSpin:false
+ })
+ alert("请登录后查看")
+ return;
+ }
if(type===1){
this.setState({
page:1,
@@ -310,6 +316,8 @@ class order extends Component{
}
render(){
+ const { current_user } = this.props;
+
const { issue_chosen , issues , limit , page , search_count , data , assigned_to_id , author_id , isSpin,openselect,closeselect } = this.state;
const { projectsId } = this.props.match.params;
@@ -364,8 +372,9 @@ class order extends Component{
- this.ChangeAssign()}>全部
- - this.ChangeAssign(1)}>指派给我
- - this.ChangeAssign(2)}>由我创建
+ {}
+ - this.ChangeAssign(1)}>指派给我
+ - this.ChangeAssign(2)}>由我创建
{/* - @我的
*/}