通知中心
This commit is contained in:
parent
4795de938e
commit
1b21d9e3fb
|
@ -6,62 +6,35 @@ import '../SecuritySetting/Index.scss';
|
|||
import '../SecuritySetting/notice/myNotice/Index.scss'
|
||||
import { timeAgo } from '../../common/DateUtil';
|
||||
import { Link } from 'react-router-dom';
|
||||
import Axios from 'axios';
|
||||
|
||||
function NoticeContent(props) {
|
||||
const[noticeType,setNoticeType] = useState("0");
|
||||
const[notice_unread_count,setNotice_unread_count]=useState(221);//未读系统通知数量
|
||||
const[notice_unread_count,setNotice_unread_count]=useState();//未读系统通知数量
|
||||
const[letter_unread_count,setLetter_unread_count]=useState(10);//未读私信数量
|
||||
const[at_unread_count,setAt_unread_count]=useState(2);//未读@我数量
|
||||
const[notice_unread_list,setNotice_unread_list]=useState([
|
||||
{
|
||||
id: 11,
|
||||
type: 1, //12345,用于展示不同的图标等,对应: 平台消息推送; 异常登录提示; 被拉入或移出项目,被拉入或移出组织;我负责的ISSUE发生改变; 我管理的仓库:有新的易修,有新的合并请求,有成员变更,仓库设置被更改,有新的易修指派给我,有新的合并请求指派给我等;
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等;单条通知只要一个跳转路径,点击该条通知任意位置都会跳到对应issue/项目
|
||||
content: "蒋宇航在 Gitlink/Gitlink 新建易修:<b>测试环境链接地址错误</b>", //要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //通知发送时间
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
type: 2,
|
||||
read: 0,
|
||||
url: "/jasder/courselist",
|
||||
content: "你关注的仓库 <b>王涛/协同分析</b> 已被删除",
|
||||
create_time: "2019-03-04 18:08",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
type: 3,
|
||||
read: 0,
|
||||
url: "/jasder/courselist",
|
||||
content: "蔡世新建易修<b> 【镜像项目-Github】私有项目 用户新建仓库,仓库转移到本地仓库的哈哈哈哈哈</b>",
|
||||
create_time: "2019-03-04 18:08",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
type: 4,
|
||||
read: 0,
|
||||
url: "/jasder/courselist",
|
||||
content: "您的帐号<b> 小霞子1999 </b>于2021-08-11 10:52:29在非常用的IP地址113.218.1.188(湖南)",
|
||||
create_time: "2019-03-04 18:08",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
type: 5,
|
||||
read: 0,
|
||||
url: "/jasder/courselist",
|
||||
content: "蔡世新建易修<b> 【镜像项目-Github】私有项目</b> 用户新建仓库,仓库转移到本地仓库的哈哈哈哈哈",
|
||||
create_time: "2019-03-04 18:08",
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
type: 6,
|
||||
read: 0,
|
||||
url: "/jasder/courselist",
|
||||
content: "蔡世新建易修<b> 【镜像项目-Github】私有项目 用户新建仓库,仓库转移到本地仓库的哈哈哈</b>",
|
||||
create_time: "2019-03-04 18:08",
|
||||
const[at_unread_count,setAt_unread_count]=useState();//未读@我数量
|
||||
const [message_list, setMessage_list] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
type:noticeType==="0"?"notification":noticeType==="2"?"atme":"",
|
||||
limit: 20,
|
||||
page: 0,
|
||||
}
|
||||
getMessageList(params);
|
||||
}, [noticeType])
|
||||
|
||||
function getMessageList(params) {
|
||||
console.log(params);
|
||||
Axios.get(`/users/yystopf/messages.json`, {
|
||||
params: params,
|
||||
}).then((response) => {
|
||||
setNotice_unread_count(response.data.unread_notification);
|
||||
setAt_unread_count(response.data.unread_atme);
|
||||
setMessage_list(response.data.messages);
|
||||
console.log(message_list);
|
||||
})
|
||||
}
|
||||
]);
|
||||
const[letter_unread_list,setLetter_unread_list]=useState([
|
||||
{
|
||||
id: 122,
|
||||
|
@ -112,69 +85,6 @@ function NoticeContent(props) {
|
|||
create_time: "2019-03-04 18:08", //发送时间
|
||||
}
|
||||
]);
|
||||
const[at_unread_list,setAt_unread_list]=useState([
|
||||
{
|
||||
id: 122,
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
name: "蒋宇航", //@我的人
|
||||
content: "<b>钟景霞</b> 在易修 <b>【UI设计】用户public key添加功能</b> 中@我", //什么情况下@我,要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //@我的时间
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等,只要一个跳转路径
|
||||
},
|
||||
{
|
||||
id: 122,
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
name: "阿吧", //@我的人
|
||||
content: "<b>钟景霞</b> 在易修 <b>【UI设计】用户public key添加功能</b> 中@我【后端】代码库没有任何文件的情况下镜像项目创建/代码库页面一直处于loading状态需优化 ", //什么情况下@我,要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //@我的时间
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等,只要一个跳转路径
|
||||
}
|
||||
,
|
||||
{
|
||||
id: 122,
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
name: "蒋宇航", //@我的人
|
||||
content: "<b>钟景霞</b> 在易修 <b>【UI设计】用s@我", //什么情况下@我,要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //@我的时间
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等,只要一个跳转路径
|
||||
}
|
||||
,
|
||||
{
|
||||
id: 122,
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
name: "蒋宇航", //@我的人
|
||||
content: "<b>钟景霞</b> key添加功能</b> 中@我", //什么情况下@我,要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //@我的时间
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等,只要一个跳转路径
|
||||
}
|
||||
,
|
||||
{
|
||||
id: 122,
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
name: "蒋宇航", //@我的人
|
||||
content: "<b>钟景霞</b> 在易修 <b>【UI设计】用户public key添加功能</b> 中@我axdsadasd", //什么情况下@我,要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //@我的时间
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等,只要一个跳转路径
|
||||
}
|
||||
,
|
||||
{
|
||||
id: 122,
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
name: "蒋宇航", //@我的人
|
||||
content: "<b>钟景霞</b> 在易修 <b>【UI设计】用户public key添加功sdasd能</b> 中@我", //什么情况下@我,要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //@我的时间
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等,只要一个跳转路径
|
||||
}
|
||||
,
|
||||
{
|
||||
id: 122,
|
||||
read: 0, //是否已读,0未读,1已读
|
||||
name: "蒋宇航", //@我的人
|
||||
content: "<b>钟景霞</b> 在易修 <b>【UI设计】用户public key添加功能</b> 中@我", //什么情况下@我,要加粗的内容,在两侧加<b></b>标签
|
||||
create_time: "2019-03-04 18:08", //@我的时间
|
||||
url: "/jasder/courselist", //跳转路径,跳转到对应的项目/issue等,只要一个跳转路径
|
||||
}
|
||||
]);
|
||||
|
||||
return(
|
||||
<div className="messageHoverDiv notice01">
|
||||
|
@ -187,23 +97,38 @@ function NoticeContent(props) {
|
|||
</div>
|
||||
<div className="hoverNotice-body">
|
||||
|
||||
{/* 系统消息 */}
|
||||
{noticeType==="0"?notice_unread_list.length>0?notice_unread_list.map(item=>{
|
||||
{message_list.map(item=>{
|
||||
// 系统消息
|
||||
if(noticeType ==="0" && item.type === "notification" && item.status===1){
|
||||
let contentStr = item.content.endsWith("</b>") && item.content.length>=50 && item.content.replace("</b>","").substr(0,40)+"...";
|
||||
let iconName = item.type===1?"icon-xitongtongzhiicon":item.type===2?"icon-xiaoxi2":item.type===3?"icon-yixiuicon1":item.type===4?"icon-hebingqingqiuicon":item.type===5?"icon-lichengbeiicon":"icon-daimakuicon1";
|
||||
// let iconName = item.type===1?"icon-xitongtongzhiicon":item.type===2?"icon-xiaoxi2":item.type===3?"icon-yixiuicon1":item.type===4?"icon-hebingqingqiuicon":item.type===5?"icon-lichengbeiicon":"icon-daimakuicon1";
|
||||
return(
|
||||
<div className="noticeCont-back">
|
||||
<div className="noticeCont" style={{height:item.content.length>=30 && item.content.length<=34?'65px':""}}>
|
||||
<div className="noticeCont" style={{height:item.content.length>30 && item.content.length<=34?'65px':""}}>
|
||||
<Badge color="#FA2020" />
|
||||
<i className={"iconfont "+iconName}></i>
|
||||
<i className="iconfont icon-yixiuicon1"></i>
|
||||
<div className="noticeCont-text">
|
||||
<span dangerouslySetInnerHTML={{__html:contentStr?contentStr: item.content.length>=48?item.content.substr(0,48)+"...":item.content}}></span>
|
||||
<span className="timeSpan">{item.create_time?timeAgo(item.create_time):"刚刚"}</span>
|
||||
<span className="timeSpan">{item.time_ago}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}):"暂无数据":""}
|
||||
}else if(noticeType ==="2" && item.type === "atme" && item.status===1){
|
||||
// @我
|
||||
return(
|
||||
<div className="noticeCont-back">
|
||||
<div className="noticeCont" style={{height:item.content.length>30 && item.content.length<=42?'65px':""}}>
|
||||
<Badge color="#FA2020" />
|
||||
<div className="noticeCont-text">
|
||||
<span dangerouslySetInnerHTML={{__html:item.content.length>=56?item.content.substr(0,56)+"...@我":item.content}}></span>
|
||||
<span className="timeSpan">{item.time_ago}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})}
|
||||
|
||||
{/* 私信 */}
|
||||
{noticeType==="1"?letter_unread_list.length>0?letter_unread_list.map(item=>{
|
||||
|
@ -220,59 +145,6 @@ function NoticeContent(props) {
|
|||
</div>
|
||||
)
|
||||
}):"暂无数据":""}
|
||||
|
||||
{/* @我 */}
|
||||
{noticeType==="2"?at_unread_list.length>0?at_unread_list.map(item=>{
|
||||
return(
|
||||
<div className="noticeCont-back">
|
||||
<div className="noticeCont" style={{height:item.content.length>=30 && item.content.length<=42?'65px':""}}>
|
||||
<Badge color="#FA2020" />
|
||||
<div className="noticeCont-text">
|
||||
{/* <span className="at-name">{item.name}</span> */}
|
||||
<span dangerouslySetInnerHTML={{__html:item.content.length>=56?item.content.substr(0,56)+"...@我":item.content}}></span>
|
||||
<span className="timeSpan">{item.create_time?timeAgo(item.create_time):"刚刚"}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}):"暂无数据":""}
|
||||
|
||||
{/* <div className="noticeCont">
|
||||
<Badge color="#FA2020" />
|
||||
{noticeType === "0" ? <i className="iconfont icon-yixiuicon1"></i> : ""}
|
||||
<div className="text">
|
||||
<span>蒋宇航:</span>
|
||||
<span className="boldSpan">最好的OpenStack控制台,对标Open社区项目Horizon,在易...</span>
|
||||
<span className="timeSpan">4分钟前</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="noticeCont">
|
||||
<Badge color="#FA2020" />
|
||||
{noticeType === "0" ? <i className="iconfont icon-yixiuicon1"></i> : ""}
|
||||
<div className="text">
|
||||
<span>蒋宇航:</span>
|
||||
<span className="boldSpan">最好的OpenStack控制台,对标Open社区项目Horizon,在易...</span>
|
||||
<span className="timeSpan">4分钟前</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="noticeCont">
|
||||
<Badge color="#FA2020" />
|
||||
{noticeType === "0" ? <i className="iconfont icon-yixiuicon1"></i> : ""}
|
||||
<div className="text">
|
||||
<span>蒋宇航:</span>
|
||||
<span className="boldSpan">最好的OpenStack控制台,对标Open社区项目Horizon,在易...</span>
|
||||
<span className="timeSpan">4分钟前</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="noticeCont">
|
||||
<Badge color="#FA2020" />
|
||||
{noticeType === "0" ? <i className="iconfont icon-yixiuicon1"></i> : ""}
|
||||
<div className="text">
|
||||
<span>蒋宇航:</span>
|
||||
<span className="boldSpan">最好的OpenStack控制台,对标Open社区项目Horizon,在易...</span>
|
||||
<span className="timeSpan">4分钟前</span>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
<div className="hoverNotice-buttom">
|
||||
<Link to="/settings/notice/myNotice">全部消息</Link>
|
||||
|
|
|
@ -3,23 +3,51 @@ import { Badge, Button, Checkbox, Menu } from 'antd';
|
|||
import './Index.scss';
|
||||
import '../manager/Index.scss'
|
||||
import DelModal from '../../../Wiki/components/ModalFun';
|
||||
import Axios from 'axios';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
function MyNotice(props) {
|
||||
|
||||
const [noticeType, setNoticeType] = useState("2");
|
||||
const [noticeType, setNoticeType] = useState("0");
|
||||
const [selectedNum, setSelectedNum] = useState(0);
|
||||
const [isBatchDelete, setIsBatchDelete] = useState(false);
|
||||
const [notice_unread_count, setNotice_unread_count] = useState();//未读系统通知数量
|
||||
const [letter_unread_count, setLetter_unread_count] = useState(0);//未读私信数量
|
||||
const [at_unread_count, setAt_unread_count] = useState();//未读@我数量
|
||||
const [message_list, setMessage_list] = useState([]);
|
||||
const [onlyUnread,setOnlyUnread] = useState();
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
type:noticeType==="0"?"notification":noticeType==="2"?"atme":"",
|
||||
status:onlyUnread?onlyUnread:"",
|
||||
limit: 20,
|
||||
page: 0,
|
||||
}
|
||||
getMessageList(params);
|
||||
}, [noticeType,onlyUnread])
|
||||
|
||||
function getMessageList(params) {
|
||||
Axios.get(`/users/yystopf/messages.json`, {
|
||||
params: params,
|
||||
}).then((response) => {
|
||||
setNotice_unread_count(response.data.unread_notification);
|
||||
setAt_unread_count(response.data.unread_atme);
|
||||
setMessage_list(response.data.messages);
|
||||
})
|
||||
}
|
||||
|
||||
function handleClick(e) {
|
||||
setNoticeType(e.key);
|
||||
if (e.key != "2") {
|
||||
setIsBatchDelete(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onChange() {
|
||||
var selectedNum = 0;
|
||||
const checkbox = document.getElementsByClassName("checkbox");
|
||||
const checkbox = document.getElementsByClassName("atme-checkbox");
|
||||
for (var i = 0; i < checkbox.length; i++) {
|
||||
checkbox[i].checked ? selectedNum++ : "";
|
||||
}
|
||||
|
@ -29,7 +57,7 @@ function MyNotice(props) {
|
|||
|
||||
|
||||
function onCheckAllChange(e) {
|
||||
const checkbox = document.getElementsByClassName("checkbox");
|
||||
const checkbox = document.getElementsByClassName("atme-checkbox");
|
||||
for (var i = 0; i < checkbox.length; i++) {
|
||||
checkbox[i].checked = e.target.checked;
|
||||
}
|
||||
|
@ -51,16 +79,16 @@ function MyNotice(props) {
|
|||
<div className="notice01">
|
||||
<div className="sshHead">
|
||||
<Menu mode="horizontal" selectedKeys={noticeType} onClick={handleClick}>
|
||||
<Menu.Item key="0"><Badge count={5}>系统通知</Badge></Menu.Item>
|
||||
<Menu.Item key="1" id="item-private"><Badge count={10}>私信</Badge></Menu.Item>
|
||||
<Menu.Item key="2"><Badge count={999}>@我</Badge></Menu.Item>
|
||||
<Menu.Item key="0"><Badge count={notice_unread_count} title="">系统通知</Badge></Menu.Item>
|
||||
<Menu.Item key="1" id="item-private"><Badge count={0}>私信</Badge></Menu.Item>
|
||||
<Menu.Item key="2"><Badge count={at_unread_count}>@我</Badge></Menu.Item>
|
||||
</Menu>
|
||||
<button>所有{noticeType==="0"?"系统通知":noticeType==="1"?"私信":"@我"}一键已读</button>
|
||||
<button>所有{noticeType === "0" ? "系统通知" : noticeType === "1" ? "私信" : "@我"}一键已读</button>
|
||||
</div>
|
||||
|
||||
<div className={isBatchDelete ? "invisible " : "visible"}>
|
||||
<div className="vertical-center-style">
|
||||
<Checkbox >仅看未读{noticeType === "1" ? "私信" : "消息"}(12)</Checkbox>
|
||||
<Checkbox onChange={(e)=>e.target.checked?setOnlyUnread(1):setOnlyUnread(2)}>仅看未读{noticeType === "1" ? `私信(12)` : noticeType==="0"?`消息(${notice_unread_count})`:`消息(${at_unread_count})`}</Checkbox>
|
||||
</div>
|
||||
{noticeType === "2" ? <button onClick={() => { setIsBatchDelete(true); }}>批量删除</button> : ""}
|
||||
</div>
|
||||
|
@ -71,99 +99,49 @@ function MyNotice(props) {
|
|||
全选 已选择 <span id="numberSpan">{selectedNum}</span> 项
|
||||
</div>
|
||||
<div>
|
||||
<button onClick={() => { setIsBatchDelete(false);setSelectedNum(0); }}>取消</button>
|
||||
<button className="deleteBut" onClick={selectedNum>0 ? deleteNotice:()=>{}}>删除</button>
|
||||
<button onClick={() => { setIsBatchDelete(false); setSelectedNum(0); }}>取消</button>
|
||||
<button className="deleteBut" onClick={selectedNum > 0 ? deleteNotice : () => { }}>删除</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{noticeType === "1" ?
|
||||
<div className="mynotice-content vertical-center-style">
|
||||
<Badge count={95}><img src="https://testforgeplus.trustie.net//system/lets/letter_avatars/2/D/208_124_118/120.png" class="currentImg private-letter-img"/></Badge>
|
||||
<div className="private-letter-right">
|
||||
<div>
|
||||
<span>蒋宇航</span>
|
||||
<span className="timeSpan">4分钟前</span>
|
||||
<a onClick={deleteNotice}>删除</a>
|
||||
</div>
|
||||
<div onClick={() => props.history.push('/settings/notice/privateLetter')}>
|
||||
<span className="highlightSpan letter-length-limit">最好的OpenStack控制台,对标OpenStack社区Horizon项目,最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
: <div className="mynotice-content vertical-center-style">
|
||||
{message_list.map(item => {
|
||||
// 系统消息
|
||||
// 消息类别
|
||||
// const iconName = item.source.startsWith("Issue")?"icon-yixiuicon1":item.source.startsWith("Project")?"icon-daimakuicon1":item.source.startsWith("Project")?"icon-daimakuicon1":
|
||||
if(noticeType ==="0" && item.type === "notification"){
|
||||
return(
|
||||
<div className="mynotice-content vertical-center-style" key={item.id}>
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
<input type="checkbox" className={isBatchDelete ? 'checkbox' : 'invisible'} onChange={onChange} />
|
||||
{/* 系统通知 */}
|
||||
{noticeType === "0" ? <Badge color="#FA2020" /> : ""}
|
||||
{noticeType === "0" ? <i className="iconfont icon-yixiuicon1"></i> : ""}
|
||||
{noticeType === "2" ? <img src="https://testforgeplus.trustie.net//system/lets/letter_avatars/2/D/208_124_118/120.png" class="currentImg"/> : ""}
|
||||
{/* {noticeType === "2" ? <Badge color="#FA2020" className="at-badge"/> : ""} */}
|
||||
<span className={noticeType==="0"?"sysNotice-length highlightSpan":"at-length highlightSpan"}>{noticeType === "2" ? <Badge color="#FA2020" className="at-badge"/> : ""}蒋宇航在<span className="boldSpan">Gitlink/Gitlink</span>新建易修:<span className="boldSpan">【Bug】链接地址错误</span></span>
|
||||
{item.status === 1? <Badge color="#FA2020" />:<span className="system-notice-blank"></span>}
|
||||
<i className="iconfont icon-yixiuicon1"></i>
|
||||
<span className="sysNotice-length highlightSpan" onClick={()=>window.location.href=(`${item.notification_url}`)}>{item.content}</span>
|
||||
</div>
|
||||
<div className="mynotice-cont vertical-center-style float-left-little">
|
||||
<span className="timeSpan">{item.time_ago}</span>
|
||||
<a>标记为已读</a>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
} else if(noticeType ==="2" && item.type === "atme"){
|
||||
//@我
|
||||
return(
|
||||
<div className="mynotice-content vertical-center-style" key={item.id}>
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
<input type="checkbox" className={isBatchDelete ? 'atme-checkbox' : 'invisible'} onChange={onChange} />
|
||||
<img src={`https://testforgeplus.trustie.net//${item.sender.image_url}`} className="currentImg" />
|
||||
<span className="at-length highlightSpan">
|
||||
{item.status === 1? <Badge color="#FA2020" className="at-badge"/>:<span className="system-notice-blank"></span>}
|
||||
{item.content}
|
||||
</span>
|
||||
</div>
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
<span className="timeSpan">4分钟前</span>
|
||||
<a>标记为已读</a> {noticeType === "0" ? "" : <a className="float-left-little" onClick={deleteNotice}>删除</a>}
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
{noticeType === "1" ?
|
||||
<div className="mynotice-content vertical-center-style">
|
||||
<Badge count={599}><img src="https://testforgeplus.trustie.net//system/lets/letter_avatars/2/D/208_124_118/120.png" class="currentImg private-letter-img"/></Badge>
|
||||
<div className="private-letter-right">
|
||||
<div>
|
||||
<span>段甲生</span>
|
||||
<span className="timeSpan">5分钟前</span>
|
||||
<a onClick={deleteNotice}>删除</a>
|
||||
</div>
|
||||
<div>
|
||||
<span className="highlightSpan letter-length-limit">gitlink平台 react 前端代码</span>
|
||||
<span className="timeSpan">{item.time_ago}</span>
|
||||
<a>标记为已读</a> <a className="float-left-little" onClick={deleteNotice}>删除</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
: <div className="mynotice-content vertical-center-style">
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
<input type="checkbox" className={isBatchDelete ? 'checkbox' : 'invisible'} onChange={onChange} />
|
||||
{/* 系统通知 */}
|
||||
{noticeType === "0" ? <Badge color="#FA2020" /> : ""}
|
||||
{noticeType === "0" ? <i className="iconfont icon-hebingqingqiuicon"></i> : ""}
|
||||
{noticeType === "2" ? <img src="https://testforgeplus.trustie.net//system/lets/letter_avatars/2/D/208_124_118/120.png" class="currentImg"/> : ""}
|
||||
{/* {noticeType === "2" ? <Badge color="#FA2020" className="at-badge"/> : ""} */}
|
||||
<span className={noticeType==="0"?"sysNotice-length highlightSpan":"at-length highlightSpan"}>{noticeType === "2" ? <Badge color="#FA2020" className="at-badge"/> : ""}蒋宇航在<span className="boldSpan">蒋宇航/软件工程课程协同开发案例</span>指派给你一个合并请求:<span className="boldSpan">请进行合并请求test</span>请进行合并请求test请进行合并请求test请进行合并请求test请进行合并请求test请进行合并请求test</span>
|
||||
</div>
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
<span className="timeSpan">10分钟前</span>
|
||||
<a>标记为已读</a> {noticeType === "0" ? "" : <a className="float-left-little" onClick={deleteNotice}>删除</a>}
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
{noticeType === "1" ?
|
||||
<div className="mynotice-content vertical-center-style">
|
||||
<Badge count={5}><img src="https://testforgeplus.trustie.net//system/lets/letter_avatars/2/D/208_124_118/120.png" class="currentImg private-letter-img"/></Badge>
|
||||
<div className="private-letter-right">
|
||||
<div>
|
||||
<span>巴拉迪维</span>
|
||||
<span className="timeSpan">7分钟前</span>
|
||||
<a onClick={deleteNotice}>删除</a>
|
||||
</div>
|
||||
<div>
|
||||
<span className="highlightSpan letter-length-limit">构建卷积神经网络,训练模型,预测模型效果。</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
: <div className="mynotice-content vertical-center-style">
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
<input type="checkbox" className={isBatchDelete ? 'checkbox' : 'invisible'} onChange={onChange} />
|
||||
{/* 系统通知 */}
|
||||
{noticeType === "0" ? <span> </span> : ""}
|
||||
{noticeType === "0" ? <i className="iconfont icon-lichengbeiicon"></i> : ""}
|
||||
{noticeType === "2" ? <img src="https://testforgeplus.trustie.net//system/lets/letter_avatars/2/D/208_124_118/120.png" class="currentImg"/> : ""}
|
||||
<span className={noticeType==="0"?"sysNotice-length highlightSpan":"at-length highlightSpan"}>你关注的仓库<span className="boldSpan">王涛/协同案例分析</span>已被删除</span>
|
||||
</div>
|
||||
<div className="mynotice-cont vertical-center-style">
|
||||
<span className="timeSpan">1小时前</span>
|
||||
<a>标记为已读</a> {noticeType === "0" ? "" : <a className="float-left-little" onClick={deleteNotice}>删除</a>}
|
||||
</div>
|
||||
</div>}
|
||||
)
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -127,11 +127,9 @@ button:active {
|
|||
|
||||
.mynotice-cont{
|
||||
padding:0;
|
||||
position: relative;
|
||||
|
||||
& .at-badge{
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
& .atme-checkbox{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,6 +141,10 @@ button:active {
|
|||
min-width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
& .system-notice-blank{
|
||||
margin-right: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.baselineDiv{
|
||||
|
@ -159,6 +161,7 @@ button:active {
|
|||
height: 30px;
|
||||
padding: 0 10px;
|
||||
color: #333333;
|
||||
margin-bottom: 5px;
|
||||
button{
|
||||
padding:0px 12px;
|
||||
}
|
||||
|
@ -193,7 +196,7 @@ button:active {
|
|||
|
||||
.at-length{
|
||||
max-width: 48rem;
|
||||
margin-left: 22px;
|
||||
margin-left: 18px;
|
||||
}
|
||||
#numberSpan{
|
||||
color: #466AFF;
|
||||
|
|
Loading…
Reference in New Issue