import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import * as antd from 'antd' import { withI18n, Trans } from '@lingui/react' import ScrollBar from '../ScrollBar' import { config } from 'utils' import styles from './Sider.less' import * as ycore from 'ycore'; import router from 'umi/router'; import {CustomIcons} from 'components' const userData = ycore.SDCP() @withI18n() class Sider extends PureComponent { constructor(props) { super(props); this.state = { isHover: false }; this.hover = this.hover.bind(this); } hover(e) { this.setState({ isHover: !this.state.isHover }); } Balancer() { const { collapsed, } = this.props; const { isHover } = this.state; if (collapsed == false) { return false } if (isHover == false ){ if (collapsed == true) { return true } return true }else{ return false } } StrictMode = () =>{ const { theme } = this.props; if (ycore.DevOptions.StrictLightMode == false) { return "dark" } return theme } handleClickMenu = e => { e.key === 'SignOut' && ycore.LogoutCall() e.key === 'general_settings' && ycore.crouter.native('settings') e.key === 'accountpage' && router.push('/account') } isDarkMode(){ const { theme } = this.props if (theme == 'dark'){ return true } return false } render() { const { i18n, menus, theme, isMobile, collapsed, onThemeChange, onCollapseChange, } = this.props return (