mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
Добавили заметки в сайдбар (#126)
* added notes sidebar * added note dropping and editing * added sidebar navigation * handling sidebarchanges over time * using router back for closing sidebar * fixed tripping inside single sidebar * added superpowers toggle to sidebar * user button opens sidebar now * added profile cover for profile sidebar * removed profile sidebar completely * ran prettier over project * added note not found error literal
This commit is contained in:
parent
fe3db608d6
commit
5d34090238
72 changed files with 1241 additions and 664 deletions
|
@ -26,17 +26,19 @@ const ProfilePageLeft: FC<IProps> = ({ username, profile, isLoading }) => {
|
|||
/>
|
||||
|
||||
<div className={styles.region}>
|
||||
<div className={styles.name}>{isLoading ? <Placeholder /> : profile?.fullname}</div>`
|
||||
<div className={styles.name}>
|
||||
{isLoading ? <Placeholder /> : profile?.fullname}
|
||||
</div>
|
||||
`
|
||||
<div className={styles.username}>
|
||||
{isLoading ? <Placeholder /> : `~${profile?.username}`}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!!profile?.description && (
|
||||
<Markdown
|
||||
className={styles.description}
|
||||
dangerouslySetInnerHTML={{ __html: formatText(profile.description) }}
|
||||
/>
|
||||
<Markdown className={styles.description}>
|
||||
{formatText(profile.description)}
|
||||
</Markdown>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -15,6 +15,7 @@ import { useAuth } from '~/hooks/auth/useAuth';
|
|||
import markdown from '~/styles/common/markdown.module.scss';
|
||||
|
||||
import { ProfileSidebarLogoutButton } from '../ProfileSidebarLogoutButton';
|
||||
import { ProfileToggles } from '../ProfileToggles';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
|
@ -40,9 +41,19 @@ const ProfileSidebarMenu: VFC<ProfileSidebarMenuProps> = ({ onClose }) => {
|
|||
<Filler className={classNames(markdown.wrapper, styles.text)}>
|
||||
<Group>
|
||||
<VerticalMenu className={styles.menu}>
|
||||
<VerticalMenu.Item onClick={() => setActiveTab(0)}>Настройки</VerticalMenu.Item>
|
||||
<VerticalMenu.Item onClick={() => setActiveTab(0)}>
|
||||
Настройки
|
||||
</VerticalMenu.Item>
|
||||
|
||||
<VerticalMenu.Item onClick={() => setActiveTab(1)}>
|
||||
Заметки
|
||||
</VerticalMenu.Item>
|
||||
</VerticalMenu>
|
||||
|
||||
<div className={styles.toggles}>
|
||||
<ProfileToggles />
|
||||
</div>
|
||||
|
||||
<div className={styles.stats}>
|
||||
<ProfileStats />
|
||||
</div>
|
||||
|
@ -51,7 +62,7 @@ const ProfileSidebarMenu: VFC<ProfileSidebarMenuProps> = ({ onClose }) => {
|
|||
|
||||
<Group className={styles.buttons} horizontal>
|
||||
<Filler />
|
||||
<ProfileSidebarLogoutButton onLogout={onLogout}/>
|
||||
<ProfileSidebarLogoutButton onLogout={onLogout} />
|
||||
</Group>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -19,3 +19,7 @@
|
|||
.stats {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toggles {
|
||||
padding-top: $gap * 2;
|
||||
}
|
||||
|
|
17
src/containers/profile/ProfileToggles/index.tsx
Normal file
17
src/containers/profile/ProfileToggles/index.tsx
Normal file
|
@ -0,0 +1,17 @@
|
|||
import React, { FC } from 'react';
|
||||
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { Zone } from '~/components/containers/Zone';
|
||||
import { SuperPowersToggle } from '~/containers/auth/SuperPowersToggle';
|
||||
|
||||
interface ProfileTogglesProps {}
|
||||
|
||||
const ProfileToggles: FC<ProfileTogglesProps> = () => (
|
||||
<Zone>
|
||||
<Group>
|
||||
<SuperPowersToggle />
|
||||
</Group>
|
||||
</Zone>
|
||||
);
|
||||
|
||||
export { ProfileToggles };
|
Loading…
Add table
Add a link
Reference in a new issue