Merge pull request 'FIx 合并测试分支功能代码' (#188) from pre_develop_dev into pre_develop

This commit is contained in:
jasder 2021-10-18 18:00:02 +08:00
commit e992849723
9 changed files with 193 additions and 13 deletions

View File

@ -0,0 +1,90 @@
.systemBox{
.ant-modal-body{
padding:1px 0px 0px 0px;
.sysBox{
background-image: url('./bg.png');
background-repeat: no-repeat;
background-size: 100% 334px;
margin-top: -55px;
}
.sysnoticeBox{
width: 100%;
padding:80px 0px 34px;
display: flex;
flex-direction: column;
width: 780px;
margin: 0px auto;
p.ntitle{
height: 33px;
font-size: 24px;
font-weight: 500;
color: #31FFF7;
line-height: 33px;
text-align: center;
}
p.nSubtitle{
height: 25px;
line-height: 25px;
font-size: 18px;
font-weight: 500;
color: #FFFFFF;
margin-top: 60px;
padding-left: 20px;
}
.markdown-body{
box-shadow: 0px 0px 17px rgba(0,0,0,0.2);
border-radius: 4px;
margin-top: 17px!important;
}
.nContent{
padding:20px 34px;
background-color: #fff;
line-height: 30px;
font-size: 15px;
font-weight: 400;
color: #333;
.realmName{
margin-top: 20px;
display: flex;
ul{
width: 50%;
padding-left: 0px!important;
li{
font-size: 15px;
font-weight: 500;
line-height: 32px;
text-align: left;
color: #000;
list-style-type: none!important;
&:first-child{
color: #E65714;
}
}
}
}
.nSubdesc{
font-size: 15px;
font-weight: 400;
color: #000000;
line-height: 31px;
margin-top: 20px;
}
.nInfo{
font-size: 14px;
font-weight: 400;
color: #333333;
text-align: right;
margin-top: 25px;
p{
height: 20px;
line-height: 20px;
}
}
}
.nBtn{
text-align: center;
margin-top: 33px;
}
}
}
}

View File

@ -0,0 +1,87 @@
import React , { useEffect , useState } from 'react';
import { Modal , Button } from 'antd';
import './Index.scss';
import '../../css/index.scss';
import RenderHtml from '../../../components/render-html';
import cookie from 'react-cookies';
function SystemNotice({system_notification,history}){
const [ visible , setVisible ] = useState(false);
useEffect(()=>{
if(system_notification && !cookie.load('notice_stage')){
setVisible(true);
}
},[system_notification])
function sureContinue() {
// if(login && ( system_notification && system_notification.id )){
// const url = `/users/${login}/system_notification_histories.json`;
// axios.post(url,{
// system_notification_id:system_notification.id
// }).then(result=>{
// if(result && result.status === 0){
// setVisible(false);
// hideSystemNotice();
// }
// }).catch(error=>{})
// }
console.log("cookies before:",cookie.load('notice_stage')) ;
cookie.remove('notice_stage');
let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//
// let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//
cookie.save('notice_stage', true,{ expires: inFifteenMinutes });
console.log("cookies after:",cookie.load('notice_stage')) ;
setVisible(false);
}
return (
<Modal
visible = {visible}
width="1000px"
footer={false}
title={false}
centered={true}
closable={false}
wrapClassName={'systemBox'}
>
<div className="sysBox">
<div className="sysnoticeBox">
<p className="ntitle">{system_notification && system_notification.subject}</p>
<p className="nSubtitle">{system_notification && system_notification.sub_subject}</p>
{/* <div className="nContent">
<div className="nMaindesc">
为了给用户提供更加稳定优质的服务我们即将对平台门户首页平台名称平台域名进行一次全面升级与变更原平台名称Trustie中文名确实将于2021年10月xx日统一更改为Gitlink中文名确实开源届时平台域名将统一进行更换更换规则如下
</div>
<div className="realmName">
<ul>
<li>原域名</li>
<li>官网顶级域名https://www.trustie.net</li>
<li>版本库子域名https://forgeplus.trustie.net</li>
<li>论坛子域名https://forum.trustie.net/forums</li>
</ul>
<ul>
<li>更换后域名</li>
<li>官网顶级域名https://www.gitlink.org.cn</li>
<li>版本库子域名https://www.git.gitlink.org.cn</li>
<li>论坛子域名https://forum.gitlink.org.cn</li>
</ul>
</div>
<div className="nSubdesc">
自2021年10月xx日起旧域名将停止访问因平台名称与域名变更给您带来的不便我们深表歉意!非常感谢您一直以来对本平台的信任与支持我们将一如既往地为您提供优质的服务 特此通知!
</div>
<div className="nInfo">
<p>Gitlink运营团队</p>
<p>2021年10月xx日</p>
</div>
</div> */}
<RenderHtml className="break_word_comments imageLayerParent" value={system_notification && system_notification.content} url={history.location}/>
<div className="nBtn">
<Button type="primary" className="btnblue" onClick={sureContinue}>确认并继续</Button>
</div>
</div>
</div>
</Modal>
)
}
export default SystemNotice;

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

View File

@ -64,7 +64,7 @@ class MergeItem extends Component {
<Link <Link
to={`/${owner}/${projectsId}/pulls/${item.pull_request_id}`} to={`/${owner}/${projectsId}/pulls/${item.pull_request_id}`}
className="hide-1 font-15 color-grey-3 fwb lineh-30 mr10" className="hide-1 font-15 color-grey-3 fwb lineh-30 mr10"
style={{ maxWidth: "300px" }} style={{ maxWidth: "600px" }}
> >
{item.name} {item.name}
</Link> </Link>

View File

@ -340,11 +340,11 @@ class MessageCount extends Component {
<div> <div>
<div className="main"> <div className="main">
<div> <div>
<div className="grid-item-top pb20 border-1f"> <div className="pb20 border-1f df">
<div> <div className="flex1">
<div className="ver-middle"> <div className="ver-middle">
<span className="mr10 ver-middle"> <span className="mr10 ver-middle">
<span className="font-18 fwb"> <span className="font-18 fwb" style={{wordBreak:"break-all"}}>
{data.issue.subject} {data.issue.subject}
</span> </span>
</span> </span>
@ -445,8 +445,7 @@ class MessageCount extends Component {
</span> </span>
</div> </div>
</div> </div>
<div className="ml10"> <div className="ml10 text-right">
<div className="mt15 text-right" style={{display:"flex",justifyContent:"flex-end"}}>
{operate && ( {operate && (
<Button <Button
type="green" type="green"
@ -469,7 +468,6 @@ class MessageCount extends Component {
</Button> </Button>
)} )}
</div> </div>
</div>
</div> </div>
{ {
data.issue.description ? data.issue.description ?

View File

@ -265,7 +265,7 @@ class MergeForm extends Component {
}, },
], ],
initialValue: title, initialValue: title,
})(<Input placeholder="标题" maxLength={50} />)} })(<Input placeholder="标题" maxLength={200} />)}
</Form.Item> </Form.Item>
<MDEditor <MDEditor
placeholder={"请输入合并请求的描述..."} placeholder={"请输入合并请求的描述..."}

View File

@ -233,7 +233,7 @@ class Detail extends Component {
: "合并请求"} : "合并请求"}
</span> </span>
<span className="font-16 fwb">{data && data.subject}</span> <span className="font-16 fwb" style={{wordBreak:"break-all"}}>{data && data.subject}</span>
</span> </span>
{data && data.priority && ( {data && data.priority && (

View File

@ -320,7 +320,7 @@ class order_form extends Component {
message: "请填写易修标题", message: "请填写易修标题",
}, },
] ]
})(<Input placeholder="标题" size="large" maxLength={80}/>)} })(<Input placeholder="标题" size="large" maxLength={200}/>)}
</Form.Item> </Form.Item>
<div className="quillContent"> <div className="quillContent">
<MDEditor <MDEditor

View File

@ -7,6 +7,7 @@ import './TPMIndex.css';
import LoginDialog from '../login/LoginDialog'; import LoginDialog from '../login/LoginDialog';
import EducoderAccount from '../../forge/Component/EducoderAccount'; import EducoderAccount from '../../forge/Component/EducoderAccount';
import ProfileModal from '../../forge/Component/ProfileModal/Index'; import ProfileModal from '../../forge/Component/ProfileModal/Index';
import SystemNotice from '../../forge/Component/NoticeModal/SystemNotice';
export function TPMIndexHOC(WrappedComponent) { export function TPMIndexHOC(WrappedComponent) {
return class II extends React.Component { return class II extends React.Component {
@ -27,7 +28,7 @@ export function TPMIndexHOC(WrappedComponent) {
giteaVisible:false, giteaVisible:false,
email:undefined, email:undefined,
completeProfile:false, completeProfile:false,
showCP:false showCP:false,
} }
} }
@ -214,9 +215,8 @@ export function TPMIndexHOC(WrappedComponent) {
}) })
} }
render() { render() {
let { isRender , current_user , giteaVisible , email , completeProfile , showCP } = this.state; let { isRender , current_user , giteaVisible , email , completeProfile , showCP , mygetHelmetapi } = this.state;
const common = { const common = {
showLoginDialog: this.showLoginDialog, showLoginDialog: this.showLoginDialog,
checkIfLogin: this.checkIfLogin, checkIfLogin: this.checkIfLogin,
@ -225,6 +225,11 @@ export function TPMIndexHOC(WrappedComponent) {
}; };
return ( return (
<div className="indexHOC"> <div className="indexHOC">
<SystemNotice
system_notification={mygetHelmetapi && mygetHelmetapi.system_notification}
history={this.props.history}
login={current_user && current_user.login}
/>
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/> <EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
<ProfileModal <ProfileModal
visible={!completeProfile && showCP} visible={!completeProfile && showCP}