style: add margin into profile popover
This commit is contained in:
parent
119fa6d0bd
commit
9460935e0a
|
@ -63,6 +63,7 @@ code {
|
||||||
.ant-menu-submenu-arrow{
|
.ant-menu-submenu-arrow{
|
||||||
padding-right: 40px !important;
|
padding-right: 40px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-breadcrumb {
|
.ant-breadcrumb {
|
||||||
margin-bottom: 10px !important;
|
margin-bottom: 10px !important;
|
||||||
}
|
}
|
||||||
|
@ -71,3 +72,7 @@ code {
|
||||||
color: #ed1f24 !important;
|
color: #ed1f24 !important;
|
||||||
border-color: #ed1f24 !important;
|
border-color: #ed1f24 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profile-container .ant-popover-inner-content {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
|
@ -1,32 +1,32 @@
|
||||||
import React, { useState } from "react";
|
import React, {useState} from "react";
|
||||||
import { Button, Drawer, Layout, Menu, Popover, Typography } from "antd";
|
import {Button, Drawer, Layout, Menu, Popover, Typography} from "antd";
|
||||||
import { MenuList } from "./MenuList";
|
import {MenuList} from "./MenuList";
|
||||||
import { Link, useHistory } from "react-router-dom";
|
import {Link, useHistory} from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
HomeOutlined,
|
AlipayOutlined,
|
||||||
MenuOutlined,
|
|
||||||
UserOutlined,
|
|
||||||
ProfileOutlined,
|
|
||||||
DatabaseOutlined,
|
DatabaseOutlined,
|
||||||
FileAddOutlined,
|
FileAddOutlined,
|
||||||
FileSyncOutlined,
|
|
||||||
FileProtectOutlined,
|
FileProtectOutlined,
|
||||||
|
FileSyncOutlined,
|
||||||
|
HomeOutlined,
|
||||||
|
MenuOutlined,
|
||||||
|
PayCircleOutlined,
|
||||||
|
ProfileOutlined,
|
||||||
ShoppingCartOutlined,
|
ShoppingCartOutlined,
|
||||||
AlipayOutlined,
|
UserOutlined
|
||||||
PayCircleOutlined
|
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { AppRoute, LINKS } from "../../routes/app";
|
import {AppRoute, LINKS} from "../../routes/app";
|
||||||
import { useStore } from "../../utils/useStore";
|
import {useStore} from "../../utils/useStore";
|
||||||
import { observer } from "mobx-react-lite";
|
import {observer} from "mobx-react-lite";
|
||||||
import { useMediaQuery } from "react-responsive";
|
import {useMediaQuery} from "react-responsive";
|
||||||
|
|
||||||
const { Text, Paragraph } = Typography;
|
const {Text, Paragraph} = Typography;
|
||||||
const { Header, Content, Sider } = Layout;
|
const {Header, Content, Sider} = Layout;
|
||||||
const { SubMenu } = Menu;
|
const {SubMenu} = Menu;
|
||||||
|
|
||||||
export const DesktopLayout = observer(() => {
|
export const DesktopLayout = observer(() => {
|
||||||
let history = useHistory();
|
let history = useHistory();
|
||||||
const xl = useMediaQuery({ minWidth: 1024 });
|
const xl = useMediaQuery({minWidth: 1024});
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const [clicked, setClicked] = useState(false);
|
const [clicked, setClicked] = useState(false);
|
||||||
|
|
||||||
|
@ -460,11 +460,14 @@ export const DesktopLayout = observer(() => {
|
||||||
}}
|
}}
|
||||||
mode="inline"
|
mode="inline"
|
||||||
>
|
>
|
||||||
<Menu.Item key={"profile"}>
|
{store.authentication.userData.role !== "Admin" && (
|
||||||
|
<Menu.Item key="profile">
|
||||||
<Link to={LINKS.PROFILE}>
|
<Link to={LINKS.PROFILE}>
|
||||||
|
<UserOutlined/>
|
||||||
<span>Profile</span>
|
<span>Profile</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
)}
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
key={"logout"}
|
key={"logout"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -478,10 +481,10 @@ export const DesktopLayout = observer(() => {
|
||||||
}
|
}
|
||||||
title={
|
title={
|
||||||
<Text>
|
<Text>
|
||||||
{store.user.data.email}{" "}
|
|
||||||
<Paragraph
|
<Paragraph
|
||||||
style={{ fontWeight: 400 }}
|
style={{fontWeight: 400, marginTop: '0.5rem'}}
|
||||||
type={"secondary-dark"}
|
type={"secondary-dark"}
|
||||||
|
strong
|
||||||
>
|
>
|
||||||
{store.authentication.userData.username}
|
{store.authentication.userData.username}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user