diff --git a/public/assets/menu/arrow_left.svg b/public/assets/menu/arrow_left.svg deleted file mode 100644 index aa76378..0000000 --- a/public/assets/menu/arrow_left.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/assets/menu/arrow_right.svg b/public/assets/menu/arrow_right.svg deleted file mode 100644 index f597d99..0000000 --- a/public/assets/menu/arrow_right.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/ts/components/LineChart/index.tsx b/src/ts/components/LineChart/index.tsx index 88610f5..cc8d61d 100644 --- a/src/ts/components/LineChart/index.tsx +++ b/src/ts/components/LineChart/index.tsx @@ -25,6 +25,7 @@ function LineChart({ let width = Math.round((value || 100) * (100 / options.max)); if (width < 1) return null; + if (width > 100) width = 100; if (!details) { return ( diff --git a/src/ts/components/LineChart/styles/index.module.scss b/src/ts/components/LineChart/styles/index.module.scss index 32f2cee..7fdf1bf 100644 --- a/src/ts/components/LineChart/styles/index.module.scss +++ b/src/ts/components/LineChart/styles/index.module.scss @@ -26,6 +26,7 @@ overflow: hidden; line-height: var(--line_chart-height); text-align: left; + color: var(--color-white); background-color: #D0D1D2; -webkit-print-color-adjust: exact; diff --git a/src/ts/components/Table/components/cells/CellDetails.tsx b/src/ts/components/Table/components/cells/CellDetails.tsx index a74449a..3111bf4 100644 --- a/src/ts/components/Table/components/cells/CellDetails.tsx +++ b/src/ts/components/Table/components/cells/CellDetails.tsx @@ -59,7 +59,7 @@ function DetailsCell({ {hasIcon && ( )} diff --git a/src/ts/components/Table/styles/index.module.scss b/src/ts/components/Table/styles/index.module.scss index 8133f44..b44edd3 100644 --- a/src/ts/components/Table/styles/index.module.scss +++ b/src/ts/components/Table/styles/index.module.scss @@ -83,17 +83,6 @@ line-height: var(--table-cell-height); background-color: var(--color-white); } - //&_cell:first-child, - //&_header_cell:first-child { - // position: sticky; - // top: 0; - // left: 0; - // z-index: 1; - //} - // - //&_cell:first-child { - // background-color: rgba(255, 255, 255, 0.9); - //} &_cell_number { text-align: right; @@ -108,10 +97,11 @@ margin-top: 8px; cursor: pointer; transition: transform 0.5s; + transform: rotate(0); } &_open { - transform: rotate(90deg); + transform: rotate(-180deg); } } } diff --git a/src/ts/pages/PageWrapper/components/sidebar/ScrollUp.tsx b/src/ts/pages/PageWrapper/components/sidebar/ScrollUp.tsx new file mode 100644 index 0000000..f561b3f --- /dev/null +++ b/src/ts/pages/PageWrapper/components/sidebar/ScrollUp.tsx @@ -0,0 +1,43 @@ +import React, { useEffect, useState } from 'react'; + +import style from '../../styles/scrollUp.module.scss'; + +function scrollTop() { + if (!window.scrollY) return; + const top = window.scrollY * 0.7; + window.scrollTo(0, top > 20 ? top : 0); + setTimeout(scrollTop, 30); +} + +function SideBarScrollUp() { + const [isShow, setShow] = useState(false); + + useEffect(() => { + function updateScroll() { + setShow(window.scrollY > document.body.offsetHeight); + } + + window.addEventListener('scroll', updateScroll); + return () => { + window.removeEventListener('scroll', updateScroll); + }; + }, [window.scrollY]); + + if (!isShow) return null; + + return ( +
{ + scrollTop(); + }} + > + +
+ ); +} + +export default SideBarScrollUp; diff --git a/src/ts/pages/PageWrapper/components/sidebar/index.tsx b/src/ts/pages/PageWrapper/components/sidebar/index.tsx index 0cb5cb0..548eaca 100644 --- a/src/ts/pages/PageWrapper/components/sidebar/index.tsx +++ b/src/ts/pages/PageWrapper/components/sidebar/index.tsx @@ -4,6 +4,7 @@ import { useNavigate, useParams } from 'react-router-dom'; import Logo from './Logo'; import Switch from './Switch'; import SideBarButtons from './Buttons'; +import SideBarScrollUp from './ScrollUp'; import style from '../../styles/sidebar.module.scss'; import { TYPES } from '../../helpers/menu'; @@ -29,6 +30,7 @@ function SideBar() { }} /> + ); } diff --git a/src/ts/pages/PageWrapper/styles/scrollUp.module.scss b/src/ts/pages/PageWrapper/styles/scrollUp.module.scss new file mode 100644 index 0000000..f15b99a --- /dev/null +++ b/src/ts/pages/PageWrapper/styles/scrollUp.module.scss @@ -0,0 +1,64 @@ +@import 'src/styles/variables'; + +.scroll_up_button { + position: fixed; + top: 0; + bottom: 0; + left: 0; + + display: flex; + justify-content: center; + align-items: center; + width: 240px; + + cursor: pointer; + text-align: center; + text-decoration: none; + + opacity: 0; + transition: opacity 0.5s; + background-color: rgba(255, 255, 255, 0.02); + + &:hover { + opacity: 1; + } + + &_icon { + position: relative; + top: 50px; + + display: block; + width: 32px; + height: 32px; + margin: 0 auto; + + transform: rotate(180deg); + animation: scroll_up_button_icon linear 2s backwards infinite; + } +} + +@keyframes scroll_up_button_icon { + from { + opacity: 0; + top: 50px; + } + 50% { + opacity: 1; + } + to { + opacity: 0; + top: -50px; + } +} + +@media (max-width: 1000px) { + .scroll_up_button { + width: 60px; + } +} + +@media (max-width: 700px) { + .scroll_up_button { + display: none; + } +} diff --git a/src/ts/pages/Team/components/PR/All.tsx b/src/ts/pages/Team/components/PR/All.tsx index b8d134b..d4b55d8 100644 --- a/src/ts/pages/Team/components/PR/All.tsx +++ b/src/ts/pages/Team/components/PR/All.tsx @@ -30,10 +30,7 @@ function AllPR({ const workChart = getOptions({ max: getMax(response, 'workDays') }); const delayChart = getOptions({ max: getMax(response, 'delayDays') }); - const commitsChart = getOptions({ - max: getMax(response, 'commits'), - order: dataGripStore.dataGrip.author.list, - }); + const commitsChart = getOptions({ order: dataGripStore.dataGrip.author.list }); return (