您可以通过通知管理来选择接受通知的方式
diff --git a/src/forge/SecuritySetting/notice/manager/Index.scss b/src/forge/SecuritySetting/notice/manager/Index.scss
index 1b5729ae6..87a77a758 100644
--- a/src/forge/SecuritySetting/notice/manager/Index.scss
+++ b/src/forge/SecuritySetting/notice/manager/Index.scss
@@ -24,8 +24,6 @@
.manager-cont-title{
width: 320px;
}
-
-
}
.notice01{
@@ -57,21 +55,33 @@
background-color:#466AFF;
}
- // .ant-radio-checked .ant-radio-inner {
- // border-color: #466AFF;
- // }
-
.but25{
background-color: #466AFF;
color: #fff;
border-color: #466AFF;
&:hover{
- background-color: #4a76f8;
- border-color: #4a76f8;
+ opacity: 0.8;
+ background-color: #466AFF;
+ border-color: #466AFF;
}
&:active{
+ opacity: 1;
background-color: #466AFF;
border-color: #466AFF;
}
}
+
+ ::-webkit-scrollbar {
+ width: 5px; /*对垂直流动条有效*/
+ }
+ /*定义滑块颜色、内阴影及圆角*/
+ ::-webkit-scrollbar-thumb {
+ border-radius: 6px;
+ box-shadow: inset 0 0 6px #FFF;
+ background-color: #D4D4D4;
+ }
+ ::-webkit-scrollbar-track {
+ box-shadow: inset 0 0 6px #fff;
+ background-color: #FFF;
+ }
}
\ No newline at end of file
diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.jsx b/src/forge/SecuritySetting/notice/myNotice/Index.jsx
index 3a5eb1751..a2d5631b9 100644
--- a/src/forge/SecuritySetting/notice/myNotice/Index.jsx
+++ b/src/forge/SecuritySetting/notice/myNotice/Index.jsx
@@ -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("1");
- const [selectedNum, setSelectedNum] = React.useState(0);
+ 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,18 +79,16 @@ function MyNotice(props) {
-
+
- {/*
- 仅看未读{noticeType === "1" ? "私信" : "消息"}(12) */}
- 仅看未读{noticeType === "1" ? "私信" : "消息"}(12)
+ e.target.checked?setOnlyUnread(1):setOnlyUnread(2)}>仅看未读{noticeType === "1" ? `私信(12)` : noticeType==="0"?`消息(${notice_unread_count})`:`消息(${at_unread_count})`}
{noticeType === "2" ?
: ""}
@@ -73,99 +99,49 @@ function MyNotice(props) {
全选 已选择
{selectedNum} 项
-
-
+
+
props.history.push('/settings/notice/privateLetter')}>
-

-
-
-
蒋宇航
-
4分钟前
-
删除
+ {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(
+
+
+ {item.status === 1? :}
+
+ window.location.href=(`${item.notification_url}`)}>{item.content}
+
+
+
{item.time_ago}
+
标记为已读
+
-
-
最好的OpenStack控制台,对标OpenStack社区Horizon项目,最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+ )
+ } else if(noticeType ==="2" && item.type === "atme"){
+ //@我
+ return(
+
+
+
+

+
+ {item.status === 1? :}
+ {item.content}
+
+
+
-
-
- :
-
-
- {/* 系统通知 */}
- {noticeType === "0" ?
: ""}
- {noticeType === "0" ?
: ""}
- {noticeType === "2" ?

: ""}
- {noticeType === "2" ?
: ""}
-
蒋宇航在Gitlink/Gitlink新建易修:【Bug】链接地址错误
-
-
-
4分钟前
-
标记为已读 {noticeType === "0" ? "" :
删除}
-
-
}
-
- {noticeType === "1" ?
-
-

-
-
-
- gitlink平台 react 前端代码
-
-
-
- :
-
-
- {/* 系统通知 */}
- {noticeType === "0" ?
: ""}
- {noticeType === "0" ?
: ""}
- {noticeType === "2" ?

: ""}
- {noticeType === "2" ?
: ""}
-
蒋宇航在蒋宇航/软件工程课程协同开发案例指派给你一个合并请求:请进行合并请求test请进行合并请求test请进行合并请求test请进行合并请求test请进行合并请求test请进行合并请求test
-
-
-
10分钟前
-
标记为已读 {noticeType === "0" ? "" :
删除}
-
-
}
-
- {noticeType === "1" ?
-
-

-
-
-
- 构建卷积神经网络,训练模型,预测模型效果。
-
-
-
- :
-
-
- {/* 系统通知 */}
- {noticeType === "0" ?
: ""}
- {noticeType === "0" ?
: ""}
- {noticeType === "2" ?

: ""}
-
你关注的仓库王涛/协同案例分析已被删除
-
-
-
1小时前
-
标记为已读 {noticeType === "0" ? "" :
删除}
-
-
}
+ )
+ }
+ })}
)
}
diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.scss b/src/forge/SecuritySetting/notice/myNotice/Index.scss
index 6b8afdd87..1a5ee3fb7 100644
--- a/src/forge/SecuritySetting/notice/myNotice/Index.scss
+++ b/src/forge/SecuritySetting/notice/myNotice/Index.scss
@@ -14,8 +14,8 @@
position: relative;
}
- #item{
- margin: 0 34px !important;
+ #item-private{
+ margin: 0 24px 0 34px !important;
}
li.ant-menu-item, .ant-menu-horizontal > .ant-menu-item {
@@ -24,12 +24,15 @@
.ant-menu-item-selected{
color: #333333 !important;
- font-weight: 600;
+ font-weight: 400;
+ text-shadow: 0.5px 0 #333;
border-bottom: 2px solid #2A61FF !important;
}
.ant-badge-count, .ant-badge-dot, .ant-badge .ant-scroll-number-custom-component {
- right: -4px;
+ right: -6px;
+ -webkit-box-shadow: 0 0 0 0;
+ box-shadow: 0 0 0 0;
}
.ant-badge-multiple-words {
padding: 0 0px;
@@ -78,6 +81,7 @@ button:active {
justify-content: space-between;
padding: 15px 0 15px 10px;
border-bottom: 1px solid #EEEEEE;
+ color: #333333;
&:hover{
background: #F3F4F6;
@@ -102,17 +106,44 @@ button:active {
}
.boldSpan{
- font-weight: 600;
+ font-weight: 400;
+ text-shadow: 0.5px 0 0 #333;
margin: 0 8px;
}
-
- img{
+ & .currentImg{
width: 40px;
- // margin-right: 10px;
+ height: 40px;
+ margin-left: 0px;
+ }
+
+ & .private-letter-img + .ant-badge-count{
+ top: 2px;
+ right: 5px;
+ height: 18px;
+ min-width: 18px;
+ line-height: 18px;
+ padding: 0 0;
}
.mynotice-cont{
padding:0;
+
+ & .atme-checkbox{
+ margin-right: 10px;
+ }
+ }
+
+ & .ant-badge-count, .ant-badge-dot, .ant-badge .ant-scroll-number-custom-component {
+ -webkit-box-shadow: 0 0 0 0;
+ box-shadow: 0 0 0 0;
+ top: 3px;
+ right: 4px;
+ min-width: 8px;
+ height: 8px;
+ }
+
+ & .system-notice-blank{
+ margin-right: 14px;
}
}
@@ -130,22 +161,15 @@ button:active {
height: 30px;
padding: 0 10px;
color: #333333;
+ margin-bottom: 5px;
button{
padding:0px 12px;
}
}
-.ant-badge-count {
- min-width: 16px;
- height: 16px;
- padding: 0 0;
- font-size: 8px;
- line-height: 16px;
-}
-
.private-letter-right {
flex: auto;
- margin: 0px 10px;
+ margin: 0px 10px 0 16px;
& div{
display: flex;
justify-content: space-between;
@@ -172,6 +196,7 @@ button:active {
.at-length{
max-width: 48rem;
+ margin-left: 18px;
}
#numberSpan{
color: #466AFF;
diff --git a/src/forge/SecuritySetting/notice/privateLetter/Index.jsx b/src/forge/SecuritySetting/notice/privateLetter/Index.jsx
index be5b1bb36..517583770 100644
--- a/src/forge/SecuritySetting/notice/privateLetter/Index.jsx
+++ b/src/forge/SecuritySetting/notice/privateLetter/Index.jsx
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
import './Index.scss'
import '../manager/Index.scss'
import { Button, Input, Icon, Badge } from 'antd';
+import { Link } from 'react-router-dom';
function PrivateLetter(props){
@@ -15,12 +16,12 @@ function PrivateLetter(props){
-

+
嗨在吗?哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
@@ -30,7 +31,7 @@ function PrivateLetter(props){
-

+
哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
@@ -42,7 +43,7 @@ function PrivateLetter(props){
-

+
@@ -62,7 +63,124 @@ function PrivateLetter(props){
-

+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+

+
+
+ 蒋宇航
+ 4分钟前
+
+
+
最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。
+
删除
+
+
+
+
+
蒋宇航
diff --git a/src/forge/SecuritySetting/notice/privateLetter/Index.scss b/src/forge/SecuritySetting/notice/privateLetter/Index.scss
index 0ac006bd9..6276b7a21 100644
--- a/src/forge/SecuritySetting/notice/privateLetter/Index.scss
+++ b/src/forge/SecuritySetting/notice/privateLetter/Index.scss
@@ -2,18 +2,28 @@
border-radius: 4px 4px 0px 0px;
border: 1px solid rgba(151, 151, 151, 0.24);
display: flex;
+
+ .currentImg{
+ width: 40px;
+ height: 40px;
+ margin-left: 0px;
+ }
+ & .private-letter-img + .ant-badge-count{
+ top: 2px;
+ right: 5px;
+ }
}
.pl-content{
flex: auto;
.pl-name{
height: 3rem;
- // padding-left: 26px;
border-bottom: 1px solid #EEEEEE;
&>a{
position: relative;
left: 26px;
+ color:#999999;
}
span{
font-size: 16px;
@@ -25,7 +35,7 @@
}
.plcontent-list{
height: 24rem;
- padding:25px;
+ padding:20px;
overflow-y: scroll;
.plclo{
@@ -85,7 +95,7 @@
}
}
.private-letter-present{
- padding:20px 28px;
+ padding:20px 20px;
& div{
display: flex;
align-items: center;
@@ -95,21 +105,18 @@
.private-letter-cont-mt25{
margin-top: 8px;
padding:0 22px;
- // background-color: #2A61FF;
- // color: #fff;
- // border-color: #2A61FF;
- // &:hover,&:focus,&:active{
- // background-color: #4a76f8;
- // border-color: #4a76f8;
- // }
}
.private-letter-cont, .private-letter-cont .ant-input-suffix{
- background-color: #F4F4F4 !important;
+ background-color: #fafafa !important;
margin-left: 17px;
}
- .private-letter-cont:hover,.private-letter-cont:focus {
- background-color: #F4F4F4 !important;
+
+ .private-letter-cont{
+ resize:none;
+ &:hover,&:focus{
+ background-color: #fafafa !important;
+ }
}
}
}
@@ -131,6 +138,10 @@
& .ant-btn{
padding: 0;
}
+
+ // & .ant-input:hover{
+ // border: 1px solid red !important;
+ // }
}
.list-scroll{
@@ -159,7 +170,7 @@
.ls-cont{
width: 13rem;
// flex: auto;
- margin-left: 6px;
+ margin-left: 15px;
justify-content: space-between;
& .ls-content-span{
max-width: 11rem;
diff --git a/src/forge/SecuritySetting/sub/New.jsx b/src/forge/SecuritySetting/sub/New.jsx
index 68a65db37..409098e0b 100644
--- a/src/forge/SecuritySetting/sub/New.jsx
+++ b/src/forge/SecuritySetting/sub/New.jsx
@@ -34,7 +34,7 @@ function New({ form , showNotification , history }) {
return(
- SSH密钥添加SSH密钥
+ SSH密钥添加SSH密钥
@@ -51,7 +51,7 @@ function New({ form , showNotification , history }) {
)}
-
+
)
diff --git a/src/forge/SecuritySetting/sub/SSH.jsx b/src/forge/SecuritySetting/sub/SSH.jsx
index 80294b398..330a7851b 100644
--- a/src/forge/SecuritySetting/sub/SSH.jsx
+++ b/src/forge/SecuritySetting/sub/SSH.jsx
@@ -55,8 +55,8 @@ function SSH(props) {
setVisible(false)} onSuccess={onSuccess}/>
setVisibleDesc(false)} desc={content}/>
- SSH密钥
-
+ SSH密钥
+
{
list && list.length > 0 &&