-
Notifications
You must be signed in to change notification settings - Fork 9
FROZEN. feature: add ims logo #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
|
|
||
| display: grid; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. smth wrong with styles. Logo should be in same level as en/ru languages |
||
| grid-template-columns: minmax(0px, 463px) 1fr; | ||
| grid-template-rows: 80px 1fr; | ||
| grid-template-rows: 72px 1fr; | ||
|
|
||
| min-height: 100%; | ||
|
|
||
|
|
@@ -16,15 +16,13 @@ | |
| display: flex; | ||
| align-items: center; | ||
| justify-content: end; | ||
|
|
||
| padding: 17px 24px; | ||
| } | ||
|
|
||
| .sideBar { | ||
| grid-area: 1/1/3/2; | ||
| grid-row: span 2; | ||
|
|
||
| width: 100%; | ||
| padding: 26px 0px 0px 30px; | ||
| padding: 16px 24px; | ||
|
|
||
| background: #{$beige}; | ||
| } | ||
|
|
@@ -33,7 +31,6 @@ | |
| height: 80px; | ||
| width: 100%; | ||
|
|
||
| padding: 20px 0 0 24px; | ||
| margin-bottom: 25px; | ||
| } | ||
|
|
||
|
|
@@ -49,6 +46,6 @@ | |
|
|
||
| @media (max-width: 1365px) { | ||
| .root { | ||
| grid-template-columns: minmax(0px, 25%) 1fr; | ||
| grid-template-columns: minmax(260px, 25%) 1fr; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,14 @@ import { useDispatch } from 'react-redux'; | |
| import { useNavigate } from 'react-router'; | ||
| import { getHistory } from '@api/requests/userHistory'; | ||
| import Clock from '@assets/images/Clock.svg'; | ||
| import LogoIMS from '@assets/images/LogoIMS.svg'; | ||
| import Plus from '@assets/images/plus.svg'; | ||
| import Sections from '@assets/images/Sections.svg'; | ||
| import { Accordion } from '@components/Accordion'; | ||
| import ErrorBoundary from '@components/ErrorBoundary/ErrorBoundary'; | ||
| import { HistoryPanel } from '@components/HistoryPanel'; | ||
| import { SearchField } from '@components/SearchField'; | ||
| import { useSelector } from '@hooks'; | ||
| import { selectUser, setFormat } from '@store/commonSlice'; | ||
| import { selectRequests, setRequests } from '@store/requestHistorySlice'; | ||
| import styles from './SidePanel.module.scss'; | ||
|
|
||
|
|
@@ -21,11 +21,6 @@ interface IProps { | |
| } | ||
|
|
||
| export const SidePanel: FC<IProps> = ({ className }) => { | ||
| const navigate = useNavigate(); | ||
| const dispatch = useDispatch(); | ||
|
|
||
| const user = useSelector(selectUser); | ||
|
|
||
| const { onAddClick } = useDecompositionContext(); | ||
|
|
||
| const translate = useTranslate(); | ||
|
|
@@ -34,35 +29,19 @@ export const SidePanel: FC<IProps> = ({ className }) => { | |
|
|
||
| const requests = useSelector(selectRequests); | ||
|
|
||
| useEffect(() => { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave as it was for now |
||
| if (!user) return; | ||
| setIsLoading(true); | ||
| (async () => { | ||
| const history = await getHistory(user.sc_addr); | ||
|
|
||
| if (!history) return; | ||
| dispatch(setRequests(history)); | ||
| setIsLoading(false); | ||
| })(); | ||
| }, [dispatch, user]); | ||
|
|
||
| return ( | ||
| <div className={className}> | ||
| <div className={styles.sideBarContent}> | ||
| <div className={styles.searchFieldWrap}> | ||
| <LogoIMS className={styles.logo} /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest to add logic for logo click like it was added here |
||
| <SearchField className={styles.searchField} /> | ||
| </div> | ||
| <div | ||
| className={classNames(styles.accordionContent, { | ||
| [styles.accordionContent_userCanEdit]: !!user?.can_edit, | ||
| [styles.accordionContent_admin]: !!user?.is_admin, | ||
| })} | ||
| > | ||
| <div className={styles.accordionContent_admin}> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest to leave logic as it was without possibility to change sections |
||
| <div> | ||
| <Accordion | ||
| header={translate({ ru: 'Разделы', en: 'Sections' })} | ||
| leftIcon={<Sections />} | ||
| rightIcon={!!user?.is_admin || !!user?.can_edit ? <Plus /> : null} | ||
| rightIcon={<Plus />} | ||
| onRightClick={onAddClick} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave as it was |
||
| expanded | ||
| > | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update title in index.html as well