diff --git a/src/forge/Head/NoticeContent.jsx b/src/forge/Head/NoticeContent.jsx
index 3f5ef254c..ff715ad42 100644
--- a/src/forge/Head/NoticeContent.jsx
+++ b/src/forge/Head/NoticeContent.jsx
@@ -226,7 +226,7 @@ function NoticeContent({ visible, showNotification, resetUserInfo, current_user:
)
}) : "暂无数据" : ""} */}
diff --git a/src/forge/Notice/Index.jsx b/src/forge/Notice/Index.jsx
index 3f61688fb..73a2561bd 100644
--- a/src/forge/Notice/Index.jsx
+++ b/src/forge/Notice/Index.jsx
@@ -10,10 +10,6 @@ const Apply = Loadable({
loader: () => import("./Apply"),
loading: Loading,
});
-const Notify = Loadable({
- loader: () => import("./Notify"),
- loading: Loading,
-});
const UndoEvent = Loadable({
loader: () => import("./UndoEvent"),
loading: Loading,
@@ -23,7 +19,7 @@ function Index(props){
const pathname = props.history.location.pathname;
const user = props.user;
- const [ menu , setMenu ] = useState("notify");
+ const [ menu , setMenu ] = useState("undo");
const [ messagesCount , setMessagesCount ] = useState(0);
const [ transferCount , setTransferCount ] = useState(0);
const [ applyCount , setApplyCount ] = useState(0);
@@ -48,10 +44,6 @@ function Index(props){
useEffect(()=>{
if(pathname && username){
if(pathname === `/${username}/notice`){
- setMenu("notify");
- changeNum(user.undo_messages);
- }
- if(pathname === `/${username}/notice/undo`){
setMenu("undo");
}
if(pathname === `/${username}/notice/apply`){
@@ -83,14 +75,8 @@ function Index(props){
return (
- -
-
- 通知
- {messagesCount ? {messagesCount}:""}
-
-
-
-
+
接收仓库
{transferCount ? {transferCount}:""}
@@ -109,16 +95,10 @@ function Index(props){
return ;
}}
>
- {
- return ;
- }}
- >
{
- return ;
+ return ;
}}
>
diff --git a/src/forge/SecuritySetting/Index.jsx b/src/forge/SecuritySetting/Index.jsx
index 65a800486..4a9430c0f 100644
--- a/src/forge/SecuritySetting/Index.jsx
+++ b/src/forge/SecuritySetting/Index.jsx
@@ -61,7 +61,7 @@ function Index(props){
- 消息通知
- - -1 || pathname.indexOf("/settings/notice/privateLetter")>-1 ?"active":""}>我的通知
+ - -1 || pathname.indexOf("/settings/notice/privateLetter")>-1 ?"active":""}>我的通知
{/* - -1 ?"active":""}>通知管理
*/}
@@ -73,7 +73,7 @@ function Index(props){
(
)}
diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.jsx b/src/forge/SecuritySetting/notice/myNotice/Index.jsx
index 0f28b32c2..69a154165 100644
--- a/src/forge/SecuritySetting/notice/myNotice/Index.jsx
+++ b/src/forge/SecuritySetting/notice/myNotice/Index.jsx
@@ -10,7 +10,8 @@ import '../manager/Index.scss'
function MyNotice(props) {
let current_user = props.current_user;
- let pageSize = 20;
+ let resetUserInfo = props.resetUserInfo;
+ let pageSize = 15;
const [noticeType, setNoticeType] = useState("0");//消息类别tab栏选择
const [selectedNum, setSelectedNum] = useState(0);//@我批量删除选择消息条数
@@ -61,7 +62,10 @@ function MyNotice(props) {
ids:id,
};
axios.post(`/users/${current_user.login}/messages/read.json`,params).then((response)=>{
- response.status === 0 && getMessageList();
+ if(response.status === 200){
+ getMessageList();
+ resetUserInfo();
+ }
});
}
}
@@ -101,33 +105,41 @@ function MyNotice(props) {
}
function deleteNotice(id) {
-
const ids = [];
- console.log(messageList);
if(!id){
messageList.map(item=>{
item.checkedBatch && ids.push(item.id);
});
}
- console.log(ids);
- DelModal({
- title: noticeType === "1" ? '删除私信' : '删除与我相关',
- contentTitle: noticeType === "1" ? '您确定要删除与 xxx 的聊天吗?' : id ? '您确定要删除这条@我消息吗?' : '您确定要删除选中的' + selectedNum + '条消息吗?',
- content: noticeType === "1" ? '此操作将删除与xxx的聊天框和xxx的所有聊天记录,请进行确认以防数据的丢失' : id ? '此操作将删除这条消息,请进行确认以防数据的丢失' : '此操作将删除选中的' + selectedNum + '条消息,请进行确认以防数据的丢失',
- onOk: () => {
- const params = {
- type: noticeType === "0" ? "notification" : noticeType === "2" ? "atme" : "",
- ids:id?id:ids,
- };
- console.log(params);
- axios.delete(`/users/${current_user.login}/messages.json`,{
- data:params,
- }).then((response)=>{
- response.status === 0 && getMessageList();
- });
- }
- });
-
+ DelModal({
+ title: noticeType === "1" ? '删除私信用户' : id ? '删除消息' : '批量删除',
+ contentTitle: noticeType === "1" ? '您确定要删除与 xxx 的聊天吗?' : id ? '您确定要删除这条@我消息吗?' : '您确定要删除选中的' + selectedNum + '条消息吗?',
+ content: noticeType === "1" ? '此操作将删除与xxx的聊天框和xxx的所有聊天记录,请进行确认以防数据的丢失' : id ? '此操作将删除这条消息,请进行确认以防数据的丢失' : '此操作将删除选中的' + selectedNum + '条消息,请进行确认以防数据的丢失',
+ onOk: () => {
+ const params = {
+ type: noticeType === "0" ? "notification" : noticeType === "2" ? "atme" : "",
+ ids:id?id:ids,
+ };
+ axios.delete(`/users/${current_user.login}/messages.json`,{
+ data:params,
+ }).then((response)=>{
+ response.status === 200 && getMessageList();
+ });
+ },
+ onCancel: cancelBatchDelete
+ });
+ }
+
+ function cancelBatchDelete(){
+ setIsBatchDelete(false);
+ setSelectedNum(0);
+ //取消选中效果
+ let messageListNew=messageList.slice();
+ messageListNew.map((item)=>{
+ item.checkedBatch = false;
+ });
+ setMessageList(messageListNew);
+ setBatchDeleteCheckAll(false);
}
return (
@@ -138,14 +150,14 @@ function MyNotice(props) {
{/* 私信 */}
@我
-
+ {(noticeType==="0" && noticeUnreadCount>0) || (noticeType==="2"&& atUnreadCount>0) ? :""}
- e.target.checked ? setOnlyUnread(1) : setOnlyUnread()}>仅看未读{noticeType === "1" ? `私信(12)` : noticeType === "0" ? `消息(${noticeUnreadCount})` : `消息(${atUnreadCount})`}
+ {onlyUnread===1 || messageList.length>0 ? e.target.checked ? setOnlyUnread(1) : setOnlyUnread()}>仅看未读{noticeType === "1" ? `私信(12)` : noticeType === "0" ? `消息(${noticeUnreadCount})` : `消息(${atUnreadCount})`}:""}
- {noticeType === "2" && messageList.length > 0 ?
: ""}
+ {noticeType === "2" && messageList.length > 0 ?
: ""}
{messageList.length===0 ? :""}
@@ -157,7 +169,7 @@ function MyNotice(props) {
已选择 {selectedNum} 项
-
+
}
@@ -171,7 +183,7 @@ function MyNotice(props) {
{item.status === 1 ? : }
- window.open("https://"+`${item.notification_url}`)}>{item.content}
+ {item.notification_url && window.open("https://"+`${item.notification_url}`)}} dangerouslySetInnerHTML={{__html: item.content}}>
{item.time_ago}
@@ -189,7 +201,7 @@ function MyNotice(props) {
{item.sender &&
}
{item.status === 1 ? : }
-
{item.content}
+
{item.notification_url && window.open("https://"+`${item.notification_url}`)}} dangerouslySetInnerHTML={{__html: item.content}}>
@@ -203,7 +215,7 @@ function MyNotice(props) {
})}
{/* 分页 */}
-
}
{/* 私信 */}
{/*
diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.scss b/src/forge/SecuritySetting/notice/myNotice/Index.scss
index b4a02b351..1805021bf 100644
--- a/src/forge/SecuritySetting/notice/myNotice/Index.scss
+++ b/src/forge/SecuritySetting/notice/myNotice/Index.scss
@@ -138,12 +138,17 @@ button:active {
position: relative;
margin-left: 12px;
max-width: 48rem;
+ word-break: break-all;
& .at-badge{
position:absolute;
}
& .highlightSpan{
- margin-left: 12px;
+ // margin-left: 12px;
+ &:hover{
+ color: #466AFF;
+ cursor: pointer;
+ }
}
}
}
@@ -180,6 +185,10 @@ button:active {
button{
padding:0px 12px;
}
+ .batchDeleteBut{
+ border:1px solid #466AFF;
+ color: #466AFF;
+ }
}
.private-letter-right {
@@ -191,13 +200,6 @@ button:active {
}
}
-.highlightSpan{
- &:hover{
- color: #466AFF;
- cursor: pointer;
- }
-}
-
.letter-length-limit{
max-width: 50rem;
overflow: hidden;
@@ -207,6 +209,7 @@ button:active {
.sysNotice-length{
max-width: 52rem;
+ word-break: break-all;
}
@@ -228,19 +231,11 @@ button:active {
margin-right: 10px;
}
-.paging{
- float: right;
- margin: 12px;
+.float-right-little{
+ margin-left: 12px;
}
-// .invisible_checkGroup{
-// & .ant-checkbox-inner{
-// display: none;
-// }
-// }
-// .notice01{
-// & .ant-checkbox-group{
-// display: flex;
-// flex-direction: column;
-// }
-// }
\ No newline at end of file
+.paging{
+ text-align: center;
+ margin: 12px;
+}
\ No newline at end of file
diff --git a/src/forge/users/Material/Index.jsx b/src/forge/users/Material/Index.jsx
index 869c1877f..8833c6543 100644
--- a/src/forge/users/Material/Index.jsx
+++ b/src/forge/users/Material/Index.jsx
@@ -1,10 +1,10 @@
import React , { useEffect , useState } from 'react';
-import './Index.scss';
-import '../../SecuritySetting/notice/manager/Index.scss'
import { Menu } from 'antd';
import { Link } from 'react-router-dom';
import Base from './Base';
import Password from './Password';
+import './Index.scss';
+import '../../SecuritySetting/notice/manager/Index.scss';
function Index(props){
// const { username } = props && props.match && props.match.params;