From 1279fcc3db422a79befd206215b61a3cd0f45130 Mon Sep 17 00:00:00 2001 From: srgooglo <38926803+srgooglo@users.noreply.github.com> Date: Sun, 9 Feb 2020 02:20:44 +0100 Subject: [PATCH] 0.1.09T1 --- config/ycore.config.js | 1 - src/components/CustomIcons/index.js | 5 ++-- src/components/Layout/Header.js | 27 +++++++++++++++++---- src/components/Layout/Header.less | 29 +++++++++++++++++++++++ src/components/Layout/R_Sider.js | 4 ++-- src/components/MainSidebar/index.js | 34 +++++++++++---------------- src/components/MainSidebar/index.less | 18 ++++++++++---- src/components/PostCreator/index.js | 14 +++++------ src/components/PostCreator/index.less | 7 +++--- src/layouts/PrimaryLayout.js | 21 +++++------------ src/pages/main/index.js | 16 ++++++------- src/ycore_worker.js | 3 +++ 12 files changed, 110 insertions(+), 69 deletions(-) diff --git a/config/ycore.config.js b/config/ycore.config.js index b8a9bd7e..e4b50416 100644 --- a/config/ycore.config.js +++ b/config/ycore.config.js @@ -44,7 +44,6 @@ module.exports = { }, DevOptions: { defaultSettings: [{id: 'strict_lightMode', value: false}, {id: 'force_collapse', value: false}, {id: 'force_showDevLogs', value: true}], - // Global Behaviors InfiniteLoading: false, InfiniteLogin: false, diff --git a/src/components/CustomIcons/index.js b/src/components/CustomIcons/index.js index f1d55cd5..1662e50b 100644 --- a/src/components/CustomIcons/index.js +++ b/src/components/CustomIcons/index.js @@ -1,5 +1,6 @@ const VerifiedBadge = () => () -const test = () => (' NOthinginhere ') +const CommonThings = () => () -const CustomIcons = {VerifiedBadge, test} + +const CustomIcons = {VerifiedBadge, CommonThings} export default CustomIcons diff --git a/src/components/Layout/Header.js b/src/components/Layout/Header.js index f6b2b7bc..fdc331d1 100644 --- a/src/components/Layout/Header.js +++ b/src/components/Layout/Header.js @@ -1,5 +1,5 @@ import React, { PureComponent, Fragment } from 'react' -import { Menu, Icon, Layout, Avatar, Popover, Badge, List, Switch, Tooltip } from 'antd' +import { Menu, Icon, Layout, Avatar, Popover, Badge, List, Switch, Tooltip, Dropdown, Button } from 'antd' import { Trans, withI18n } from '@lingui/react' import { Ellipsis } from 'ant-design-pro' import classnames from 'classnames' @@ -13,7 +13,12 @@ import moment from 'moment' @withI18n() class Header extends PureComponent { - + constructor(props){ + super(props), + this.state = { + createMenuVisible: false, + } + } isDarkMode = () => { const {theme} = this.props if (theme == "light") { @@ -21,6 +26,19 @@ class Header extends PureComponent { } return true; } + handleCreateMenuVisible() { + this.setState({ createMenuVisible: !this.state.createMenuVisible }); + } + handleOpenMenu() { + let ListControls = [ + (