点击提示及样式修改

This commit is contained in:
dinglink 2020-03-30 18:51:30 +08:00
commit c76723ece0
11 changed files with 436 additions and 111 deletions

View File

@ -3,7 +3,9 @@
<component name="ChangeListManager">
<list default="true" id="9830c5da-176a-4c72-a301-9f6ce98c82fe" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Settings/Collaborator.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Settings/Collaborator.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Activity/Activity.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Activity/Activity.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Merge/merge.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Merge/merge.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Order/Milepost.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Order/Milepost.js" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -14,19 +16,10 @@
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.gitignore">
<entry file="file://$PROJECT_DIR$/src/forge/Merge/merge.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1275">
<caret line="75" column="14" selection-start-line="75" selection-start-column="14" selection-end-line="75" selection-end-column="14" />
</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="1360">
<caret line="80" column="27" selection-start-line="80" selection-start-column="27" selection-end-line="80" selection-end-column="27" />
<state relative-caret-position="333">
<caret line="264" column="19" selection-start-line="264" selection-start-column="19" selection-end-line="264" selection-end-column="19" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
@ -35,45 +28,22 @@
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/forge/Newfile/Index.js">
<entry file="file://$PROJECT_DIR$/src/forge/Order/Milepost.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="884">
<caret line="52" column="31" selection-start-line="52" selection-start-column="31" selection-end-line="52" selection-end-column="31" />
<state relative-caret-position="131">
<caret line="171" column="10" selection-start-line="171" selection-start-column="10" selection-end-line="171" selection-end-column="10" />
<folding>
<element signature="e#0#42#0" expanded="true" />
<element signature="e#0#40#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Collaborator.js">
<entry file="file://$PROJECT_DIR$/src/forge/Activity/Activity.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455">
<caret line="144" column="11" lean-forward="true" selection-start-line="144" selection-start-column="11" selection-end-line="144" selection-end-column="11" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/forge/Newfile/UserSubmitComponent.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272">
<caret line="16" column="25" selection-start-line="16" selection-start-column="25" selection-end-line="16" selection-end-column="25" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Index.js">
<provider selected="true" editor-type-id="text-editor">
<state>
<state relative-caret-position="303">
<caret line="163" column="16" selection-start-line="163" selection-start-column="16" selection-end-line="163" selection-end-column="16" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
@ -107,6 +77,9 @@
<find>.idea</find>
<find>deleteUser</find>
<find>axios.delete</find>
<find>style=</find>
<find>width75f</find>
<find>max-width</find>
</findStrings>
<dirStrings>
<dir>$PROJECT_DIR$/src/forge</dir>
@ -126,8 +99,6 @@
<option value="$PROJECT_DIR$/src/forge/Index.js" />
<option value="$PROJECT_DIR$/src/forge/Main/CoderRootFileDetail.js" />
<option value="$PROJECT_DIR$/src/forge/Order/Tags.js" />
<option value="$PROJECT_DIR$/src/forge/Order/Milepost.js" />
<option value="$PROJECT_DIR$/src/forge/Merge/merge.js" />
<option value="$PROJECT_DIR$/src/modules/tpm/NewHeader.js" />
<option value="$PROJECT_DIR$/src/forge/Order/New.js" />
<option value="$PROJECT_DIR$/src/forge/Order/Detail.js" />
@ -142,12 +113,16 @@
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/src/forge/Newfile/UserSubmitComponent.js" />
<option value="$PROJECT_DIR$/src/forge/Settings/Collaborator.js" />
<option value="$PROJECT_DIR$/src/forge/Order/Milepost.js" />
<option value="$PROJECT_DIR$/src/forge/Merge/merge.js" />
<option value="$PROJECT_DIR$/src/forge/Activity/Activity.js" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" fullScreen="true">
<option name="y" value="23" />
<option name="width" value="1440" />
<option name="height" value="900" />
<option name="height" value="877" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
@ -177,7 +152,7 @@
<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" />
<item name="Activity" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
@ -231,18 +206,18 @@
<workItem from="1585210651078" duration="1600000" />
<workItem from="1585217705353" duration="104000" />
<workItem from="1585217834609" duration="4000" />
<workItem from="1585217980103" duration="418000" />
<workItem from="1585217980103" duration="1984000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="32053000" />
<option name="totallyTimeSpent" value="33619000" />
</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.26752505" />
<window_info content_ui="combo" id="Project" order="0" weight="0.26752505" />
<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" />
@ -255,7 +230,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.24096386" />
<window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.23493975" />
<window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.53975904" />
<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" />
@ -351,18 +326,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Merge/merge.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="276" column="20" selection-start-line="276" selection-start-column="20" selection-end-line="276" selection-end-column="20" />
<folding>
<element signature="e#0#42#0" expanded="true" />
<element signature="e#6583#7400#0" />
<element signature="e#7409#9273#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
@ -381,18 +344,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Order/Milepost.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172">
<caret line="280" column="38" selection-start-line="280" selection-start-column="38" selection-end-line="280" selection-end-column="38" />
<folding>
<element signature="e#0#40#0" expanded="true" />
<element signature="e#4332#4367#0" />
<element signature="e#4350#5226#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/quillForEditor/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
@ -587,13 +538,6 @@
<state relative-caret-position="-9766" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1275">
<caret line="75" column="14" selection-start-line="75" selection-start-column="14" selection-end-line="75" selection-end-column="14" />
</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="1360">
@ -624,6 +568,23 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Collaborator.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="237">
<caret line="137" column="24" lean-forward="true" selection-start-line="137" selection-start-column="24" selection-end-line="137" selection-end-column="24" />
<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="444">
<caret line="75" column="14" selection-start-line="75" selection-start-column="14" selection-end-line="75" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Index.js">
<provider selected="true" editor-type-id="text-editor">
<state>
@ -633,10 +594,30 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Collaborator.js">
<entry file="file://$PROJECT_DIR$/src/forge/Merge/merge.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455">
<caret line="144" column="11" lean-forward="true" selection-start-line="144" selection-start-column="11" selection-end-line="144" selection-end-column="11" />
<state relative-caret-position="333">
<caret line="264" column="19" selection-start-line="264" selection-start-column="19" selection-end-line="264" selection-end-column="19" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Order/Milepost.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="131">
<caret line="171" column="10" selection-start-line="171" selection-start-column="10" selection-end-line="171" selection-end-column="10" />
<folding>
<element signature="e#0#40#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Activity/Activity.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="303">
<caret line="163" column="16" selection-start-line="163" selection-start-column="16" selection-end-line="163" selection-end-column="16" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>

View File

@ -157,7 +157,7 @@ class Activity extends Component{
<div className="branchDropdown f-wrap-alignCenter">
<span className="color-grey-9 mr3">周期:</span>
<Dropdown overlay={menu} trigger={['click']} placement="bottomLeft">
<a className="ant-dropdown-link">
<a className="ant-dropdown-link" style={{'max-width': 75}}>
{name && name.length>0 && name[0].name} <Icon type="down" />
</a>
</Dropdown>

View File

@ -47,6 +47,7 @@ class CoderRootDirectory extends Component{
}
componentDidMount=()=>{
let { search } = this.props.history.location;
let branchName = undefined;
if(search && search.indexOf("branch")>-1){
@ -62,7 +63,6 @@ class CoderRootDirectory extends Component{
// 获取根目录
getProjectRoot=(branch)=>{
const { projectsId } = this.props.match.params;
console.log(this.props);
const url = `/repositories/${projectsId}/entries.json`;
axios.get((url),{
params:{
@ -88,6 +88,7 @@ class CoderRootDirectory extends Component{
ChangeFile=(arr,index)=>{
this.renderUrl(arr.name,arr.path,arr.type);
//点击直接跳转页面 加载一次路由
this.getFileDetail(arr);
this.setState({
subFileType:arr.type
@ -124,8 +125,6 @@ class CoderRootDirectory extends Component{
getFileDetail=(arr)=>{
const { projectsId } = this.props.match.params;
const { branch } = this.state;
const url =`/repositories/${projectsId}/sub_entries.json`;
axios.get(url,{
@ -141,6 +140,10 @@ class CoderRootDirectory extends Component{
rootList:undefined
})
}else{
if(arr.type===""){
this.props.showNotification('该文件夹下已无文件')
return
}
this.setState({
fileDetail:undefined
})

View File

@ -0,0 +1,333 @@
import React , { Component } from 'react';
import {Menu, Spin} from 'antd';
import { getImageUrl , markdownToHTML } from 'educoder';
import { Router , Route , Link } from 'react-router-dom';
import Top from './DetailTop';
import './list.css';
import SelectBranch from '../Branch/SelectBranch';
import CloneAddress from '../Branch/CloneAddress';
import RootTable from './RootTable';
import CoderRootFileDetail from './CoderRootFileDetail';
import NullData from './NullData';
import axios from 'axios';
/**
* address:http和SSHhttp_url(对应git地址)
* branch:当前分支
* filePath:点击目录时当前目录的路径
* subfileType:保存当前点击目录的文件类型显示目录列表时才显示新建文件如果点击的是文件就不显示新建文件按钮
* readMeContent:根目录下面的readme文件内容
*/
class CoderRootDirectorytext extends Component{
constructor(props){
super(props);
this.state={
address:"http",
branch:"master",
filePath:[],
http_url:undefined,
subFileType:"",
readMeContent:undefined,
isSpin:true,
branchList:undefined,
fileDetail:undefined,
branchLastCommit:undefined,
rootData:undefined
}
}
changeAddress=(address)=>{
this.setState({
address
})
}
componentDidMount=()=>{
let { search } = this.props.history.location;
let branchName = undefined;
if(search && search.indexOf("branch")>-1){
branchName = search.split("=")[1];
this.setState({
branch:branchName
})
}
const { branch } = this.state;
this.getProjectRoot(branchName || branch);
}
// 获取根目录
getProjectRoot=(branch)=>{
const { projectsId } = this.props.match.params;
const url = `/repositories/${projectsId}/entries.json`;
axios.get((url),{
params:{
branch
}
}).then((result)=>{
if(result){
if(result && result.data && result.data.length > 0){
this.setState({
filePath:[],
fileDetail:undefined,
isSpin: false
})
this.renderData(result.data);
}
this.setState({
rootData:result.data
})
}
}).catch((error)=>{})
}
ChangeFile=(arr,index)=>{
this.renderUrl(arr.name,arr.path,arr.type);
//点击直接跳转页面 加载一次路由
this.getFileDetail(arr);
this.setState({
subFileType:arr.type
})
}
renderUrl=(name,path,type)=>{
let list =[];
const { filePath } = this.state;
if(path.indexOf("/")){
const array = path.split("/");
let str = "";
array.map((i,k)=>{
str += '/'+i;
return list.push({
index:k,
name:i,
path:str.substr(1),
type:(filePath && filePath.length>0) ? (filePath[k] ? filePath[k].type : type) : type
})
})
}else{
list.push({
index:0,
name,path,type
})
}
this.setState({
filePath:list
})
}
// 获取子目录
getFileDetail=(arr)=>{
const { projectsId } = this.props.match.params;
const { branch } = this.state;
const url =`/repositories/${projectsId}/sub_entries.json`;
axios.get(url,{
params:{
filepath:arr.path,
ref:branch
}
}).then((result)=>{
if(result && result.data && result.data.length > 0){
if(arr.type==="file"){
this.setState({
fileDetail:result.data[0],
rootList:undefined
})
}else{
if(arr.type===""){
this.props.showNotification('该文件夹下已无文件')
return
}
this.setState({
fileDetail:undefined
})
this.renderData(result.data)
}
}
}).catch((error)=>{
console.log(error);
})
}
renderData=(data)=>{
const rootList = [];
const readMeContent = [];
data && data.map((item,key)=>{
rootList.push({
key,
...item
})
if(item.name === 'README.md'){
readMeContent.push({...item})
}
})
this.setState({
rootList:rootList,
readMeContent
})
}
// readme文件内容
renderReadMeContent=(readMeContent)=>{
const { fileDetail } = this.state;
if(fileDetail){return;}
if(readMeContent && readMeContent.length > 0){
return(
<div className="commonBox">
<div className="commonBox-title">{readMeContent[0].name}</div>
<div className="commonBox-info">
{
readMeContent[0].content ?
<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(readMeContent[0].content).replace(/▁/g, "▁▁▁")}}></div>
:
<span>暂无~</span>
}
</div>
</div>
)
}
}
// 选择分支
changeBranch=(value)=>{
const { branchList } = this.props;
let branchLastCommit = branchList && branchList.length >0 && branchList.filter(item=>item.name === value)[0];
this.setState({
branch:branchLastCommit && branchLastCommit.name,
branchLastCommit,
http_url:branchLastCommit && branchLastCommit.http_url,
isSpin: true
})
this.getProjectRoot(branchLastCommit.name);
}
render(){
const { rootList , branch ,filePath , fileDetail , subFileType , readMeContent, isSpin , rootData } = this.state;
const { branchLastCommit , http_url , isManager , isDeveloper } = this.props;
const { projectsId } = this.props.match.params;
const columns = [
{
dataIndex: 'name',
width:"100%",
render: (text,item) => (
<a onClick={()=>this.ChangeFile(item)}>
<i className={ item.type === "file" ? "iconfont icon-zuoye font-15 color-blue mr5":"iconfont icon-wenjian font-15 color-blue mr5"}></i>{text}
</a>
),
}
];
const title = () =>{
if(branchLastCommit && branchLastCommit.last_commit){
return(
<div className="f-wrap-alignCenter">
{
branchLastCommit.author ?
<React.Fragment>
<img src={getImageUrl(`images/${branchLastCommit.author.image_url}`)} className="radius mr10" width="32" height="32" alt=""/>
<span className="mr15">{branchLastCommit.author.login}</span>
</React.Fragment>
:""
}
<Link to={``} className="commitKey">{branchLastCommit.last_commit.id}</Link>
<span className="color-blue flex-1 hide-1">{branchLastCommit.last_commit.message}</span>
<span>{branchLastCommit.last_commit.time_from_now}</span>
</div>
)
}else{
return undefined;
}
}
const downloadUrl = ()=>{
if(branchLastCommit && branchLastCommit.zip_url){
return(
<Menu>
<Menu.Item><a href={branchLastCommit.zip_url}>ZIP</a></Menu.Item>
<Menu.Item><a href={branchLastCommit.tar_url}>TAR.GZ</a></Menu.Item>
</Menu>
)
}
}
const urlRoot = filePath && filePath.length > 0 ? `/${filePath[filePath.length - 1].path}` : "";
return(
<React.Fragment>
{
rootData &&
<React.Fragment>
{
rootData.length > 0 ?
<div>
<Top { ...this.props } {...this.state} />
<div className="f-wrap-between mt20">
<div className="f-wrap-alignCenter">
<SelectBranch branch={branch} changeBranch={this.changeBranch} {...this.props} {...this.state}></SelectBranch>
{
filePath && filePath.length > 0 &&
<span className="ml20 font-16">
<a onClick={()=>this.getProjectRoot(branch)} className="color-blue">{projectsId}</a>
{
filePath.map((item,key)=>{
return(
<React.Fragment>
{
key === filePath.length-1 ?
<span className="color-grey-6 subFileName" key={key}>{item.name}</span>
:
<a onClick={()=>this.ChangeFile(item,key)} className="color-blue subFileName" key={key}>{item.name}</a>
}
</React.Fragment>
)
})
}
</span>
}
</div>
<div className="f-wrap-alignCenter">
{
subFileType !== "file" && (isManager || isDeveloper) &&
<p className="addFile mr30">
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
{/* <Link to={``}>上传文件</Link> */}
</p>
}
{
filePath && filePath.length === 0 && <CloneAddress http_url={http_url} downloadUrl={downloadUrl} showNotification={this.props.showNotification}></CloneAddress>
}
</div>
</div>
<Spin spinning={isSpin}>
{/* 文件夹-子目录列表 */}
{
rootList && <RootTable columns = {columns} data={rootList} title={() => title()}></RootTable>
}
{
fileDetail &&
<CoderRootFileDetail detail = {fileDetail} {...this.props} {...this.state}></CoderRootFileDetail>
}
{/* readme.txt */}
{ this.renderReadMeContent(readMeContent) }
</Spin>
</div>
:
<NullData {...this.props} {...this.state} http_url={http_url} ></NullData>
}
</React.Fragment>
}
</React.Fragment>
)
}
}
export default CoderRootDirectorytext;

View File

@ -21,6 +21,7 @@ const CoderRootBranch = Loadable({
loader: () => import('./CoderRootBranch'),
loading: Loading,
})
class CoderRootIndex extends Component{
render(){

View File

@ -262,6 +262,9 @@ class Detail extends Component{
isSpin:false
})
}else{
this.setState({
isSpin:false
})
this.props.showNotification(result.data.message);
}
}).catch(error=>{

View File

@ -248,7 +248,8 @@ class MergeDetail extends Component{
<p className="mt15">{ data && data.issue.description}</p>
<p className="mt10 color-grey-c">
<div className={data&&data.issue_status==="关闭"?"closedetail":"opendetail"}>{data&&data.issue_status==="关闭"?"关闭中!":"开启中!"} </div>
{ data && data.issue.author_name} { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""}
请求从{data && data.pull_request.head}分支合并到{data && pull_request.base}分支
{/* 由 { data && data.issue.author_name} 于 { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""} */}
</p>
</div>

View File

@ -175,7 +175,9 @@ class MergeSubmit extends Component{
<p className="mt10 color-grey-c">
<span className={data&&data.issue.issue_status==="关闭"?"closedetail":data&&data.pull_request.status===0?"opendetail":"prdetail"}>{data&&data.issue.issue_status==="关闭"?"关闭中":data&&data.pull_request.status===0?"开启中":"已合并"} </span>
<span className="ml10 lineH32">
{ data && data.issue.author_name} { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""}
请求从{data && data.pull_request.head}分支合并到{data && data.pull_request.base}分支
{/* 由 { data && data.issue.author_name} 于 { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""} */}
</span>
<span className="pull-right lineH32">
<Link to={`/projects/${projectsId}/merge/${mergeId}/UpdateMerge`} className="color-blue fr">编辑</Link>

View File

@ -496,7 +496,9 @@ class MessageCount extends Component{
<p className="mt10 color-grey-c">
<span className={data&&data.issue.issue_status==="关闭"?"closedetail":data&&data.pull_request.status===0?"opendetail":"prdetail"}>{data&&data.issue.issue_status==="关闭"?"关闭中":data&&data.pull_request.status===0?"开启中":"已合并"} </span>
<span className="ml10 lineH32">
{ data && data.issue.author_name} { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""}
请求从{data && data.pull_request.head}分支合并到{data && data.pull_request.base}分支
{/* 由 { data && data.issue.author_name} 于 { data && data.issue.created_at }创建{ data && data.issue.journals_count && data.issue.journals_count > 0 ?` · ${data.issue.journals_count} 条评论`:""} */}
</span>
<span className="pull-right lineH32">
<Link to={`/projects/${projectsId}/merge/${mergeId}/UpdateMerge`} className="color-blue fr">编辑</Link>

View File

@ -254,13 +254,10 @@ class merge extends Component{
: ''
}
</div>
{
data && data.search_count && data.search_count > 0 ?
<div>
<div className="topWrapper" style={{borderBottom:"none"}}>
<p className="topWrapper_type">
<li className={openselect ? "active":""} onClick={()=>this.openorder(1)}>{data && data.open_count}个开启中</li>
<li className={closeselect ? "active":""} onClick={()=>this.openorder(2)}>{data && data.close_count}个已关闭</li>
<li className={openselect ? "active":""} onClick={()=>this.openorder(1)}>{data && data.open_count ? data.open_count : 0}个开启中</li>
<li className={closeselect ? "active":""} onClick={()=>this.openorder(2)}>{data && data.close_count ? data.close_count : 0}个已关闭</li>
{/* <span onClick={this.openorder} className={author_id ? "active":""}>{data && data.open_count}</span>
<span onClick={this.closeorder} className={author_id ? "active":""}>{data && data.close_count}个已关闭</span> */}
</p>
@ -273,6 +270,9 @@ class merge extends Component{
/>
</div>
</div>
{
data && data.search_count && data.search_count > 0 ?
<div>
<Spin spinning={isSpin}>
<div className="f-wrap-between mb20">
<ul >

View File

@ -495,8 +495,7 @@ class Detail extends Component{
readOnly={true}
value={ data && data.description}
/> */}
{data&&data.description===""?<span className="color-grey-9 ml3 mr3">没有描述</span>:this.commentCtx(data && data.description)}
{data&&data.description===null||data&&data.description===""?<span className="color-grey-9 ml3 mr3">没有描述</span>:this.commentCtx(data && data.description)}
</div>
{
data && data.attachments && data.attachments.length > 0 ?