通知系统

This commit is contained in:
谢思 2021-09-07 09:33:46 +08:00
parent ca9a606e53
commit cb58481daf
10 changed files with 490 additions and 172 deletions

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1628841816999') format('woff2'),
url('iconfont.woff?t=1628841816999') format('woff'),
url('iconfont.ttf?t=1628841816999') format('truetype');
src: url('iconfont.woff2?t=1630894072659') format('woff2'),
url('iconfont.woff?t=1630894072659') format('woff'),
url('iconfont.ttf?t=1630894072659') format('truetype');
}
.iconfont {
@ -13,6 +13,146 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-gerenziliao1:before {
content: "\e8c7";
}
.icon-lichengbeiicon:before {
content: "\e885";
}
.icon-cangkushezhiicon:before {
content: "\e889";
}
.icon-dongtaiicon:before {
content: "\e88a";
}
.icon-gongzuoliuicon:before {
content: "\e88b";
}
.icon-yixiuicon1:before {
content: "\e89b";
}
.icon-a-wikiicon1:before {
content: "\e8c6";
}
.icon-daimakuicon1:before {
content: "\e8c5";
}
.icon-wodetongzhi:before {
content: "\e8c8";
}
.icon-tongzhiguanli:before {
content: "\e8c9";
}
.icon-xuanzhong3:before {
content: "\e8ca";
}
.icon-xitongtongzhiicon:before {
content: "\e8cb";
}
.icon-xiaoxi2:before {
content: "\e8cc";
}
.icon-sshmiyue:before {
content: "\e8cd";
}
.icon-gerenziliao:before {
content: "\e8c4";
}
.icon-xinshouzhiyin:before {
content: "\e8e4";
}
.icon-xinjianxiangmu:before {
content: "\e8e6";
}
.icon-jiaruketang1:before {
content: "\e8e9";
}
.icon-xiangmugonggao:before {
content: "\e8c2";
}
.icon-chengguo:before {
content: "\e8c3";
}
.icon-chengjiaogonggao:before {
content: "\e8c0";
}
.icon-jishuzichan:before {
content: "\e8c1";
}
.icon-feibiaogonggao:before {
content: "\e8bc";
}
.icon-zhongbiaogonggao:before {
content: "\e8bd";
}
.icon-gengzhenggonggao:before {
content: "\e8be";
}
.icon-zhaobiaogonggao:before {
content: "\e8bf";
}
.icon-wenjian6:before {
content: "\e8ba";
}
.icon-wenjianjia4:before {
content: "\e8bb";
}
.icon-quxiaoguanzhu:before {
content: "\e89a";
}
.icon-dianzan_icon:before {
content: "\e8a2";
}
.icon-wenjian5:before {
content: "\e896";
}
.icon-wenjianjia3:before {
content: "\e8a9";
}
.icon-fuzhiicon:before {
content: "\e886";
}
.icon-zhuye-fill:before {
content: "\e876";
}
.icon-daimakuicon:before {
content: "\e884";
}
.icon-xinjian2:before {
content: "\e8b0";
}
@ -29,22 +169,6 @@
content: "\e8a6";
}
.icon-dianzan_icon:before {
content: "\e8ba";
}
.icon-quxiaoguanzhu:before {
content: "\e8bb";
}
.icon-daimakuicon:before {
content: "\e8a9";
}
.icon-zhuyeicon:before {
content: "\e884";
}
.icon-biaoqianicon:before {
content: "\e882";
}
@ -53,14 +177,6 @@
content: "\e883";
}
.icon-cangkushezhiicon:before {
content: "\e885";
}
.icon-fuzhiicon:before {
content: "\e886";
}
.icon-lianjieicon:before {
content: "\e887";
}
@ -69,18 +185,6 @@
content: "\e888";
}
.icon-lichengbeiicon:before {
content: "\e889";
}
.icon-gongzuoliuicon:before {
content: "\e88a";
}
.icon-dongtaiicon:before {
content: "\e88b";
}
.icon-morendianzan_icon:before {
content: "\e88e";
}
@ -93,10 +197,6 @@
content: "\e899";
}
.icon-wenjian5:before {
content: "\e89a";
}
.icon-tijiaoicon:before {
content: "\e89e";
}
@ -105,10 +205,6 @@
content: "\e89f";
}
.icon-wenjianjia3:before {
content: "\e8a2";
}
.icon-xialaanniu1:before {
content: "\e8a4";
}
@ -193,10 +289,6 @@
content: "\e898";
}
.icon-weixuanzhongqingqiuicon:before {
content: "\e89b";
}
.icon-xiezuozheguanliicon:before {
content: "\e8a1";
}
@ -241,10 +333,6 @@
content: "\e875";
}
.icon-fuzhi_icon:before {
content: "\e876";
}
.icon-shanchuicon:before {
content: "\e877";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,251 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "24059956",
"name": "个人资料",
"font_class": "gerenziliao1",
"unicode": "e8c7",
"unicode_decimal": 59591
},
{
"icon_id": "24059409",
"name": "里程碑icon",
"font_class": "lichengbeiicon",
"unicode": "e885",
"unicode_decimal": 59525
},
{
"icon_id": "24059410",
"name": "仓库设置icon",
"font_class": "cangkushezhiicon",
"unicode": "e889",
"unicode_decimal": 59529
},
{
"icon_id": "24059411",
"name": "动态icon",
"font_class": "dongtaiicon",
"unicode": "e88a",
"unicode_decimal": 59530
},
{
"icon_id": "24059412",
"name": "工作流icon",
"font_class": "gongzuoliuicon",
"unicode": "e88b",
"unicode_decimal": 59531
},
{
"icon_id": "24059413",
"name": "易修icon",
"font_class": "yixiuicon1",
"unicode": "e89b",
"unicode_decimal": 59547
},
{
"icon_id": "24059414",
"name": "wiki icon",
"font_class": "a-wikiicon1",
"unicode": "e8c6",
"unicode_decimal": 59590
},
{
"icon_id": "24047186",
"name": "代码库icon",
"font_class": "daimakuicon1",
"unicode": "e8c5",
"unicode_decimal": 59589
},
{
"icon_id": "24047189",
"name": "我的通知",
"font_class": "wodetongzhi",
"unicode": "e8c8",
"unicode_decimal": 59592
},
{
"icon_id": "24047190",
"name": "通知管理",
"font_class": "tongzhiguanli",
"unicode": "e8c9",
"unicode_decimal": 59593
},
{
"icon_id": "24047191",
"name": "选中",
"font_class": "xuanzhong3",
"unicode": "e8ca",
"unicode_decimal": 59594
},
{
"icon_id": "24047192",
"name": "系统通知icon",
"font_class": "xitongtongzhiicon",
"unicode": "e8cb",
"unicode_decimal": 59595
},
{
"icon_id": "24047193",
"name": "消息",
"font_class": "xiaoxi2",
"unicode": "e8cc",
"unicode_decimal": 59596
},
{
"icon_id": "24047194",
"name": "ssh密钥",
"font_class": "sshmiyue",
"unicode": "e8cd",
"unicode_decimal": 59597
},
{
"icon_id": "24014152",
"name": "个人资料",
"font_class": "gerenziliao",
"unicode": "e8c4",
"unicode_decimal": 59588
},
{
"icon_id": "23655968",
"name": "新手指引",
"font_class": "xinshouzhiyin",
"unicode": "e8e4",
"unicode_decimal": 59620
},
{
"icon_id": "23655969",
"name": "新建项目",
"font_class": "xinjianxiangmu",
"unicode": "e8e6",
"unicode_decimal": 59622
},
{
"icon_id": "23658111",
"name": "加入课堂",
"font_class": "jiaruketang1",
"unicode": "e8e9",
"unicode_decimal": 59625
},
{
"icon_id": "23791639",
"name": "项目公告",
"font_class": "xiangmugonggao",
"unicode": "e8c2",
"unicode_decimal": 59586
},
{
"icon_id": "23791640",
"name": "成果",
"font_class": "chengguo",
"unicode": "e8c3",
"unicode_decimal": 59587
},
{
"icon_id": "23791410",
"name": "成交公告",
"font_class": "chengjiaogonggao",
"unicode": "e8c0",
"unicode_decimal": 59584
},
{
"icon_id": "23791411",
"name": "技术资产",
"font_class": "jishuzichan",
"unicode": "e8c1",
"unicode_decimal": 59585
},
{
"icon_id": "23790928",
"name": "废标公告",
"font_class": "feibiaogonggao",
"unicode": "e8bc",
"unicode_decimal": 59580
},
{
"icon_id": "23790929",
"name": "中标公告",
"font_class": "zhongbiaogonggao",
"unicode": "e8bd",
"unicode_decimal": 59581
},
{
"icon_id": "23790930",
"name": "更正公告",
"font_class": "gengzhenggonggao",
"unicode": "e8be",
"unicode_decimal": 59582
},
{
"icon_id": "23790931",
"name": "招标公告",
"font_class": "zhaobiaogonggao",
"unicode": "e8bf",
"unicode_decimal": 59583
},
{
"icon_id": "23732532",
"name": "文件",
"font_class": "wenjian6",
"unicode": "e8ba",
"unicode_decimal": 59578
},
{
"icon_id": "23732533",
"name": "文件夹",
"font_class": "wenjianjia4",
"unicode": "e8bb",
"unicode_decimal": 59579
},
{
"icon_id": "23642443",
"name": "取消关注",
"font_class": "quxiaoguanzhu",
"unicode": "e89a",
"unicode_decimal": 59546
},
{
"icon_id": "23642444",
"name": "点赞_icon",
"font_class": "dianzan_icon",
"unicode": "e8a2",
"unicode_decimal": 59554
},
{
"icon_id": "23639530",
"name": "文件",
"font_class": "wenjian5",
"unicode": "e896",
"unicode_decimal": 59542
},
{
"icon_id": "23639533",
"name": "文件夹",
"font_class": "wenjianjia3",
"unicode": "e8a9",
"unicode_decimal": 59561
},
{
"icon_id": "23639440",
"name": "复制icon",
"font_class": "fuzhiicon",
"unicode": "e886",
"unicode_decimal": 59526
},
{
"icon_id": "23639422",
"name": "主页-fill",
"font_class": "zhuye-fill",
"unicode": "e876",
"unicode_decimal": 59510
},
{
"icon_id": "23639423",
"name": "代码库icon",
"font_class": "daimakuicon",
"unicode": "e884",
"unicode_decimal": 59524
},
{
"icon_id": "23572260",
"name": "新建",
@ -33,34 +278,6 @@
"unicode": "e8a6",
"unicode_decimal": 59558
},
{
"icon_id": "23492900",
"name": "点赞_icon",
"font_class": "dianzan_icon",
"unicode": "e8ba",
"unicode_decimal": 59578
},
{
"icon_id": "23492901",
"name": "取消关注",
"font_class": "quxiaoguanzhu",
"unicode": "e8bb",
"unicode_decimal": 59579
},
{
"icon_id": "23473151",
"name": "代码库icon",
"font_class": "daimakuicon",
"unicode": "e8a9",
"unicode_decimal": 59561
},
{
"icon_id": "23473104",
"name": "主页icon",
"font_class": "zhuyeicon",
"unicode": "e884",
"unicode_decimal": 59524
},
{
"icon_id": "23472253",
"name": "标签icon",
@ -75,20 +292,6 @@
"unicode": "e883",
"unicode_decimal": 59523
},
{
"icon_id": "23472256",
"name": "仓库设置icon",
"font_class": "cangkushezhiicon",
"unicode": "e885",
"unicode_decimal": 59525
},
{
"icon_id": "23472257",
"name": "复制icon",
"font_class": "fuzhiicon",
"unicode": "e886",
"unicode_decimal": 59526
},
{
"icon_id": "23472258",
"name": "链接icon",
@ -103,27 +306,6 @@
"unicode": "e888",
"unicode_decimal": 59528
},
{
"icon_id": "23472260",
"name": "里程碑icon",
"font_class": "lichengbeiicon",
"unicode": "e889",
"unicode_decimal": 59529
},
{
"icon_id": "23472261",
"name": "工作流icon",
"font_class": "gongzuoliuicon",
"unicode": "e88a",
"unicode_decimal": 59530
},
{
"icon_id": "23472262",
"name": "动态icon",
"font_class": "dongtaiicon",
"unicode": "e88b",
"unicode_decimal": 59531
},
{
"icon_id": "23472263",
"name": "默认点赞_icon",
@ -145,13 +327,6 @@
"unicode": "e899",
"unicode_decimal": 59545
},
{
"icon_id": "23472268",
"name": "文件",
"font_class": "wenjian5",
"unicode": "e89a",
"unicode_decimal": 59546
},
{
"icon_id": "23472269",
"name": "提交icon",
@ -166,13 +341,6 @@
"unicode": "e89f",
"unicode_decimal": 59551
},
{
"icon_id": "23472271",
"name": "文件夹",
"font_class": "wenjianjia3",
"unicode": "e8a2",
"unicode_decimal": 59554
},
{
"icon_id": "23472272",
"name": "下拉按钮",
@ -320,13 +488,6 @@
"unicode": "e898",
"unicode_decimal": 59544
},
{
"icon_id": "23144155",
"name": "未选中请求icon",
"font_class": "weixuanzhongqingqiuicon",
"unicode": "e89b",
"unicode_decimal": 59547
},
{
"icon_id": "23144158",
"name": "协作者管理icon",
@ -404,13 +565,6 @@
"unicode": "e875",
"unicode_decimal": 59509
},
{
"icon_id": "23046262",
"name": "复制_icon",
"font_class": "fuzhi_icon",
"unicode": "e876",
"unicode_decimal": 59510
},
{
"icon_id": "23046268",
"name": "删除icon",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import AccountProfile from "../../modules/user/AccountProfile";
import { getImageUrl } from 'educoder'
import axios from 'axios';
import { Input , notification , Dropdown , Menu } from 'antd';
import { Input , notification , Dropdown , Menu,Badge, Button } from 'antd';
import { Link } from 'react-router-dom';
import LoginDialog from '../../modules/login/LoginDialog';
@ -240,6 +240,26 @@ class NewHeader extends Component {
</div>
)
}
messageList=()=>{
return(
<div className="messageHoverDiv">
<Menu mode="horizontal">
<Menu.Item key="0"><Badge count={5}>系统通知</Badge></Menu.Item>
<Menu.Item key="1"><Badge count={10}>私信</Badge></Menu.Item>
<Menu.Item key="2"><Badge count={99}>@</Badge></Menu.Item>
</Menu>
<div className="content">
aaa
</div>
<div className = "buttom">
<a>全部消息</a>
<a>标记为已读</a>
</div>
</div>
)
}
renderMenu=(personal)=>{
const { current_user } = this.props;
return(
@ -348,7 +368,7 @@ class NewHeader extends Component {
}
// let search_url = settings && settings.common && settings.common.search;
let notice_url = settings && settings.common && settings.common.notice;
// let notice_url = settings && settings.common && settings.common.notice;
return (
<div className="newHeaders" id="nHeader">
<div className="headerContent">
@ -420,14 +440,17 @@ class NewHeader extends Component {
</Dropdown>:""
}
{this.props.user && this.props.user.login && notice_url ?
{/* {this.props.user && this.props.user.login && notice_url ? */}
{this.props.user && this.props.user.login ?
<div className="ml30 edu-menu-panel">
{user && user.login &&
<a href={`${notice_url}`} style={{ position: 'relative' }}>
<Dropdown placement={`bottomRight`} overlay={this.messageList(settings && settings.personal)}>
<a href={`/settings/notice/myNotice`} style={{ position: 'relative' }}>
<i className="iconfont icon-xiaoxilingdang color-grey-6"></i>
<span className="newslight" style={{ display: this.props.Headertop === undefined ? "none" : this.props.Headertop.new_message === true ? "block" : "none" }}>
</span>
</a>
</Dropdown>
}
</div>:""
}

View File

@ -26,6 +26,22 @@
border-radius: 50%;
margin-left: 30px;
}
.messageHoverDiv{
padding: 20px 17px 13px;
width: 386px;
min-height: 294px;
background: #FFFFFF;
box-shadow: 0px 4px 8px 2px rgba(212,212,212,0.5);
border-radius: 4px;
border: 1px solid red;
.buttom{
display: flex;
justify-content: space-between;
}
}
.currentMenu{
width: 120px;
text-align: center;

View File

@ -14,6 +14,16 @@ import { Link } from 'react-router-dom';
import './Index.scss';
const MyNoticeIndex = Loadable({
loader: () => import("./notice/myNotice/Index"),
loading: Loading,
});
const NoticeManager = Loadable({
loader: () => import("./notice/manager/Index"),
loading: Loading,
});
const SSHNew = Loadable({
loader: () => import("./sub/New"),
loading: Loading,
@ -35,14 +45,31 @@ function Index(props){
<img src={getImageUrl(`/${current_user && current_user.image_url}`)} alt=""/>
<span>{current_user && current_user.username}</span>
</div>
<ul className="securityUl" style={{'border-bottom':'1px solid rgba(153, 153, 153, 0.22)','padding-bottom':'5px'}}>
<li>消息通知</li>
<li className={pathname.indexOf("/settings/notice/myNotice")>-1 ?"active":""}><Link to={`/settings/notice/myNotice`}><i className="iconfont icon-wodetongzhi"></i><span>我的通知</span></Link></li>
<li className={pathname.indexOf("/settings/notice/noticeManager")>-1 ?"active":""}><Link to={`/settings/notice/noticeManager`}><i className="iconfont icon-tongzhiguanli"></i><span>通知管理</span></Link></li>
</ul>
<ul className="securityUl">
<li>安全设置</li>
<li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i>SSH密钥</Link></li>
<li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i><span>SSH密钥</span></Link></li>
</ul>
</div>
<LongWidth>
<Gap>
<Switch>
<Route
path="/settings/notice/myNotice"
render={(p) => (
<MyNoticeIndex {...props} {...p}/>
)}
></Route>
<Route
path="/settings/notice/noticeManager"
render={(p) => (
<NoticeManager {...props} {...p}/>
)}
></Route>
<Route
path="/settings/SSH/new"
render={(p) => (

View File

@ -8,40 +8,42 @@
width: 198px;
border: 1px solid rgba(153, 153, 153, 0.22);
border-radius: 4px;
min-height: 400px;
// min-height: 400px;
margin-bottom: 30px;
.userDetail{
background: rgba(153, 153, 153, 0.05);
border-radius: 4px 4px 0px 0px;
padding:20px 25px;
display: flex;
align-items: center;
justify-content: flex-start;
text-align: center;
height: 105px;
img{
height: 48px;
width: 48px;
border-radius: 50%;
margin-right: 12px;
}
span{
font-size: 16px;
color: #333;
max-width: 90px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 500;
}
}
.securityUl{
padding:20px 16px;
padding-left: 17px;
color: #333;
li{
margin-bottom: 10px;
font-size: 14px;
margin-top: 8px;
margin-bottom: 8px;
height: 27px;
line-height: 27px;
position: relative;
cursor: pointer;
// border: 1px solid;
a{
color: #666;
&:hover{
@ -50,30 +52,38 @@
}
&.active a{
color: #333;
span{
font-weight: 600;
}
&:first-child{
font-size: 16px;
}
&.active::before{
position: absolute;
left: -16px;
top:0px;
height: 100%;
width: 2px;
left: -18px;
top:6px;
height: 15px;
width: 3px;
border-radius: 2px;
content: "";
background-color: #2A61FF;
}
i{
font-size: 14px !important;
margin-right: 8px;
}
}
}
}
.sshHead{
display: flex;
align-items: center;
padding:15px 20px;
padding:6px 0px;
margin-bottom: 15px;
justify-content: space-between;
border-bottom: 1px solid #EEEEEE;
&>span{
font-size: 18px;
font-weight: 600;
}
}
.ant-list-item{