mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed appearance for profile sidebar
This commit is contained in:
parent
42c9fed92c
commit
16d12f92da
11 changed files with 96 additions and 10 deletions
|
@ -6,6 +6,8 @@ import { ProfileAvatar } from '~/components/profile/ProfileAvatar';
|
|||
import { usePatchUser } from '~/hooks/auth/usePatchUser';
|
||||
import { useUser } from '~/hooks/auth/useUser';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface ProfileSidebarHeadProps {}
|
||||
|
||||
const ProfileSidebarHead: VFC<ProfileSidebarHeadProps> = () => {
|
||||
|
@ -17,7 +19,8 @@ const ProfileSidebarHead: VFC<ProfileSidebarHeadProps> = () => {
|
|||
<ProfileAvatar canEdit onChangePhoto={updatePhoto} photo={user.photo} size={72} />
|
||||
|
||||
<Filler>
|
||||
<h2>{user.fullname || user.username}</h2>
|
||||
<div className={styles.name}>{user.fullname || user.username}</div>
|
||||
<div className={styles.username}>{!!user.fullname && `~${user.username}`}</div>
|
||||
</Filler>
|
||||
</Group>
|
||||
);
|
||||
|
|
11
src/containers/profile/ProfileSidebarHead/styles.module.scss
Normal file
11
src/containers/profile/ProfileSidebarHead/styles.module.scss
Normal file
|
@ -0,0 +1,11 @@
|
|||
@import "src/styles/variables";
|
||||
|
||||
.name {
|
||||
font: $font_20_semibold;
|
||||
}
|
||||
|
||||
.username {
|
||||
margin-top: 2px;
|
||||
opacity: 0.5;
|
||||
font: $font_14_medium;
|
||||
}
|
|
@ -37,13 +37,21 @@ const ProfileSidebarMenu: VFC<ProfileSidebarMenuProps> = ({ onClose }) => {
|
|||
<VerticalMenu.Item onClick={() => setActiveTab(2)}>Удалённые посты</VerticalMenu.Item>
|
||||
</VerticalMenu>
|
||||
|
||||
<ProfileStats />
|
||||
<div className={styles.stats}>
|
||||
<ProfileStats />
|
||||
</div>
|
||||
</Group>
|
||||
</Filler>
|
||||
|
||||
<Button round onClick={onClose} color="secondary">
|
||||
Закрыть
|
||||
</Button>
|
||||
<Group className={styles.buttons}>
|
||||
<Button round onClick={onClose} color="outline">
|
||||
Выйти
|
||||
</Button>
|
||||
|
||||
<Button round onClick={onClose} color="outline-white">
|
||||
Закрыть
|
||||
</Button>
|
||||
</Group>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -11,3 +11,11 @@
|
|||
.text {
|
||||
margin-top: $gap * 2;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
flex: 0;
|
||||
}
|
||||
|
||||
.stats {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import React, { VFC } from 'react';
|
||||
|
||||
import { ProfileSidebarNotes } from '~/components/profile/ProfileSidebarNotes';
|
||||
import { ProfileSidebarSettings } from '~/components/profile/ProfileSidebarSettings';
|
||||
import { SidebarStack } from '~/components/sidebar/SidebarStack';
|
||||
import { SidebarStackCard } from '~/components/sidebar/SidebarStackCard';
|
||||
|
@ -19,6 +20,7 @@ const ProfileSidebar: VFC<ProfileSidebarProps> = ({ onRequestClose }) => {
|
|||
|
||||
<SidebarStack.Cards>
|
||||
<ProfileSidebarSettings />
|
||||
<ProfileSidebarNotes />
|
||||
</SidebarStack.Cards>
|
||||
</SidebarStack>
|
||||
</SidebarWrapper>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue