Merge pull request 'issue' (#324) from caishi/forgeplus-react:gitlink_server into gitlink_server

This commit is contained in:
xxq250 2021-12-17 16:24:06 +08:00
commit 326aede507
18 changed files with 37 additions and 29 deletions

View File

@ -76,6 +76,7 @@ const tokenizer = {
if (cap) { if (cap) {
const raw = cap[0] const raw = cap[0]
let text = indentCodeCompensation(raw, cap[3] || '') let text = indentCodeCompensation(raw, cap[3] || '')
console.log(text);
const lang = cap[2] ? cap[2].trim() : cap[2] const lang = cap[2] ? cap[2].trim() : cap[2]
if (['latex', 'katex', 'math'].indexOf(lang) >= 0) { if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
const id = next_id() const id = next_id()

View File

@ -30,7 +30,7 @@ export default ({
cleanToc() cleanToc()
} }
rs = rs.replace(/(__special_katext_id_\d+__)/g, (_match, capture) => { rs = rs.replace(/(__special_katext_id_\d+__)/g, (_match, capture) => {
const { type, expression } = math_expressions[capture] const { type, expression } = math_expressions[capture];
return renderToString(_unescape(expression) || '', { displayMode: type === 'block', throwOnError: false, output: 'html' }) return renderToString(_unescape(expression) || '', { displayMode: type === 'block', throwOnError: false, output: 'html' })
}) })
rs = rs.replace(/▁/g, "▁▁▁") rs = rs.replace(/▁/g, "▁▁▁")

View File

@ -128,7 +128,7 @@ function AboutUs(){
<div className="feat_fun_img"><img src={fun2} /></div> <div className="feat_fun_img"><img src={fun2} /></div>
<div> <div>
<p>一站式过程管理</p> <p>一站式过程管理</p>
<div>支持里程碑&nbsp;&nbsp;&nbsp;<br />通知提醒标签归档Wiki文档组织管理&nbsp;&nbsp;&nbsp;</div> <div>支持里程碑&nbsp;&nbsp;&nbsp;<br />通知提醒标签归档Wiki文档组织管理&nbsp;&nbsp;&nbsp;</div>
</div> </div>
</div> </div>
</td> </td>

View File

@ -152,7 +152,7 @@ class Activity extends Component{
<p className="percent_red" style={{width:`${third_per}`}}></p> <p className="percent_red" style={{width:`${third_per}`}}></p>
<p className="percent_green" style={{width:`${fourth_per}`}}></p> <p className="percent_green" style={{width:`${fourth_per}`}}></p>
</div> </div>
<span>{data && data.issues_count}</span> <span>{data && data.issues_count}</span>
</div> </div>
</div> </div>
<ul className="percentBox"> <ul className="percentBox">
@ -166,11 +166,11 @@ class Activity extends Component{
</li> </li>
<li> <li>
<span className="red">{data && data.close_issues_count}</span> <span className="red">{data && data.close_issues_count}</span>
<span className={type==="Issue"&& status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","delay")}>已关闭的</span> <span className={type==="Issue"&& status==="delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","delay")}>已关闭的</span>
</li> </li>
<li> <li>
<span className="green">{data && data.open_issues_count}</span> <span className="green">{data && data.open_issues_count}</span>
<span className={type==="Issue"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","not_delay")}>未处理的</span> <span className={type==="Issue"&& status==="not_delay" ?`change active`:"change"} onClick={()=>this.changeTrends("Issue","not_delay")}>未处理的</span>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -455,10 +455,10 @@ function CoderDepot(props){
baseOperate && baseOperate &&
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/compare/master...${branchName || defaultBranch}`)} >+ 合并请求</CheckProfile> <CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/compare/master...${branchName || defaultBranch}`)} >+ 合并请求</CheckProfile>
} }
<a onClick={createIssue}>+ </a> <a onClick={createIssue}>+ </a>
{/* { {/* {
baseOper && baseOper &&
<CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/issues/new`)} >+ </CheckProfile> <CheckProfile {...props} sureFunc={()=>urlLink(`/${owner}/${projectsId}/issues/new`)} >+ </CheckProfile>
} */} } */}
</div> </div>
} }

View File

@ -59,9 +59,16 @@ function SubList() {
<Link target="_blank" to={`/${i.login}`}><img src={getImageUrl(`/${i.avatar_url}`)} alt=""/></Link> <Link target="_blank" to={`/${i.login}`}><img src={getImageUrl(`/${i.avatar_url}`)} alt=""/></Link>
<div> <div>
<Link target="_blank" to={`/${i.login}`} className="font-15">{i.name}</Link> <Link target="_blank" to={`/${i.login}`} className="font-15">{i.name}</Link>
<p className="task-hide" style={{maxWidth:"260px"}}> {
<Link target="_blank" to={`/${i.login}/${i.project && i.project.identifier}`}><i className="iconfont icon-daimakuicon1 font-14 mr8"></i>{i.project && i.project.name}</Link> i.project && i.project.name ?
</p> <p className="task-hide" style={{maxWidth:"260px"}}>
<Link target="_blank" to={`/${i.login}/${i.project && i.project.identifier}`}>
<i className="iconfont icon-daimakuicon1 font-14 mr8"></i>
{i.project && i.project.name}
</Link>
</p>
:""
}
</div> </div>
</div> </div>
</li> </li>

View File

@ -50,7 +50,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
<Link to={{ pathname: `/${owner}/${projectsId}/issues`, state }}> <Link to={{ pathname: `/${owner}/${projectsId}/issues`, state }}>
<Tooltip placement="bottom"> <Tooltip placement="bottom">
<i className={"iconfont icon-yixiuicon1 color-grey-3 mr5 font-14"}></i> <i className={"iconfont icon-yixiuicon1 color-grey-3 mr5 font-14"}></i>
<span>(Issue)</span> <span>(Issue)</span>
</Tooltip> </Tooltip>
{projectDetail && projectDetail.issues_count ? <span className="num">{numFormat(projectDetail.issues_count)}</span> : ""} {projectDetail && projectDetail.issues_count ? <span className="num">{numFormat(projectDetail.issues_count)}</span> : ""}
</Link> </Link>

View File

@ -246,9 +246,9 @@ class MilepostDetail extends Component {
} }
{ {
current_user && current_user.login ? current_user && current_user.login ?
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建</CheckProfile> <CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建</CheckProfile>
: :
<a className="topWrapper_btn" onClick={showLoginDialog}>创建</a> <a className="topWrapper_btn" onClick={showLoginDialog}>创建</a>
} }
</div> </div>
</FlexAJ> </FlexAJ>

View File

@ -102,7 +102,7 @@ class OrderItem extends Component {
<Popconfirm <Popconfirm
placement="bottom" placement="bottom"
overlayClassName={orderid === item.id && isdisplay ? "overlayBox" : "overlayBox hideOverlay" } overlayClassName={orderid === item.id && isdisplay ? "overlayBox" : "overlayBox hideOverlay" }
title={'您确定要删除当前修吗?'} title={'您确定要删除当前修吗?'}
okText="是" okText="是"
cancelText="否" cancelText="否"
onConfirm={() => this.deletedetail(item.id)} onConfirm={() => this.deletedetail(item.id)}

View File

@ -357,9 +357,9 @@ class order extends Component {
renderNew =()=>{ renderNew =()=>{
return( return(
// <CheckProfile {...this.props} className="topWrapper_btn ml10" sureoncFunc={()=>{createIssue()}}> // <CheckProfile {...this.props} className="topWrapper_btn ml10" sureoncFunc={()=>{createIssue()}}>
// +&nbsp;创建 // +&nbsp;创建
// </CheckProfile> // </CheckProfile>
<a className="topWrapper_btn ml10" onClick={this.createIssue}>+&nbsp;创建</a> <a className="topWrapper_btn ml10" onClick={this.createIssue}>+&nbsp;创建</a>
) )
} }
@ -557,7 +557,7 @@ class order extends Component {
<div className="topWrapper" style={{borderBottom:"none"}}> <div className="topWrapper" style={{borderBottom:"none"}}>
<div className="target-detail-search"> <div className="target-detail-search">
<Search <Search
placeholder="输入关键字搜索修" placeholder="输入关键字搜索修"
enterButton enterButton
onSearch={this.searchFunc} onSearch={this.searchFunc}
style={{ width: 300 }} style={{ width: 300 }}

View File

@ -362,14 +362,14 @@ class order_form extends Component {
<div className="list-right"> <div className="list-right">
<div className="pd20"> <div className="pd20">
<h3 className="mb15"> <h3 className="mb15">
{form_type === "edit" ? "编辑" :( form_type === "copy" ? "复制" : "新建")} {form_type === "edit" ? "编辑" :( form_type === "copy" ? "复制" : "新建")}
</h3> </h3>
<Form.Item> <Form.Item>
{getFieldDecorator("subject", { {getFieldDecorator("subject", {
rules: [ rules: [
{ {
required: true, required: true,
message: "请填写修标题", message: "请填写修标题",
}, },
] ]
})(<Input placeholder="标题" size="large" maxLength={200}/>)} })(<Input placeholder="标题" size="large" maxLength={200}/>)}

View File

@ -12,7 +12,7 @@ const { Option } = Select;
const menu = [ const menu = [
{name:"主页",index:"home"}, {name:"主页",index:"home"},
{name:"代码库",index:"code"}, {name:"代码库",index:"code"},
{name:"修 (Issue)",index:"issues"}, {name:"修 (Issue)",index:"issues"},
{name:"合并请求 (PR)",index:"pulls"}, {name:"合并请求 (PR)",index:"pulls"},
{name:"引擎 (Engine)",index:"devops"}, {name:"引擎 (Engine)",index:"devops"},
// {name:"资源库",index:"resources"}, // {name:"资源库",index:"resources"},
@ -180,7 +180,7 @@ class Setting extends Component {
const { projectsId , owner } = this.props.match.params; const { projectsId , owner } = this.props.match.params;
const { projectName } = this.state; const { projectName } = this.state;
this.props.confirm({ this.props.confirm({
content: <span style={{display:"block",textAlign:"left"}}>该操作无法撤销且将会一并删除相关的合并请求工作流里程碑动态等数据<br/>是否确认删除 <span style={{fontWeight:"bold"}}>{owner}/{projectName}({projectsId})</span></span>, content: <span style={{display:"block",textAlign:"left"}}>该操作无法撤销且将会一并删除相关的合并请求工作流里程碑动态等数据<br/>是否确认删除 <span style={{fontWeight:"bold"}}>{owner}/{projectName}({projectsId})</span></span>,
onOk: () => { onOk: () => {
const url = `/${owner}/${projectsId}.json`; const url = `/${owner}/${projectsId}.json`;
axios.delete(url).then((result) => { axios.delete(url).then((result) => {

View File

@ -253,7 +253,7 @@ class claims extends React.Component {
{ {
claimerdata&&claimerdata.length>0?( claimerdata&&claimerdata.length>0?(
<div> <div>
<span>声明要关注/解决此修的用户</span><span className="infoCount">{claimerdata.length}</span> <span>声明要关注/解决此修的用户</span><span className="infoCount">{claimerdata.length}</span>
<div className="attrPerson" onMouseLeave={()=>this.setVisibleFunc(false)}> <div className="attrPerson" onMouseLeave={()=>this.setVisibleFunc(false)}>
{claimerdata.map((item,key)=>{ {claimerdata.map((item,key)=>{
return( return(
@ -266,7 +266,7 @@ class claims extends React.Component {
})} })}
</div> </div>
</div>):( </div>):(
<div><span>声明要关注/解决此修的用户</span> <span className="infoCount">0</span></div> <div><span>声明要关注/解决此修的用户</span> <span className="infoCount">0</span></div>
)} )}
</div> </div>

View File

@ -21,7 +21,7 @@ function Line({data}) {
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: ['提交数', '修数', '合并请求数'], data: ['提交数', '修数', '合并请求数'],
right: 'center', right: 'center',
bottom: '4%', bottom: '4%',
}, },
@ -62,7 +62,7 @@ function Line({data}) {
data: d.commits_count data: d.commits_count
}, },
{ {
name: '修数', name: '修数',
type: 'line', type: 'line',
data: d.issues_count data: d.issues_count
}, },

View File

@ -44,7 +44,7 @@ function Team(props){
<Menu onClick={(e)=>setSort_by(e.key)}> <Menu onClick={(e)=>setSort_by(e.key)}>
<Menu.Item value="created_at" key="created_at">创建时间排序</Menu.Item> <Menu.Item value="created_at" key="created_at">创建时间排序</Menu.Item>
<Menu.Item value="num_projects" key="num_projects">项目数排序</Menu.Item> <Menu.Item value="num_projects" key="num_projects">项目数排序</Menu.Item>
<Menu.Item value="num_users" key="num_users">用户数排序</Menu.Item> <Menu.Item value="num_users" key="num_users">组织成员数排序</Menu.Item>
</Menu> </Menu>
) )

View File

@ -145,7 +145,7 @@ function SecondEdition({setValue}) {
</div> </div>
<div className="osRightMain"> <div className="osRightMain">
<p className="osRightTitle">一站式过程管理</p> <p className="osRightTitle">一站式过程管理</p>
<p>提供<span>Issue里程碑通知提醒标签归档</span>等多样化任务管理工具支持各类开发任务的发布指派与跟踪</p> <p>提供<span>Issue里程碑通知提醒标签归档</span>等多样化任务管理工具支持各类开发任务的发布指派与跟踪</p>
<p>同时提供<span>在线Wiki文档组织多粒度管理</span>等功能为您搭建一站式的项目过程管理环境</p> <p>同时提供<span>在线Wiki文档组织多粒度管理</span>等功能为您搭建一站式的项目过程管理环境</p>
<p><span>让您的团队协作更高效过程更透明</span></p> <p><span>让您的团队协作更高效过程更透明</span></p>
</div> </div>

View File

@ -217,7 +217,7 @@ const GlobalSearch = ({ location, showNotification, history }) => {
} }
</TabPane> */} </TabPane> */}
<TabPane tab={`修(${totalType5}`} key="5"> <TabPane tab={`修(${totalType5}`} key="5">
<div className="search-content"> <div className="search-content">
<p>{`找到${totalType5}条结果`}</p> <p>{`找到${totalType5}条结果`}</p>
<ItemList <ItemList

View File

@ -1062,7 +1062,7 @@ class TPMBanner extends Component {
</div> : </div> :
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16 mt10 mb10"> <p className="task-popup-text-center font-16 mt10 mb10">
尚未创建修的实训不能申请发布 尚未创建修的实训不能申请发布
</p> </p>
</div> </div>
} }