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

This commit is contained in:
xxq250 2021-12-02 14:16:09 +08:00
commit 9e4ca503df
4 changed files with 25 additions and 11 deletions

7
package-lock.json generated
View File

@ -9603,6 +9603,7 @@
"set-blocking": "^2.0.0", "set-blocking": "^2.0.0",
"string-width": "^1.0.2", "string-width": "^1.0.2",
"which-module": "^1.0.0", "which-module": "^1.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^5.0.0" "yargs-parser": "^5.0.0"
} }
} }
@ -9828,6 +9829,7 @@
"set-blocking": "^2.0.0", "set-blocking": "^2.0.0",
"string-width": "^1.0.2", "string-width": "^1.0.2",
"which-module": "^1.0.0", "which-module": "^1.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^5.0.0" "yargs-parser": "^5.0.0"
} }
} }
@ -20037,6 +20039,11 @@
"resolved": "https://registry.npm.taobao.org/xterm-addon-fit/download/xterm-addon-fit-0.4.0.tgz", "resolved": "https://registry.npm.taobao.org/xterm-addon-fit/download/xterm-addon-fit-0.4.0.tgz",
"integrity": "sha1-BuDF0KaqrPsAnvVl76HIHpPZAZM=" "integrity": "sha1-BuDF0KaqrPsAnvVl76HIHpPZAZM="
}, },
"y18n": {
"version": "3.2.2",
"resolved": "https://registry.nlark.com/y18n/download/y18n-3.2.2.tgz",
"integrity": "sha1-hckBvWRwznH8S7cjrSCbcPfyhpY="
},
"yallist": { "yallist": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",

View File

@ -14,20 +14,20 @@ class ActivityItem extends Component {
{/* 如果是版本发布 */} {/* 如果是版本发布 */}
{item.trend_type === "VersionRelease" ? {item.trend_type === "VersionRelease" ?
<p className="itemLine"> <p className="itemLine">
<Link to={`/${owner}/${projectsId}/releases`} className="color-blue font-16">{item.name}</Link> <Link to={`/${owner}/${projectsId}/releases`} className="font-16">{item.name}</Link>
<span className="activity_type">{item.trend_type}</span> <span className="activity_type">{item.trend_type}</span>
</p > </p >
: :
// 如果是任务 // 如果是任务
item.trend_type === "Issue" ? item.trend_type === "Issue" ?
<p className="itemLine"> <p className="itemLine">
<Link to={`/${owner}/${projectsId}/issues/${item.trend_id}`} className="color-blue font-16">{item.name}</Link> <Link to={`/${owner}/${projectsId}/issues/${item.trend_id}`} className="font-16">{item.name}</Link>
<span className="activity_type">{item.trend_type}</span> <span className="activity_type">{item.trend_type}</span>
</p > </p >
: :
// 如果是合并请求 // 如果是合并请求
<p className="itemLine"> <p className="itemLine">
<Link to={`/${owner}/${projectsId}/pulls/${item.trend_id}`} className="color-blue font-16">{item.name}</Link> <Link to={`/${owner}/${projectsId}/pulls/${item.trend_id}`} className="font-16">{item.name}</Link>
<span className="activity_type">{item.trend_type}</span> <span className="activity_type">{item.trend_type}</span>
</p > </p >
} }

View File

@ -197,14 +197,21 @@ class NewHeader extends Component {
matchpaths = (url) => { matchpaths = (url) => {
const { match } = this.props; const { match } = this.props;
if(url){ const isDev = window.location.port == 3007;
if (match.path.indexOf(url) > -1) { const isdev2= isDev ?'https://testforgeplus.trustie.net':`https://${window.location.hostname}`;
let str = "";
if(url.indexOf("http")>-1){
str = isdev2+match.path;
}else{
str = match.path;
}
if (url && str === url) {
return true return true
}else { }else {
return false return false
} }
} }
}
checkProfile=(url)=>{ checkProfile=(url)=>{
const { showCompeleteDialog , completeProfile } = this.props; const { showCompeleteDialog , completeProfile } = this.props;
@ -409,7 +416,7 @@ class NewHeader extends Component {
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) ); var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
var wl = waiLian && waiLian.length>0; var wl = waiLian && waiLian.length>0;
return ( return (
<li key={key} onClick={() => this.headtypesonClick(item.link, true)} className={`${this.matchpaths(item.link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}> <li key={key} onClick={() => this.headtypesonClick(item.link, true)} className={`${this.matchpaths(new_link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}>
<a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a> <a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a>
</li> </li>
) )

View File

@ -130,7 +130,7 @@ class order_form extends Component {
let data ={ let data ={
//指定指派成员类型缺陷优先度正常issue状态新增 //指定指派成员类型缺陷优先度正常issue状态新增
tracker_id: "1", tracker_id: "1",
assigned_to_id: window.location.host === "gitlink.org.cn" ? "86107":"36480", assigned_to_id: window.location.host === "www.gitlink.org.cn" ? "86107":"36480",
priority_id: "2", priority_id: "2",
status_id: "1", status_id: "1",
description:"####问题描述\n\n\n####重现问题步骤\n\n\n####截图\n\n\n####建议解决办法\n", description:"####问题描述\n\n\n####重现问题步骤\n\n\n####截图\n\n\n####建议解决办法\n",