style: add logout icon, and hide profile menu on admin
This commit is contained in:
parent
a115d8488b
commit
fa3fff13f6
|
@ -9,6 +9,7 @@ import {
|
|||
FileProtectOutlined,
|
||||
FileSyncOutlined,
|
||||
HomeOutlined,
|
||||
LogoutOutlined,
|
||||
MenuOutlined,
|
||||
PayCircleOutlined,
|
||||
ProfileOutlined,
|
||||
|
@ -363,17 +364,20 @@ export const DesktopLayout = observer(() => {
|
|||
}}
|
||||
mode="inline"
|
||||
>
|
||||
<Menu.Item>
|
||||
{store.authentication.userData.role !== "Admin" && <Menu.Item>
|
||||
<Link to={LINKS.PROFILE}>
|
||||
<UserOutlined/>
|
||||
<span>Profile</span>
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
}
|
||||
<Menu.Item
|
||||
onClick={() => {
|
||||
store.authentication.logout();
|
||||
history.push("/login");
|
||||
}}
|
||||
>
|
||||
<LogoutOutlined/>
|
||||
<span>Sign out</span>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
|
@ -382,8 +386,9 @@ export const DesktopLayout = observer(() => {
|
|||
<Text>
|
||||
{store.user.data.username}
|
||||
<Paragraph
|
||||
style={{ fontWeight: 400 }}
|
||||
style={{fontWeight: 400, marginTop: '0.5rem'}}
|
||||
type={"secondary-dark"}
|
||||
strong
|
||||
>
|
||||
{store.authentication.userData.username}
|
||||
</Paragraph>
|
||||
|
@ -475,6 +480,7 @@ export const DesktopLayout = observer(() => {
|
|||
history.push("/login");
|
||||
}}
|
||||
>
|
||||
<LogoutOutlined/>
|
||||
<span>Sign out</span>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
|
|
Loading…
Reference in New Issue
Block a user