From b6cf496efa86ab98c158fda16c1c4e566eed2fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 7 Sep 2021 11:14:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E4=B8=AD=E5=BF=83-=E6=88=91?= =?UTF-8?q?=E7=9A=84=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SecuritySetting/notice/manager/Index.jsx | 50 ++++++ .../SecuritySetting/notice/manager/Index.scss | 29 +++ .../SecuritySetting/notice/myNotice/Index.jsx | 167 ++++++++++++++++++ .../notice/myNotice/Index.scss | 160 +++++++++++++++++ 4 files changed, 406 insertions(+) create mode 100644 src/forge/SecuritySetting/notice/manager/Index.jsx create mode 100644 src/forge/SecuritySetting/notice/manager/Index.scss create mode 100644 src/forge/SecuritySetting/notice/myNotice/Index.jsx create mode 100644 src/forge/SecuritySetting/notice/myNotice/Index.scss diff --git a/src/forge/SecuritySetting/notice/manager/Index.jsx b/src/forge/SecuritySetting/notice/manager/Index.jsx new file mode 100644 index 000000000..94bac3d22 --- /dev/null +++ b/src/forge/SecuritySetting/notice/manager/Index.jsx @@ -0,0 +1,50 @@ +import React from "react"; + +import './Index.scss'; + +function NoticeManager(props){ + + return( +
+
+ 通知管理 +
+
+ 您可以通过通知管理来选择接受通知的方式 +
+ 我创建或负责的 +
+
+
易修状态变更
+ + +
+
+
易修截止日期到达最后一天
+ + +
+
+
合并请求状态变更
+ + +
+ +
+ 我管理的仓库 +
+
+
被关注
+ + +
+
+
被点赞
+ + +
+
+
+ ) +} +export default NoticeManager; \ No newline at end of file diff --git a/src/forge/SecuritySetting/notice/manager/Index.scss b/src/forge/SecuritySetting/notice/manager/Index.scss new file mode 100644 index 000000000..987e81118 --- /dev/null +++ b/src/forge/SecuritySetting/notice/manager/Index.scss @@ -0,0 +1,29 @@ + +.cont-top{ + font-size: 14px; + font-weight: 600; + height: 44px; + padding-left: 20px; + background: #FAFCFF; + border: 1px solid #89a4f7; + line-height: 44px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + margin-top: 25px; +} + +.cont{ + padding: 8px 20px 6px; + display: flex; + align-items: center; + font-size: 14px; + + .title{ + width: 320px; + } + + label{ + margin-left: 6px; + margin-right: 34px; + } +} \ No newline at end of file diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.jsx b/src/forge/SecuritySetting/notice/myNotice/Index.jsx new file mode 100644 index 000000000..5a9bfff5d --- /dev/null +++ b/src/forge/SecuritySetting/notice/myNotice/Index.jsx @@ -0,0 +1,167 @@ +import React, { useState, useEffect } from 'react'; +import { Badge, Button, Menu } from 'antd'; +import './Index.scss'; + +function MyNotice(props) { + + const [noticeType, setNoticeType] = useState("2"); + const [selectedNum, setSelectedNum] = React.useState(0); + const [isBatchDelete, setIsBatchDelete] = useState(false); + + function handleClick(e) { + setNoticeType(e.key); + if (e.key != "2") { + setIsBatchDelete(false); + } + // if(e.key==="0"){ + // const contentDiv = document.getElementsByClassName("content"); + // for (var i = 0; i < contentDiv.length; i++) { + // contentDiv[i].className="content baselineDiv"; + // } + // }else{ + // const contentDiv = document.getElementsByClassName("content"); + // for (var i = 0; i < contentDiv.length; i++) { + // contentDiv[i].className="content"; + // } + // } + } + + function onChange() { + var selectedNum = 0; + const checkbox = document.getElementsByClassName("checkbox"); + for (var i = 0; i < checkbox.length; i++) { + checkbox[i].checked ? selectedNum++ : ""; + } + document.getElementById("checkAll").checked = selectedNum === checkbox.length; + setSelectedNum(selectedNum === checkbox.length ? checkbox.length : selectedNum); + } + + + function onCheckAllChange(e) { + const checkbox = document.getElementsByClassName("checkbox"); + for (var i = 0; i < checkbox.length; i++) { + checkbox[i].checked = e.target.checked; + } + setSelectedNum(e.target.checked ? checkbox.length : 0); + } + + + return ( +
+
+ + 系统通知 + 私信 + @我 + + +
+ +
+ +   + 仅看未读{noticeType === "1" ? "私信" : "消息"}(12) + + {noticeType === "2" ? : ""} +
+ +
+ +   + 全选   已选择{selectedNum}项 + +
+      + +
+
+ {noticeType === "1" ? +
+ +
+
+ 蒋宇航 + 4分钟前 + 删除 +
+
+ 最好的OpenStack控制台,对标OpenStack社区Horizon项目,在易用性、页面性能等方面进行深度优化,提供简单控制台。 +
+
+
+ :
+
+ + {/* 系统通知 */} + {noticeType === "0" ? : ""} + {noticeType === "0" ? : ""} + {noticeType === "2" ? : ""} + 蒋宇航在Gitlink/Gitlink新建易修:【Bug】链接地址错误 +
+
+ 4分钟前 + 标记为已读   {noticeType==="0"?"":删除} +
+
} + + {noticeType === "1" ? +
+ +
+
+ 段甲生 + 5分钟前 + 删除 +
+
+ gitlink平台 react 前端代码 +
+
+
+ :
+
+ + {/* 系统通知 */} + {noticeType === "0" ? : ""} + {noticeType === "0" ? : ""} + {noticeType === "2" ? : ""} + 蒋宇航在蒋宇航/软件工程课程协同开发案例指派给你一个合并请求:请进行合并请求test +
+
+ 10分钟前 + 标记为已读   {noticeType==="0"?"":删除} +
+
} + + {noticeType === "1" ? +
+ +
+
+ 巴拉迪维 + 7分钟前 + 删除 +
+
+ 构建卷积神经网络,训练模型,预测模型效果。 +
+
+
+ :
+
+ + {/* 系统通知 */} + {noticeType === "0" ?     : ""} + {noticeType === "0" ? : ""} + {noticeType === "2" ? : ""} + 你关注的仓库王涛/协同案例分析已被删除 +
+
+ 1小时前 + 标记为已读   {noticeType==="0"?"":删除} +
+
} +
+ ) +} +export default MyNotice; \ No newline at end of file diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.scss b/src/forge/SecuritySetting/notice/myNotice/Index.scss new file mode 100644 index 000000000..d4773048f --- /dev/null +++ b/src/forge/SecuritySetting/notice/myNotice/Index.scss @@ -0,0 +1,160 @@ +.sshHead{ + padding:0 10px 0px 0px !important; + .ant-badge{ + font-size: 16px; + font-weight: 500; + } + .ant-menu-item{ + padding:0px; + margin-right:50px!important; + height: 34px; + line-height: 0px; + position: relative; + } + + li.ant-menu-item, .ant-menu-horizontal > .ant-menu-item { + border-bottom: 0px; + } + + .ant-menu-item-selected{ + color: #333333 !important; + font-weight: 700; + border-bottom: 2px solid #2A61FF !important; + } + + .ant-badge-count, .ant-badge-dot, .ant-badge .ant-scroll-number-custom-component { + right: -4px; + } + .ant-badge-multiple-words { + padding: 0 0px; + } + + .ant-menu-horizontal { + border-bottom: 0px solid #e8e8e8; + } + + button{ + padding:0 5px; + } +} + +button { + color: #333333; + background: #FAFBFC; + border: 1px solid #D0D0D0; + border-radius: 4px; +} +button:hover { + background: #F3F4F6; +} +button:active { + background: #EBECF0; +} + +.deleteBut{ + color: #DF0002; +} + +.deleteBut:hover{ + background: #DF0002; + color:#FFFFFF; +} + +.deleteBut:active{ + background: #CE0002; + color:#FFFFFF; +} + +.content { + display: flex; + align-items: center; + justify-content: space-between; + padding: 15px 0 15px 10px; + border-bottom: 1px solid #EEEEEE; + + &:hover{ + background: #F3F4F6; + } + + & a{ + display: none; + } + + &:hover a{ + display: block; + color: #466AFF; + } + + &:hover .timeSpan{ + display: none; + } + + i{ + font-size: 16px !important; + margin-right: 5px; + } + + .boldSpan{ + font-weight: 600; + margin: 0 8px; + } + + img{ + width: 40px; + // margin-right: 10px; + } + + .cont{ + display: flex; + align-items: center; + } +} + +.baselineDiv{ + align-items: baseline; +} + +.invisible { + display: none; +} + +.visible { + display: flex; + justify-content: space-between; + height: 30px; + padding: 0 10px; + color: #333333; + button{ + padding:0px 12px; + } +} + +.ant-badge-count { + min-width: 16px; + height: 16px; + padding: 0 0; + font-size: 8px; + line-height: 16px; +} + +.right { + flex: auto; + margin: 0px 10px; +} + +.right div { + display: flex; + justify-content: space-between; + + span{ + max-width: 640px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } +} + +.highlightSpan:hover{ + color: #466AFF; +} +