forked from Gitlink/forgeplus-react
Merge pull request '我的通知' (#21) from durian/forgeplus-react:feature_notification_xiesi into feature_notification
This commit is contained in:
commit
23ccaadba2
|
@ -142,6 +142,10 @@ function MyNotice(props) {
|
|||
setBatchDeleteCheckAll(false);
|
||||
}
|
||||
|
||||
function turnToPersonalCenter(){
|
||||
window.open(`/${current_user && current_user.login}`);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="notice01">
|
||||
<div className="sshHead">
|
||||
|
@ -183,7 +187,7 @@ function MyNotice(props) {
|
|||
<div className="mynotice-cont stretch-style">
|
||||
{item.status === 1 ? <Badge color="#FA2020" /> : <span className="system-notice-blank"></span>}
|
||||
<i className={"iconfont "+noticeSourceType[item.source]}></i>
|
||||
<span className={item.notification_url?"sysNotice-length highlightSpan":"sysNotice-length"} onClick={() => {item.notification_url && window.open("https://"+`${item.notification_url}`)}} dangerouslySetInnerHTML={{__html: item.content}}></span>
|
||||
<span className={item.notification_url?"sysNotice-length highlightSpan":"sysNotice-length"} onClick={() => {item.notification_url && window.open("https://"+`${item.notification_url}`);readNotice([item.id])}} dangerouslySetInnerHTML={{__html: item.content}}></span>
|
||||
</div>
|
||||
<div className="mynotice-cont vertical-center-style float-left-little">
|
||||
<span className={item.status === 1?"timeSpan":""}>{item.time_ago}</span>
|
||||
|
@ -199,11 +203,11 @@ function MyNotice(props) {
|
|||
<div className="mynotice-cont vertical-center-style">
|
||||
{/* <input type="checkbox" className={isBatchDelete ? 'atme-checkbox' : 'invisible'} onChange={onChange} /> */}
|
||||
<Checkbox value={item.id} className={isBatchDelete ? 'visible-checkbox' : 'invisible-checkbox'} onChange={onChange} checked={item.checkedBatch}></Checkbox>
|
||||
{item.sender && <img src={`https://testforgeplus.trustie.net//${item.sender.image_url}`} className="currentImg" />}
|
||||
{item.sender && <img src={`https://testforgeplus.trustie.net//${item.sender.image_url}`} className="currentImg" onClick={turnToPersonalCenter}/>}
|
||||
<div className="atme-notice-text">
|
||||
<div className="at-badge">{item.status === 1 ? <Badge color="#FA2020" /> : <span className="system-notice-blank"></span>}</div>
|
||||
{item.sender && <div className="atme-sender-name boldSpan">{item.sender.name}</div>}
|
||||
<div className={item.notification_url?"highlightSpan atme-cont":"atme-cont"} onClick={() => {item.notification_url && window.open("https://"+`${item.notification_url}`)}} dangerouslySetInnerHTML={{__html: item.content+" 中@我"}}></div>
|
||||
{/* {item.sender && <div className="atme-sender-name boldSpan">{item.sender.name}</div>} */}
|
||||
{item.sender && <div className={item.notification_url?"highlightSpan atme-cont":"atme-cont"} onClick={() => {item.notification_url && window.open("https://"+`${item.notification_url}`);readNotice([item.id])}} dangerouslySetInnerHTML={{__html: "<b onClick = {turnToPersonalCenter}>" + item.sender.name +"</b> " + item.content +" 中@我"}}></div>}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
|
|
|
@ -155,12 +155,9 @@ button:active {
|
|||
position:absolute;
|
||||
}
|
||||
|
||||
& .atme-sender-name{
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
& .atme-cont{
|
||||
max-width: 42rem;
|
||||
max-width: 48rem;
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue