forked from Gitlink/forgeplus-react
修改ignore
This commit is contained in:
commit
e3bb09b530
|
@ -12,6 +12,11 @@ pids
|
||||||
*.seed
|
*.seed
|
||||||
*.pid.lock
|
*.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
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
lib-cov
|
lib-cov
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
|
||||||
</project>
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="RUBY_MODULE" version="4">
|
|
||||||
<component name="ModuleRunConfigurationManager">
|
|
||||||
<shared />
|
|
||||||
</component>
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="JavaScriptSettings">
|
|
||||||
<option name="languageLevel" value="JSX" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.3.7-p456" project-jdk-type="RUBY_SDK" />
|
|
||||||
</project>
|
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/forgeplus-react.iml" filepath="$PROJECT_DIR$/.idea/forgeplus-react.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9830c5da-176a-4c72-a301-9f6ce98c82fe" name="Default Changelist" comment="" />
|
<list default="true" id="9830c5da-176a-4c72-a301-9f6ce98c82fe" name="Default Changelist" comment="">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||||
|
</list>
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -13,20 +15,8 @@
|
||||||
<file pinned="false" current-in-tab="true">
|
<file pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="-7">
|
<state relative-caret-position="170">
|
||||||
<caret line="19" selection-start-line="19" selection-end-line="19" />
|
<caret line="10" column="5" lean-forward="true" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Setting.js">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="150">
|
|
||||||
<caret line="211" column="38" selection-start-line="211" selection-start-column="38" selection-end-line="211" selection-end-column="38" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#42#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -109,20 +99,12 @@
|
||||||
<path>
|
<path>
|
||||||
<item name="forgeplus-react" type="b2602c69:ProjectViewProjectNode" />
|
<item name="forgeplus-react" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="forgeplus-react" type="462c0819:PsiDirectoryNode" />
|
<item name="forgeplus-react" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
<item name="public" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<item name="forgeplus-react" type="b2602c69:ProjectViewProjectNode" />
|
<item name="forgeplus-react" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="forgeplus-react" type="462c0819:PsiDirectoryNode" />
|
<item name="forgeplus-react" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="forge" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
|
||||||
<item name="forgeplus-react" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="forgeplus-react" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="forge" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="Settings" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
</path>
|
||||||
</expand>
|
</expand>
|
||||||
<select />
|
<select />
|
||||||
|
@ -177,12 +159,13 @@
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="29598000" />
|
<option name="totallyTimeSpent" value="28976000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
|
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
|
||||||
|
<editor active="true" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
|
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
|
||||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||||
<window_info id="Favorites" order="2" side_tool="true" />
|
<window_info id="Favorites" order="2" side_tool="true" />
|
||||||
<window_info anchor="bottom" id="Message" order="0" />
|
<window_info anchor="bottom" id="Message" order="0" />
|
||||||
|
@ -195,7 +178,7 @@
|
||||||
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
|
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
|
||||||
<window_info anchor="bottom" id="Database Changes" order="8" />
|
<window_info anchor="bottom" id="Database Changes" order="8" />
|
||||||
<window_info anchor="bottom" id="Version Control" order="9" weight="0.47228914" />
|
<window_info anchor="bottom" id="Version Control" order="9" weight="0.47228914" />
|
||||||
<window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.6385542" />
|
<window_info anchor="bottom" id="Terminal" order="10" visible="true" weight="0.5180723" />
|
||||||
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
|
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
|
||||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||||
|
@ -532,6 +515,16 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Setting.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="149">
|
||||||
|
<caret line="205" column="14" lean-forward="true" selection-start-line="205" selection-start-column="14" selection-end-line="205" selection-end-column="14" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#42#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js">
|
<entry file="file://$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="326">
|
<state relative-caret-position="326">
|
||||||
|
@ -547,20 +540,10 @@
|
||||||
<state relative-caret-position="-10408" />
|
<state relative-caret-position="-10408" />
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Setting.js">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="150">
|
|
||||||
<caret line="211" column="38" selection-start-line="211" selection-start-column="38" selection-end-line="211" selection-end-column="38" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#0#42#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="-7">
|
<state relative-caret-position="170">
|
||||||
<caret line="19" selection-start-line="19" selection-end-line="19" />
|
<caret line="10" column="5" lean-forward="true" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
@ -39,7 +39,7 @@ if (isDev) {
|
||||||
}
|
}
|
||||||
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
|
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
|
||||||
window.location.search.indexOf('debug=s') != -1 ? 'student' :
|
window.location.search.indexOf('debug=s') != -1 ? 'student' :
|
||||||
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || ''
|
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
|
||||||
}
|
}
|
||||||
// 超管
|
// 超管
|
||||||
// debugType="admin";
|
// debugType="admin";
|
||||||
|
|
|
@ -294,9 +294,9 @@ class CoderRootDirectory extends Component{
|
||||||
<div className="f-wrap-alignCenter">
|
<div className="f-wrap-alignCenter">
|
||||||
{
|
{
|
||||||
subFileType !== "file" && (isManager || isDeveloper) &&
|
subFileType !== "file" && (isManager || isDeveloper) &&
|
||||||
<p className="addFile">
|
<p className="addFile mr30">
|
||||||
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
||||||
<Link to={``}>上传文件</Link>
|
{/* <Link to={``}>上传文件</Link> */}
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,30 +97,35 @@ class CoderRootFileDetail extends Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
const { detail } = this.props;
|
const { detail , current_user , isManager , isReporter , isDeveloper } = this.props;
|
||||||
const { readOnly ,value } = this.state;
|
const { readOnly ,value } = this.state;
|
||||||
|
|
||||||
|
const flag = current_user && current_user.login && (isManager || isReporter);
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<div className="branchTable">
|
<div className="branchTable">
|
||||||
<p className="branchTitle f-wrap-alignCenter f-wrap-between">
|
<p className="branchTitle f-wrap-alignCenter f-wrap-between">
|
||||||
<span>{bytesToSize(detail && detail.size)}</span>
|
<span>{bytesToSize(detail && detail.size)}</span>
|
||||||
<span>
|
|
||||||
{
|
{
|
||||||
readOnly ?
|
flag &&
|
||||||
<a onClick={this.EditFile} className="ml20"><i className="iconfont icon-bianji font-15 color-grey-6"></i></a>
|
<span>
|
||||||
:
|
{
|
||||||
<React.Fragment>
|
readOnly ?
|
||||||
<button type="button" className="ant-btn ant-btn-sm mr10" onClick={this.CancelEdit}><span>取 消</span>
|
<a onClick={this.EditFile} className="ml20"><i className="iconfont icon-bianji font-15 color-grey-6"></i></a>
|
||||||
</button>
|
:
|
||||||
<button type="button" className="ant-btn ant-btn-primary ant-btn-sm" onClick={this.UpdateFile}><span>确 定</span>
|
<React.Fragment>
|
||||||
</button>
|
<button type="button" className="ant-btn ant-btn-sm mr10" onClick={this.CancelEdit}><span>取 消</span>
|
||||||
</React.Fragment>
|
</button>
|
||||||
}
|
<button type="button" className="ant-btn ant-btn-primary ant-btn-sm" onClick={this.UpdateFile}><span>确 定</span>
|
||||||
|
</button>
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
|
||||||
<Popconfirm title="确认删除这个文件?" className="ml20" okText="确定" cancelText="取消" onConfirm={this.deleteFile}>
|
<Popconfirm title="确认删除这个文件?" className="ml20" okText="确定" cancelText="取消" onConfirm={this.deleteFile}>
|
||||||
<a><i className="iconfont icon-shanchu font-15 color-grey-6"></i></a>
|
<a><i className="iconfont icon-shanchu font-15 color-grey-6"></i></a>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</span>
|
</span>
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="content-file">
|
<div className="content-file">
|
||||||
|
|
|
@ -442,10 +442,10 @@ body,#root{
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
}
|
}
|
||||||
.addFile a:first-child{
|
.addFile a:first-child{
|
||||||
border-radius: 4px 0px 0px 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.addFile a:last-child{
|
.addFile a:last-child{
|
||||||
border-radius: 0px 4px 4px 0px;
|
/* border-radius: 0px 4px 4px 0px; */
|
||||||
border-left: 1px solid rgba(247, 247, 247, 0.3);
|
border-left: 1px solid rgba(247, 247, 247, 0.3);
|
||||||
}
|
}
|
||||||
.addFile a:active{
|
.addFile a:active{
|
||||||
|
|
|
@ -5,15 +5,20 @@ import axios from 'axios';
|
||||||
import Nav from '../Order/Nav';
|
import Nav from '../Order/Nav';
|
||||||
import UploadComponent from '../Upload/Index';
|
import UploadComponent from '../Upload/Index';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
import {Modal, Col, Form, Input, Tooltip, Popconfirm, Pagination , Spin,Dropdown,Icon,Menu} from 'antd'
|
import {Modal, Form, Input, Tooltip, Popconfirm, Pagination , Spin,Dropdown,Icon,Menu} from 'antd'
|
||||||
import NoneData from '../../modules/courses/coursesPublic/NoneData';
|
|
||||||
import Attachments from '../Upload/attachment'
|
import Attachments from '../Upload/attachment'
|
||||||
import './merge.css';
|
import './merge.css';
|
||||||
|
import QuillForEditor from '../quillForEditor';
|
||||||
|
|
||||||
const TextArea = Input.TextArea;
|
const TextArea = Input.TextArea;
|
||||||
|
|
||||||
|
const options = [
|
||||||
|
['bold', 'italic', 'underline'],
|
||||||
|
[{header: [1,2,3,false]}],
|
||||||
|
['blockquote', 'code-block'],
|
||||||
|
['link', 'image'],
|
||||||
|
['formula']
|
||||||
|
];
|
||||||
class MessageCount extends Component{
|
class MessageCount extends Component{
|
||||||
constructor(props){
|
constructor(props){
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -39,7 +44,9 @@ class MessageCount extends Component{
|
||||||
mergename:'合并请求',
|
mergename:'合并请求',
|
||||||
mergekey:'merge',
|
mergekey:'merge',
|
||||||
title:'',
|
title:'',
|
||||||
body:''
|
body:'',
|
||||||
|
commentsContent:undefined,
|
||||||
|
quillFlag:false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,12 +88,19 @@ class MessageCount extends Component{
|
||||||
|
|
||||||
//添加评论
|
//添加评论
|
||||||
addjournals=()=>{
|
addjournals=()=>{
|
||||||
|
const { data, page, limit, fileList , commentsContent } = this.state;
|
||||||
|
if(!commentsContent){
|
||||||
|
this.setState({
|
||||||
|
quillFlag:true
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||||
if(!err){
|
if(!err){
|
||||||
const { data, page, limit, fileList } = this.state;
|
|
||||||
const url = `/issues/${data.issue.id}/journals.json`;
|
const url = `/issues/${data.issue.id}/journals.json`;
|
||||||
axios.post(url,{
|
axios.post(url,{
|
||||||
...values,
|
...values,
|
||||||
|
content:JSON.stringify(commentsContent),
|
||||||
issue_id:data.id,
|
issue_id:data.id,
|
||||||
attachment_ids:fileList
|
attachment_ids:fileList
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
|
@ -96,7 +110,9 @@ class MessageCount extends Component{
|
||||||
attachments_ids: undefined
|
attachments_ids: undefined
|
||||||
});
|
});
|
||||||
this.setState({
|
this.setState({
|
||||||
showFiles: false
|
showFiles: false,
|
||||||
|
quillFlag:false,
|
||||||
|
commentsContent:undefined
|
||||||
})
|
})
|
||||||
this.getjournalslist(page, limit);
|
this.getjournalslist(page, limit);
|
||||||
this.props.showNotification("评论成功!");
|
this.props.showNotification("评论成功!");
|
||||||
|
@ -160,7 +176,7 @@ class MessageCount extends Component{
|
||||||
project_id:projectsId,
|
project_id:projectsId,
|
||||||
id:data.pull_request.id,
|
id:data.pull_request.id,
|
||||||
do:mergekey,
|
do:mergekey,
|
||||||
body:body,
|
body:JSON.stringify(body),
|
||||||
title:title,
|
title:title,
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result){
|
if(result){
|
||||||
|
@ -173,14 +189,14 @@ class MessageCount extends Component{
|
||||||
|
|
||||||
//修改评论
|
//修改评论
|
||||||
updatedetail=(id)=>{
|
updatedetail=(id)=>{
|
||||||
console.log("updtedetail", this.state)
|
// console.log("updtedetail", this.state)
|
||||||
const {page, limit,data } = this.state;
|
const {page, limit,data } = this.state;
|
||||||
const {orderId} = this.props.match.params;
|
const {orderId} = this.props.match.params;
|
||||||
const url = `/issues/${data.issue.id}/journals/${id}.json`;
|
const url = `/issues/${data.issue.id}/journals/${id}.json`;
|
||||||
axios.put(url,{
|
axios.put(url,{
|
||||||
issue_id:orderId,
|
issue_id:orderId,
|
||||||
id:id,
|
id:id,
|
||||||
content:this.state.countvalue
|
content:JSON.stringify(this.state.countvalue)
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result){
|
if(result){
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -217,9 +233,9 @@ class MessageCount extends Component{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
changmodelname=(e)=>{
|
changmodelname=(value)=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
countvalue:e.target.value
|
countvalue:value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
changtitlepr=(e)=>{
|
changtitlepr=(e)=>{
|
||||||
|
@ -228,9 +244,9 @@ class MessageCount extends Component{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
changbodypr=(e)=>{
|
changbodypr=(value)=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
body:e.target.value
|
body:value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
editdetail=(count,status)=>{
|
editdetail=(count,status)=>{
|
||||||
|
@ -314,9 +330,48 @@ class MessageCount extends Component{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeComments=(value)=>{
|
||||||
|
this.setState({
|
||||||
|
commentsContent:value
|
||||||
|
})
|
||||||
|
if(value){
|
||||||
|
this.setState({
|
||||||
|
quillFlag:false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stringJson=(value) =>{
|
||||||
|
let _value = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
_value = JSON.parse(value);
|
||||||
|
} catch (e) {
|
||||||
|
_value = value;
|
||||||
|
}
|
||||||
|
return _value
|
||||||
|
}
|
||||||
|
commentCtx = (ctx) => {
|
||||||
|
let _ctx = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
_ctx = JSON.parse(ctx);
|
||||||
|
} catch (e) {
|
||||||
|
_ctx = ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<QuillForEditor
|
||||||
|
readOnly={true}
|
||||||
|
value={_ctx}
|
||||||
|
showUploadImage={this.handleShowImage}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
const { projectsId,mergeId } = this.props.match.params;
|
const { projectsId,mergeId } = this.props.match.params;
|
||||||
const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles } = this.state;
|
const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , commentsContent , quillFlag } = this.state;
|
||||||
const { getFieldDecorator } = this.props.form;
|
const { getFieldDecorator } = this.props.form;
|
||||||
const { current_user } = this.props;
|
const { current_user } = this.props;
|
||||||
const url = this.props.history.location.pathname;
|
const url = this.props.history.location.pathname;
|
||||||
|
@ -370,7 +425,7 @@ class MessageCount extends Component{
|
||||||
<div style={{display: (isedit && isedit === item.id) ? "none" : "block"}} >
|
<div style={{display: (isedit && isedit === item.id) ? "none" : "block"}} >
|
||||||
{
|
{
|
||||||
item.content ?
|
item.content ?
|
||||||
<div>{item.content}</div>
|
this.commentCtx(item.content)
|
||||||
:
|
:
|
||||||
<div>
|
<div>
|
||||||
{this.renderJournalList(item.journal_details)}
|
{this.renderJournalList(item.journal_details)}
|
||||||
|
@ -384,7 +439,20 @@ class MessageCount extends Component{
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div style={{display: (isedit && isedit === item.id) ? "block" : "none"}}>
|
<div style={{display: (isedit && isedit === item.id) ? "block" : "none"}}>
|
||||||
<TextArea style={{height:"200px"}} value={this.state.countvalue} onChange={this.changmodelname}/>
|
<QuillForEditor
|
||||||
|
value = {this.stringJson(this.state.countvalue)}
|
||||||
|
wrapStyle={{
|
||||||
|
height: '220px',
|
||||||
|
opacity:1,
|
||||||
|
marginTop:"20px"
|
||||||
|
}}
|
||||||
|
// autoFocus={true}
|
||||||
|
style={{ height: '170px' }}
|
||||||
|
placeholder="评论内容"
|
||||||
|
options={options}
|
||||||
|
onContentChange={this.changmodelname}
|
||||||
|
/>
|
||||||
|
{/* <TextArea style={{height:"200px"}} value={this.state.countvalue} onChange={this.changmodelname}/> */}
|
||||||
<p className="clearfix mt15">
|
<p className="clearfix mt15">
|
||||||
<a className="topWrapper_btn fr" type="submit" onClick={()=>this.updatedetail(item.id)}>保存</a>
|
<a className="topWrapper_btn fr" type="submit" onClick={()=>this.updatedetail(item.id)}>保存</a>
|
||||||
<a className="a_btn cancel_btn fr" type="submit" onClick={()=>this.editdetail(item.content,undefined)}>取消</a>
|
<a className="a_btn cancel_btn fr" type="submit" onClick={()=>this.editdetail(item.content,undefined)}>取消</a>
|
||||||
|
@ -462,7 +530,7 @@ class MessageCount extends Component{
|
||||||
|
|
||||||
{ Paginations }
|
{ Paginations }
|
||||||
<div className="df" style={{display:this.state.data&&this.state.data.pull_request.status===1?'none':'flex'}}>
|
<div className="df" style={{display:this.state.data&&this.state.data.pull_request.status===1?'none':'flex'}}>
|
||||||
<Link to={``}><img className="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/></Link>
|
<img className="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/>
|
||||||
<div className="new_context" >
|
<div className="new_context" >
|
||||||
<p>该合并请求可以进行自动合并操作</p>
|
<p>该合并请求可以进行自动合并操作</p>
|
||||||
<p style={{marginTop:15,display:this.state.mergekey==='rebase'?this.state.buttonshow==='none'?"block":"none":this.state.ismesrge==='none'?"block":"none"}}>
|
<p style={{marginTop:15,display:this.state.mergekey==='rebase'?this.state.buttonshow==='none'?"block":"none":this.state.ismesrge==='none'?"block":"none"}}>
|
||||||
|
@ -476,8 +544,22 @@ class MessageCount extends Component{
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div style={{display:this.state.ismesrge,marginTop:15}}>
|
<div style={{display:this.state.ismesrge,marginTop:15}}>
|
||||||
<Input placeholder="合并请求标题" value={this.state.title} onChange={this.changtitlepr}/>
|
<Input placeholder="标题" value={this.state.title} onChange={this.changtitlepr}/>
|
||||||
<TextArea placeholder="合并请求描述..." style={{height:"300px",marginTop:15}} value={this.state.body} onChange={this.changbodypr} />
|
<div className="quillContent" style={{marginTop:"20px"}}>
|
||||||
|
<QuillForEditor
|
||||||
|
value = {this.state.body}
|
||||||
|
wrapStyle={{
|
||||||
|
height: '220px',
|
||||||
|
opacity:1,
|
||||||
|
}}
|
||||||
|
// autoFocus={true}
|
||||||
|
style={{ height: '170px' }}
|
||||||
|
placeholder="评论内容..."
|
||||||
|
options={options}
|
||||||
|
onContentChange={this.changbodypr}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/* <TextArea placeholder="请输入合并描述..." style={{height:"300px",marginTop:15}} value={this.state.body} onChange={this.changbodypr} /> */}
|
||||||
</div>
|
</div>
|
||||||
<p className="clearfix mt15" style={{display:this.state.buttonshow}}>
|
<p className="clearfix mt15" style={{display:this.state.buttonshow}}>
|
||||||
<a className="topWrapper_btn " type="submit" onClick={()=>this.prmerge()}>合并请求</a>
|
<a className="topWrapper_btn " type="submit" onClick={()=>this.prmerge()}>合并请求</a>
|
||||||
|
@ -488,10 +570,9 @@ class MessageCount extends Component{
|
||||||
</div>
|
</div>
|
||||||
<div className="order_line" style={{marginLeft:80}}></div>
|
<div className="order_line" style={{marginLeft:80}}></div>
|
||||||
<div className="df">
|
<div className="df">
|
||||||
<Link to={``}><img className="user_img"
|
<img className="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/>
|
||||||
src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/></Link>
|
|
||||||
<div className="new_context">
|
<div className="new_context">
|
||||||
<Form.Item>
|
{/* <Form.Item>
|
||||||
{getFieldDecorator('content', {
|
{getFieldDecorator('content', {
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true, message: '请输入内容'
|
required: true, message: '请输入内容'
|
||||||
|
@ -499,7 +580,24 @@ class MessageCount extends Component{
|
||||||
})(
|
})(
|
||||||
<TextArea placeholder="添加评论..." style={{height: "200px"}}/>
|
<TextArea placeholder="添加评论..." style={{height: "200px"}}/>
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item> */}
|
||||||
|
<div className="quillContent">
|
||||||
|
<QuillForEditor
|
||||||
|
value = {commentsContent}
|
||||||
|
wrapStyle={{
|
||||||
|
height: '240px',
|
||||||
|
opacity:1,
|
||||||
|
}}
|
||||||
|
// autoFocus={true}
|
||||||
|
style={{ height: '170px' }}
|
||||||
|
placeholder="请输入合并描述..."
|
||||||
|
options={options}
|
||||||
|
onContentChange={this.changeComments}
|
||||||
|
/>
|
||||||
|
<p className="quillFlag">
|
||||||
|
{ quillFlag && <span className="">请输入评论内容</span>}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<UploadComponent load={this.UploadFunc} isComplete={showFiles}></UploadComponent>
|
<UploadComponent load={this.UploadFunc} isComplete={showFiles}></UploadComponent>
|
||||||
<p className="clearfix mt15">
|
<p className="clearfix mt15">
|
||||||
<a className="topWrapper_btn fr" type="submit" onClick={this.addjournals}>评论</a>
|
<a className="topWrapper_btn fr" type="submit" onClick={this.addjournals}>评论</a>
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
import React , {Component} from 'react';
|
import React , {Component} from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import {Radio, Form,Menu,Dropdown,Input,Select,Table} from 'antd';
|
import {Radio, Form,Menu,Dropdown,Input,Select,Table} from 'antd';
|
||||||
import NoneData from '../../modules/courses/coursesPublic/NoneData';
|
|
||||||
import reactCSS from 'reactcss'
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import moment from 'moment'
|
|
||||||
import UploadComponent from '../Upload/Index';
|
import UploadComponent from '../Upload/Index';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
|
import '../Order/order.css';
|
||||||
|
import QuillForEditor from '../quillForEditor';
|
||||||
|
|
||||||
const { Group, Button } = Radio;
|
|
||||||
|
const { Button } = Radio;
|
||||||
const Option = Select.Option;
|
const Option = Select.Option;
|
||||||
const TextArea = Input.TextArea;
|
|
||||||
|
|
||||||
|
const options = [
|
||||||
|
['bold', 'italic', 'underline'],
|
||||||
|
[{header: [1,2,3,false]}],
|
||||||
|
['blockquote', 'code-block'],
|
||||||
|
['link', 'image'],
|
||||||
|
['formula']
|
||||||
|
];
|
||||||
class NewMerge extends Component{
|
class NewMerge extends Component{
|
||||||
constructor(props){
|
constructor(props){
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -21,6 +27,7 @@ class NewMerge extends Component{
|
||||||
merge:undefined,
|
merge:undefined,
|
||||||
pull:undefined,
|
pull:undefined,
|
||||||
//判断 是否显示创建合并请求的页面
|
//判断 是否显示创建合并请求的页面
|
||||||
|
desc:undefined,
|
||||||
iscreatemerge:'none',
|
iscreatemerge:'none',
|
||||||
issue_tag_ids:"",
|
issue_tag_ids:"",
|
||||||
fixed_version_id:"",
|
fixed_version_id:"",
|
||||||
|
@ -147,9 +154,10 @@ class NewMerge extends Component{
|
||||||
}else{
|
}else{
|
||||||
values.issue_tag_ids = []
|
values.issue_tag_ids = []
|
||||||
}
|
}
|
||||||
|
const { desc } = this.state;
|
||||||
axios.post(url,{
|
axios.post(url,{
|
||||||
...values,
|
...values,
|
||||||
|
body:JSON.stringify(desc),
|
||||||
project_id:projectsId,
|
project_id:projectsId,
|
||||||
head:this.state.merge,
|
head:this.state.merge,
|
||||||
base:this.state.pull,
|
base:this.state.pull,
|
||||||
|
@ -220,12 +228,18 @@ class NewMerge extends Component{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onContentChange=(value)=>{
|
||||||
|
this.setState({
|
||||||
|
desc:value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
const { getFieldDecorator } = this.props.form;
|
const { getFieldDecorator } = this.props.form;
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId } = this.props.match.params;
|
||||||
const { current_user } = this.props;
|
const { current_user } = this.props;
|
||||||
const { issue_tag_ids , fixed_version_id ,assigned_to_id ,issue_chosen,data,titledata} = this.state;
|
const { issue_tag_ids , fixed_version_id ,assigned_to_id ,issue_chosen,data,titledata , desc } = this.state;
|
||||||
|
|
||||||
|
|
||||||
const columns=[{
|
const columns=[{
|
||||||
|
@ -317,7 +331,7 @@ class NewMerge extends Component{
|
||||||
<Form>
|
<Form>
|
||||||
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
|
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
|
||||||
<div className="list-right df">
|
<div className="list-right df">
|
||||||
<Link to={``}><img class="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/></Link>
|
<img class="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/>
|
||||||
<div className="new_context">
|
<div className="new_context">
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
{getFieldDecorator('title', {
|
{getFieldDecorator('title', {
|
||||||
|
@ -328,13 +342,25 @@ class NewMerge extends Component{
|
||||||
<Input placeholder="标题"/>
|
<Input placeholder="标题"/>
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<QuillForEditor
|
||||||
|
value = {desc}
|
||||||
|
wrapStyle={{
|
||||||
|
height: '220px',
|
||||||
|
opacity:1,
|
||||||
|
}}
|
||||||
|
// autoFocus={true}
|
||||||
|
style={{ height: '170px' }}
|
||||||
|
placeholder="合并请求的描述..."
|
||||||
|
options={options}
|
||||||
|
onContentChange={this.onContentChange}
|
||||||
|
/>
|
||||||
|
{/* <Form.Item>
|
||||||
{getFieldDecorator('body', {
|
{getFieldDecorator('body', {
|
||||||
rules: [],
|
rules: [],
|
||||||
})(
|
})(
|
||||||
<TextArea placeholder="合并请求的描述。。。" style={{height:"300px"}}/>
|
<TextArea placeholder="合并请求的描述。。。" style={{height:"300px"}}/>
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item> */}
|
||||||
<UploadComponent load={this.UploadFunc} isComplete={true} ></UploadComponent>
|
<UploadComponent load={this.UploadFunc} isComplete={true} ></UploadComponent>
|
||||||
<p className="clearfix mt15">
|
<p className="clearfix mt15">
|
||||||
<a className="topWrapper_btn fr" type="submit" onClick={this.submit}>创建合并请求</a>
|
<a className="topWrapper_btn fr" type="submit" onClick={this.submit}>创建合并请求</a>
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
border-radius:4px;
|
border-radius:4px;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
.new_context{
|
||||||
|
flex:1;
|
||||||
|
}
|
||||||
.topmerge_btn{
|
.topmerge_btn{
|
||||||
background: #21ba45;
|
background: #21ba45;
|
||||||
color: #FFFFFF!important;
|
color: #FFFFFF!important;
|
||||||
|
|
|
@ -22,13 +22,13 @@ class UserSubmitComponent extends Component{
|
||||||
|
|
||||||
// 提交变更
|
// 提交变更
|
||||||
subMitFrom=()=>{
|
subMitFrom=()=>{
|
||||||
const { current_user , filepath , content } = this.props;
|
const { filepath , content } = this.props;
|
||||||
const { branch , projectsId } = this.props.match.params;
|
const { branch , projectsId } = this.props.match.params;
|
||||||
const { submitType } = this.state;
|
const { submitType } = this.state;
|
||||||
let path = filepath.substr(1);
|
let path = filepath.substr(1);
|
||||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||||
if(!err){
|
if(!err){
|
||||||
const url = `/${current_user && current_user.login}/${projectsId}/contents.json`;
|
const url = `/repositories/${projectsId}/create_file.json`;
|
||||||
axios.post(url,{
|
axios.post(url,{
|
||||||
filepath:path,
|
filepath:path,
|
||||||
branch:branch,
|
branch:branch,
|
||||||
|
|
|
@ -6,7 +6,6 @@ import { getImageUrl } from 'educoder';
|
||||||
import Nav from './Nav';
|
import Nav from './Nav';
|
||||||
import UploadComponent from '../Upload/Index';
|
import UploadComponent from '../Upload/Index';
|
||||||
import QuillForEditor from '../quillForEditor';
|
import QuillForEditor from '../quillForEditor';
|
||||||
import { QuillDeltaToHtmlConverter } from 'quill-delta-to-html'
|
|
||||||
|
|
||||||
import './order.css';
|
import './order.css';
|
||||||
|
|
||||||
|
@ -164,7 +163,7 @@ class New extends Component{
|
||||||
<QuillForEditor
|
<QuillForEditor
|
||||||
value = {description}
|
value = {description}
|
||||||
wrapStyle={{
|
wrapStyle={{
|
||||||
height: '220px',
|
height: '240px',
|
||||||
opacity:1,
|
opacity:1,
|
||||||
}}
|
}}
|
||||||
// autoFocus={true}
|
// autoFocus={true}
|
||||||
|
|
|
@ -9,10 +9,10 @@ const MENU_LIST = [{
|
||||||
name:'管理员'
|
name:'管理员'
|
||||||
},{
|
},{
|
||||||
id:"Developer",
|
id:"Developer",
|
||||||
name:'开发人员'
|
name:'可写权限'
|
||||||
},{
|
},{
|
||||||
id:"Reporter",
|
id:"Reporter",
|
||||||
name:'报告人员'
|
name:'可读权限'
|
||||||
}];
|
}];
|
||||||
const LIMIT = 15;
|
const LIMIT = 15;
|
||||||
class Collaborator extends Component{
|
class Collaborator extends Component{
|
||||||
|
@ -207,7 +207,7 @@ class Collaborator extends Component{
|
||||||
<span>{operation && operation[0].name}<Icon type="down" /></span>
|
<span>{operation && operation[0].name}<Icon type="down" /></span>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
}
|
}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<span style={{justifyContent:"center"}}>
|
<span style={{justifyContent:"center"}}>
|
||||||
{
|
{
|
||||||
|
@ -219,7 +219,7 @@ class Collaborator extends Component{
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
@ -245,4 +245,4 @@ class Collaborator extends Component{
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default Collaborator;
|
export default Collaborator;
|
||||||
|
|
|
@ -22,7 +22,6 @@ const Collaborator = Loadable({
|
||||||
class Index extends Component{
|
class Index extends Component{
|
||||||
render(){
|
render(){
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId } = this.props.match.params;
|
||||||
console.log(this.props);
|
|
||||||
const { pathname } = this.props.history.location;
|
const { pathname } = this.props.history.location;
|
||||||
|
|
||||||
const flag = (pathname === `/projects/${projectsId}/setting`);
|
const flag = (pathname === `/projects/${projectsId}/setting`);
|
||||||
|
@ -36,7 +35,7 @@ class Index extends Component{
|
||||||
<div className="main">
|
<div className="main">
|
||||||
<Switch {...this.props}>
|
<Switch {...this.props}>
|
||||||
{/* 协作者 */}
|
{/* 协作者 */}
|
||||||
<Route path="/projects/:projectsId/collaborator"
|
<Route path="/projects/:projectsId/setting/collaborator"
|
||||||
render={
|
render={
|
||||||
(props) => (<Collaborator {...this.props} {...props} {...this.state}/>)
|
(props) => (<Collaborator {...this.props} {...props} {...this.state}/>)
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ class Setting extends Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
getInfo=()=>{
|
getInfo=()=>{
|
||||||
const { current_user } = this.props;
|
|
||||||
const { projectsId } = this.props.match.params;
|
const { projectsId } = this.props.match.params;
|
||||||
const url = `/repositories/${projectsId}/edit.json`;
|
const url = `/repositories/${projectsId}/edit.json`;
|
||||||
axios.get(url).then(result=>{
|
axios.get(url).then(result=>{
|
||||||
|
|
|
@ -469,7 +469,7 @@ class LoginDialog extends Component {
|
||||||
autologin:isGoingValue
|
autologin:isGoingValue
|
||||||
}
|
}
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
debugger;
|
// debugger;
|
||||||
if(response===undefined){
|
if(response===undefined){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -782,4 +782,3 @@ class LoginDialog extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LoginDialog ;
|
export default LoginDialog ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue