forked from Gitlink/forgeplus-react
修改ignore
This commit is contained in:
commit
e3bb09b530
|
@ -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
|
||||
|
||||
|
|
|
@ -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"?>
|
||||
<project version="4">
|
||||
<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="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -13,20 +15,8 @@
|
|||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-7">
|
||||
<caret line="19" selection-start-line="19" selection-end-line="19" />
|
||||
</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 relative-caret-position="170">
|
||||
<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>
|
||||
|
@ -109,20 +99,12 @@
|
|||
<path>
|
||||
<item name="forgeplus-react" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="forgeplus-react" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="public" 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" />
|
||||
</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>
|
||||
</expand>
|
||||
<select />
|
||||
|
@ -177,12 +159,13 @@
|
|||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="29598000" />
|
||||
<option name="totallyTimeSpent" value="28976000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<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="Favorites" order="2" side_tool="true" />
|
||||
<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="Database Changes" order="8" />
|
||||
<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="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" />
|
||||
|
@ -532,6 +515,16 @@
|
|||
</state>
|
||||
</provider>
|
||||
</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">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="326">
|
||||
|
@ -547,20 +540,10 @@
|
|||
<state relative-caret-position="-10408" />
|
||||
</provider>
|
||||
</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">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-7">
|
||||
<caret line="19" selection-start-line="19" selection-end-line="19" />
|
||||
<state relative-caret-position="170">
|
||||
<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>
|
||||
|
|
|
@ -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 || ''
|
||||
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
|
||||
}
|
||||
// 超管
|
||||
// debugType="admin";
|
||||
|
|
|
@ -294,9 +294,9 @@ class CoderRootDirectory extends Component{
|
|||
<div className="f-wrap-alignCenter">
|
||||
{
|
||||
subFileType !== "file" && (isManager || isDeveloper) &&
|
||||
<p className="addFile">
|
||||
<p className="addFile mr30">
|
||||
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
||||
<Link to={``}>上传文件</Link>
|
||||
{/* <Link to={``}>上传文件</Link> */}
|
||||
</p>
|
||||
}
|
||||
{
|
||||
|
|
|
@ -97,30 +97,35 @@ class CoderRootFileDetail extends Component{
|
|||
}
|
||||
|
||||
render(){
|
||||
const { detail } = this.props;
|
||||
const { detail , current_user , isManager , isReporter , isDeveloper } = this.props;
|
||||
const { readOnly ,value } = this.state;
|
||||
|
||||
const flag = current_user && current_user.login && (isManager || isReporter);
|
||||
return(
|
||||
<div>
|
||||
<div className="branchTable">
|
||||
<p className="branchTitle f-wrap-alignCenter f-wrap-between">
|
||||
<span>{bytesToSize(detail && detail.size)}</span>
|
||||
<span>
|
||||
{
|
||||
readOnly ?
|
||||
<a onClick={this.EditFile} className="ml20"><i className="iconfont icon-bianji font-15 color-grey-6"></i></a>
|
||||
:
|
||||
<React.Fragment>
|
||||
<button type="button" className="ant-btn ant-btn-sm mr10" onClick={this.CancelEdit}><span>取 消</span>
|
||||
</button>
|
||||
<button type="button" className="ant-btn ant-btn-primary ant-btn-sm" onClick={this.UpdateFile}><span>确 定</span>
|
||||
</button>
|
||||
</React.Fragment>
|
||||
}
|
||||
flag &&
|
||||
<span>
|
||||
{
|
||||
readOnly ?
|
||||
<a onClick={this.EditFile} className="ml20"><i className="iconfont icon-bianji font-15 color-grey-6"></i></a>
|
||||
:
|
||||
<React.Fragment>
|
||||
<button type="button" className="ant-btn ant-btn-sm mr10" onClick={this.CancelEdit}><span>取 消</span>
|
||||
</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}>
|
||||
<a><i className="iconfont icon-shanchu font-15 color-grey-6"></i></a>
|
||||
</Popconfirm>
|
||||
</span>
|
||||
<Popconfirm title="确认删除这个文件?" className="ml20" okText="确定" cancelText="取消" onConfirm={this.deleteFile}>
|
||||
<a><i className="iconfont icon-shanchu font-15 color-grey-6"></i></a>
|
||||
</Popconfirm>
|
||||
</span>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<div className="content-file">
|
||||
|
|
|
@ -442,10 +442,10 @@ body,#root{
|
|||
padding: 0px 10px;
|
||||
}
|
||||
.addFile a:first-child{
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.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);
|
||||
}
|
||||
.addFile a:active{
|
||||
|
|
|
@ -5,15 +5,20 @@ import axios from 'axios';
|
|||
import Nav from '../Order/Nav';
|
||||
import UploadComponent from '../Upload/Index';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import {Modal, Col, Form, Input, Tooltip, Popconfirm, Pagination , Spin,Dropdown,Icon,Menu} from 'antd'
|
||||
import NoneData from '../../modules/courses/coursesPublic/NoneData';
|
||||
import {Modal, Form, Input, Tooltip, Popconfirm, Pagination , Spin,Dropdown,Icon,Menu} from 'antd'
|
||||
import Attachments from '../Upload/attachment'
|
||||
import './merge.css';
|
||||
|
||||
import QuillForEditor from '../quillForEditor';
|
||||
|
||||
const TextArea = Input.TextArea;
|
||||
|
||||
|
||||
const options = [
|
||||
['bold', 'italic', 'underline'],
|
||||
[{header: [1,2,3,false]}],
|
||||
['blockquote', 'code-block'],
|
||||
['link', 'image'],
|
||||
['formula']
|
||||
];
|
||||
class MessageCount extends Component{
|
||||
constructor(props){
|
||||
super(props);
|
||||
|
@ -39,7 +44,9 @@ class MessageCount extends Component{
|
|||
mergename:'合并请求',
|
||||
mergekey:'merge',
|
||||
title:'',
|
||||
body:''
|
||||
body:'',
|
||||
commentsContent:undefined,
|
||||
quillFlag:false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,12 +88,19 @@ class MessageCount extends Component{
|
|||
|
||||
//添加评论
|
||||
addjournals=()=>{
|
||||
const { data, page, limit, fileList , commentsContent } = this.state;
|
||||
if(!commentsContent){
|
||||
this.setState({
|
||||
quillFlag:true
|
||||
})
|
||||
return;
|
||||
}
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const { data, page, limit, fileList } = this.state;
|
||||
const url = `/issues/${data.issue.id}/journals.json`;
|
||||
axios.post(url,{
|
||||
...values,
|
||||
content:JSON.stringify(commentsContent),
|
||||
issue_id:data.id,
|
||||
attachment_ids:fileList
|
||||
}).then(result=>{
|
||||
|
@ -96,7 +110,9 @@ class MessageCount extends Component{
|
|||
attachments_ids: undefined
|
||||
});
|
||||
this.setState({
|
||||
showFiles: false
|
||||
showFiles: false,
|
||||
quillFlag:false,
|
||||
commentsContent:undefined
|
||||
})
|
||||
this.getjournalslist(page, limit);
|
||||
this.props.showNotification("评论成功!");
|
||||
|
@ -160,7 +176,7 @@ class MessageCount extends Component{
|
|||
project_id:projectsId,
|
||||
id:data.pull_request.id,
|
||||
do:mergekey,
|
||||
body:body,
|
||||
body:JSON.stringify(body),
|
||||
title:title,
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
|
@ -173,14 +189,14 @@ class MessageCount extends Component{
|
|||
|
||||
//修改评论
|
||||
updatedetail=(id)=>{
|
||||
console.log("updtedetail", this.state)
|
||||
// console.log("updtedetail", this.state)
|
||||
const {page, limit,data } = this.state;
|
||||
const {orderId} = this.props.match.params;
|
||||
const url = `/issues/${data.issue.id}/journals/${id}.json`;
|
||||
axios.put(url,{
|
||||
issue_id:orderId,
|
||||
id:id,
|
||||
content:this.state.countvalue
|
||||
content:JSON.stringify(this.state.countvalue)
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
this.setState({
|
||||
|
@ -217,9 +233,9 @@ class MessageCount extends Component{
|
|||
})
|
||||
}
|
||||
|
||||
changmodelname=(e)=>{
|
||||
changmodelname=(value)=>{
|
||||
this.setState({
|
||||
countvalue:e.target.value
|
||||
countvalue:value
|
||||
})
|
||||
}
|
||||
changtitlepr=(e)=>{
|
||||
|
@ -228,9 +244,9 @@ class MessageCount extends Component{
|
|||
})
|
||||
}
|
||||
|
||||
changbodypr=(e)=>{
|
||||
changbodypr=(value)=>{
|
||||
this.setState({
|
||||
body:e.target.value
|
||||
body:value
|
||||
})
|
||||
}
|
||||
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(){
|
||||
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 { current_user } = this.props;
|
||||
const url = this.props.history.location.pathname;
|
||||
|
@ -370,7 +425,7 @@ class MessageCount extends Component{
|
|||
<div style={{display: (isedit && isedit === item.id) ? "none" : "block"}} >
|
||||
{
|
||||
item.content ?
|
||||
<div>{item.content}</div>
|
||||
this.commentCtx(item.content)
|
||||
:
|
||||
<div>
|
||||
{this.renderJournalList(item.journal_details)}
|
||||
|
@ -384,7 +439,20 @@ class MessageCount extends Component{
|
|||
}
|
||||
</div>
|
||||
<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">
|
||||
<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>
|
||||
|
@ -462,7 +530,7 @@ class MessageCount extends Component{
|
|||
|
||||
{ Paginations }
|
||||
<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" >
|
||||
<p>该合并请求可以进行自动合并操作</p>
|
||||
<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>
|
||||
|
||||
<div style={{display:this.state.ismesrge,marginTop:15}}>
|
||||
<Input placeholder="合并请求标题" value={this.state.title} onChange={this.changtitlepr}/>
|
||||
<TextArea placeholder="合并请求描述..." style={{height:"300px",marginTop:15}} value={this.state.body} onChange={this.changbodypr} />
|
||||
<Input placeholder="标题" value={this.state.title} onChange={this.changtitlepr}/>
|
||||
<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>
|
||||
<p className="clearfix mt15" style={{display:this.state.buttonshow}}>
|
||||
<a className="topWrapper_btn " type="submit" onClick={()=>this.prmerge()}>合并请求</a>
|
||||
|
@ -488,10 +570,9 @@ class MessageCount extends Component{
|
|||
</div>
|
||||
<div className="order_line" style={{marginLeft:80}}></div>
|
||||
<div className="df">
|
||||
<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">
|
||||
<Form.Item>
|
||||
{/* <Form.Item>
|
||||
{getFieldDecorator('content', {
|
||||
rules: [{
|
||||
required: true, message: '请输入内容'
|
||||
|
@ -499,7 +580,24 @@ class MessageCount extends Component{
|
|||
})(
|
||||
<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>
|
||||
<p className="clearfix mt15">
|
||||
<a className="topWrapper_btn fr" type="submit" onClick={this.addjournals}>评论</a>
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
import React , {Component} from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
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 moment from 'moment'
|
||||
import UploadComponent from '../Upload/Index';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import '../Order/order.css';
|
||||
import QuillForEditor from '../quillForEditor';
|
||||
|
||||
const { Group, Button } = Radio;
|
||||
|
||||
const { Button } = Radio;
|
||||
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{
|
||||
constructor(props){
|
||||
super(props);
|
||||
|
@ -21,6 +27,7 @@ class NewMerge extends Component{
|
|||
merge:undefined,
|
||||
pull:undefined,
|
||||
//判断 是否显示创建合并请求的页面
|
||||
desc:undefined,
|
||||
iscreatemerge:'none',
|
||||
issue_tag_ids:"",
|
||||
fixed_version_id:"",
|
||||
|
@ -147,9 +154,10 @@ class NewMerge extends Component{
|
|||
}else{
|
||||
values.issue_tag_ids = []
|
||||
}
|
||||
|
||||
const { desc } = this.state;
|
||||
axios.post(url,{
|
||||
...values,
|
||||
body:JSON.stringify(desc),
|
||||
project_id:projectsId,
|
||||
head:this.state.merge,
|
||||
base:this.state.pull,
|
||||
|
@ -220,12 +228,18 @@ class NewMerge extends Component{
|
|||
|
||||
}
|
||||
|
||||
onContentChange=(value)=>{
|
||||
this.setState({
|
||||
desc:value
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
render(){
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { projectsId } = this.props.match.params;
|
||||
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=[{
|
||||
|
@ -317,7 +331,7 @@ class NewMerge extends Component{
|
|||
<Form>
|
||||
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
|
||||
<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">
|
||||
<Form.Item>
|
||||
{getFieldDecorator('title', {
|
||||
|
@ -328,13 +342,25 @@ class NewMerge extends Component{
|
|||
<Input placeholder="标题"/>
|
||||
)}
|
||||
</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', {
|
||||
rules: [],
|
||||
})(
|
||||
<TextArea placeholder="合并请求的描述。。。" style={{height:"300px"}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form.Item> */}
|
||||
<UploadComponent load={this.UploadFunc} isComplete={true} ></UploadComponent>
|
||||
<p className="clearfix mt15">
|
||||
<a className="topWrapper_btn fr" type="submit" onClick={this.submit}>创建合并请求</a>
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
border-radius:4px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.new_context{
|
||||
flex:1;
|
||||
}
|
||||
.topmerge_btn{
|
||||
background: #21ba45;
|
||||
color: #FFFFFF!important;
|
||||
|
|
|
@ -22,13 +22,13 @@ class UserSubmitComponent extends Component{
|
|||
|
||||
// 提交变更
|
||||
subMitFrom=()=>{
|
||||
const { current_user , filepath , content } = this.props;
|
||||
const { filepath , content } = this.props;
|
||||
const { branch , projectsId } = this.props.match.params;
|
||||
const { submitType } = this.state;
|
||||
let path = filepath.substr(1);
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const url = `/${current_user && current_user.login}/${projectsId}/contents.json`;
|
||||
const url = `/repositories/${projectsId}/create_file.json`;
|
||||
axios.post(url,{
|
||||
filepath:path,
|
||||
branch:branch,
|
||||
|
|
|
@ -6,7 +6,6 @@ import { getImageUrl } from 'educoder';
|
|||
import Nav from './Nav';
|
||||
import UploadComponent from '../Upload/Index';
|
||||
import QuillForEditor from '../quillForEditor';
|
||||
import { QuillDeltaToHtmlConverter } from 'quill-delta-to-html'
|
||||
|
||||
import './order.css';
|
||||
|
||||
|
@ -164,7 +163,7 @@ class New extends Component{
|
|||
<QuillForEditor
|
||||
value = {description}
|
||||
wrapStyle={{
|
||||
height: '220px',
|
||||
height: '240px',
|
||||
opacity:1,
|
||||
}}
|
||||
// autoFocus={true}
|
||||
|
|
|
@ -9,10 +9,10 @@ const MENU_LIST = [{
|
|||
name:'管理员'
|
||||
},{
|
||||
id:"Developer",
|
||||
name:'开发人员'
|
||||
name:'可写权限'
|
||||
},{
|
||||
id:"Reporter",
|
||||
name:'报告人员'
|
||||
name:'可读权限'
|
||||
}];
|
||||
const LIMIT = 15;
|
||||
class Collaborator extends Component{
|
||||
|
@ -207,7 +207,7 @@ class Collaborator extends Component{
|
|||
<span>{operation && operation[0].name}<Icon type="down" /></span>
|
||||
</Dropdown>
|
||||
}
|
||||
|
||||
|
||||
</span>
|
||||
<span style={{justifyContent:"center"}}>
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ class Collaborator extends Component{
|
|||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</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{
|
||||
render(){
|
||||
const { projectsId } = this.props.match.params;
|
||||
console.log(this.props);
|
||||
const { pathname } = this.props.history.location;
|
||||
|
||||
const flag = (pathname === `/projects/${projectsId}/setting`);
|
||||
|
@ -36,7 +35,7 @@ class Index extends Component{
|
|||
<div className="main">
|
||||
<Switch {...this.props}>
|
||||
{/* 协作者 */}
|
||||
<Route path="/projects/:projectsId/collaborator"
|
||||
<Route path="/projects/:projectsId/setting/collaborator"
|
||||
render={
|
||||
(props) => (<Collaborator {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ class Setting extends Component{
|
|||
}
|
||||
|
||||
getInfo=()=>{
|
||||
const { current_user } = this.props;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/repositories/${projectsId}/edit.json`;
|
||||
axios.get(url).then(result=>{
|
||||
|
|
|
@ -469,7 +469,7 @@ class LoginDialog extends Component {
|
|||
autologin:isGoingValue
|
||||
}
|
||||
).then((response) => {
|
||||
debugger;
|
||||
// debugger;
|
||||
if(response===undefined){
|
||||
return
|
||||
}
|
||||
|
@ -782,4 +782,3 @@ class LoginDialog extends Component {
|
|||
}
|
||||
|
||||
export default LoginDialog ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue