Merge branch 'master' of https://github.com/ONLYOFFICE/AppServer
This commit is contained in:
commit
e24f2b845e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-common",
|
||||
"version": "1.0.21",
|
||||
"version": "1.0.23",
|
||||
"description": "Ascensio System SIA common components and solutions library",
|
||||
"license": "AGPL-3.0",
|
||||
"files": [
|
||||
|
@ -201,6 +201,7 @@ class Layout extends React.Component {
|
||||
item.onBadgeClick(e);
|
||||
this.toggleAside();
|
||||
}}
|
||||
url={item.url}
|
||||
>
|
||||
{item.title}
|
||||
</NavItem>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import styled, { css } from "styled-components";
|
||||
import { Badge, Icons, Text} from "asc-web-components";
|
||||
import { Badge, Icons, Link} from "asc-web-components";
|
||||
|
||||
const baseColor = "#7A95B0",
|
||||
activeColor = "#FFFFFF",
|
||||
@ -27,7 +27,7 @@ const NavItemWrapper = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
const NavItemLabel = styled(Text)`
|
||||
const NavItemLabel = styled(Link)`
|
||||
margin: 0 auto 0 16px;
|
||||
display: ${props => (props.opened ? "block" : "none")};
|
||||
`;
|
||||
@ -52,7 +52,8 @@ const NavItem = React.memo(props => {
|
||||
children,
|
||||
badgeNumber,
|
||||
onClick,
|
||||
onBadgeClick
|
||||
onBadgeClick,
|
||||
url
|
||||
} = props;
|
||||
const color = active ? activeColor : baseColor;
|
||||
|
||||
@ -66,7 +67,7 @@ const NavItem = React.memo(props => {
|
||||
color: color
|
||||
})}
|
||||
{children && (
|
||||
<NavItemLabel tag="div" opened={opened} color={color} fontSize="16px" fontWeight="bold" truncate>
|
||||
<NavItemLabel opened={opened} color={color} fontSize="16px" fontWeight="bold" truncate href={url}>
|
||||
{children}
|
||||
</NavItemLabel>
|
||||
)}
|
||||
@ -82,17 +83,15 @@ const NavItem = React.memo(props => {
|
||||
NavItem.displayName = "NavItem";
|
||||
|
||||
NavItem.propTypes = {
|
||||
separator: PropTypes.bool,
|
||||
opened: PropTypes.bool,
|
||||
active: PropTypes.bool,
|
||||
iconName: PropTypes.string,
|
||||
badgeNumber: PropTypes.number,
|
||||
onClick: PropTypes.func,
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
||||
url: PropTypes.string,
|
||||
iconName: PropTypes.string,
|
||||
onBadgeClick: PropTypes.func,
|
||||
children: PropTypes.oneOfType([
|
||||
PropTypes.arrayOf(PropTypes.node),
|
||||
PropTypes.node
|
||||
])
|
||||
onClick: PropTypes.func,
|
||||
opened: PropTypes.bool,
|
||||
separator: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default NavItem;
|
||||
|
@ -5,7 +5,7 @@ import { withRouter } from "react-router";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import i18n from "./i18n";
|
||||
import { logout } from "../../store/auth/actions";
|
||||
import PureStudioLayout from "./pureStudioLayout";
|
||||
import PureStudioLayout from "./PureStudioLayout";
|
||||
|
||||
const getSeparator = id => {
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user