From d1d3efb7a6312950ecbe05dc34eac4da4818862f Mon Sep 17 00:00:00 2001 From: Flow Date: Mon, 27 Jun 2022 16:10:40 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=92=84=20Remove=20Support=20Links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Sidebar/FooterMenu.react.js | 69 ---------------------- src/components/Sidebar/Sidebar.react.js | 12 +--- 2 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 src/components/Sidebar/FooterMenu.react.js diff --git a/src/components/Sidebar/FooterMenu.react.js b/src/components/Sidebar/FooterMenu.react.js deleted file mode 100644 index af09f3abf0..0000000000 --- a/src/components/Sidebar/FooterMenu.react.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2016-present, Parse, LLC - * All rights reserved. - * - * This source code is licensed under the license found in the LICENSE file in - * the root directory of this source tree. - */ -import Icon from 'components/Icon/Icon.react'; -import Popover from 'components/Popover/Popover.react'; -import Position from 'lib/Position'; -import React from 'react'; -import styles from 'components/Sidebar/Sidebar.scss'; - -let mountPath = window.PARSE_DASHBOARD_PATH; - -export default class FooterMenu extends React.Component { - constructor() { - super(); - - this.state = { - show: false, - position: null, - }; - this.moreRef = React.createRef(); - } - - toggle() { - let pos = Position.inWindow(this.moreRef.current); - pos.x += 24; - this.setState({ - show: true, - position: pos - }); - } - - render() { - if (this.props.isCollapsed) { - return ( -
- -
- ); - } - - let content = null; - if (this.state.show) { - content = ( - this.setState({ show: false })}> -
- Log Out 👋 - Server Guide 📚 - Code-level Questions - Server Questions - Deployment/Maintenance ⚡️ -
-
- ); - } - return ( - - - {content} - - ); - } -} diff --git a/src/components/Sidebar/Sidebar.react.js b/src/components/Sidebar/Sidebar.react.js index c3c2c6c806..f62b6676bd 100644 --- a/src/components/Sidebar/Sidebar.react.js +++ b/src/components/Sidebar/Sidebar.react.js @@ -8,7 +8,6 @@ import AppsManager from 'lib/AppsManager'; import AppsMenu from 'components/Sidebar/AppsMenu.react'; import AppName from 'components/Sidebar/AppName.react'; -import FooterMenu from 'components/Sidebar/FooterMenu.react'; import isInsidePopover from 'lib/isInsidePopover'; import Pin from 'components/Sidebar/Pin.react'; import React, { useEffect, useState, useContext } from 'react'; @@ -178,16 +177,7 @@ const Sidebar = ({ > {sidebarContent} -
- {!collapsed && ( - <> - Open Source Hub - GitHub - Docs - - )} - -
+ ); } From 1e4f754b947ed91e8119145c5f43d74d56e54ac4 Mon Sep 17 00:00:00 2001 From: Flow Date: Sun, 3 Jul 2022 15:04:43 +0100 Subject: [PATCH 2/3] feat: remove support links keep Log Out --- src/components/Sidebar/Sidebar.react.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/Sidebar/Sidebar.react.js b/src/components/Sidebar/Sidebar.react.js index f62b6676bd..005b12e23f 100644 --- a/src/components/Sidebar/Sidebar.react.js +++ b/src/components/Sidebar/Sidebar.react.js @@ -17,6 +17,8 @@ import SidebarSubItem from 'components/Sidebar/SidebarSubItem.react'; import styles from 'components/Sidebar/Sidebar.scss'; import { CurrentApp } from 'context/currentApp'; +let mountPath = window.PARSE_DASHBOARD_PATH; + const Sidebar = ({ prefix, action, @@ -177,7 +179,13 @@ const Sidebar = ({ > {sidebarContent} - +
+ {!collapsed && ( + <> + Log Out 👋 + + )} +
); } From daf8138437cdd703320a7521f71033369d4fd021 Mon Sep 17 00:00:00 2001 From: Flow Date: Mon, 4 Jul 2022 01:15:34 +0100 Subject: [PATCH 3/3] feat: Log Out as sub-menu inside 3-dots --- src/components/Sidebar/FooterMenu.react.js | 65 ++++++++++++++++++++++ src/components/Sidebar/Sidebar.react.js | 8 +-- src/components/Sidebar/Sidebar.scss | 22 ++++---- 3 files changed, 79 insertions(+), 16 deletions(-) create mode 100644 src/components/Sidebar/FooterMenu.react.js diff --git a/src/components/Sidebar/FooterMenu.react.js b/src/components/Sidebar/FooterMenu.react.js new file mode 100644 index 0000000000..721829c352 --- /dev/null +++ b/src/components/Sidebar/FooterMenu.react.js @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016-present, Parse, LLC + * All rights reserved. + * + * This source code is licensed under the license found in the LICENSE file in + * the root directory of this source tree. + */ +import Icon from 'components/Icon/Icon.react'; +import Popover from 'components/Popover/Popover.react'; +import Position from 'lib/Position'; +import React from 'react'; +import styles from 'components/Sidebar/Sidebar.scss'; + +let mountPath = window.PARSE_DASHBOARD_PATH; + +export default class FooterMenu extends React.Component { + constructor() { + super(); + + this.state = { + show: false, + position: null, + }; + this.moreRef = React.createRef(); + } + + toggle() { + let pos = Position.inWindow(this.moreRef.current); + pos.x += 24; + this.setState({ + show: true, + position: pos + }); + } + + render() { + if (this.props.isCollapsed) { + return ( +
+ +
+ ); + } + + let content = null; + if (this.state.show) { + content = ( + this.setState({ show: false })}> +
+ Log Out +
+
+ ); + } + return ( + + + {content} + + ); + } +} diff --git a/src/components/Sidebar/Sidebar.react.js b/src/components/Sidebar/Sidebar.react.js index 005b12e23f..1a1efac877 100644 --- a/src/components/Sidebar/Sidebar.react.js +++ b/src/components/Sidebar/Sidebar.react.js @@ -8,6 +8,7 @@ import AppsManager from 'lib/AppsManager'; import AppsMenu from 'components/Sidebar/AppsMenu.react'; import AppName from 'components/Sidebar/AppName.react'; +import FooterMenu from 'components/Sidebar/FooterMenu.react'; import isInsidePopover from 'lib/isInsidePopover'; import Pin from 'components/Sidebar/Pin.react'; import React, { useEffect, useState, useContext } from 'react'; @@ -17,7 +18,6 @@ import SidebarSubItem from 'components/Sidebar/SidebarSubItem.react'; import styles from 'components/Sidebar/Sidebar.scss'; import { CurrentApp } from 'context/currentApp'; -let mountPath = window.PARSE_DASHBOARD_PATH; const Sidebar = ({ prefix, @@ -180,11 +180,7 @@ const Sidebar = ({ {sidebarContent}
- {!collapsed && ( - <> - Log Out 👋 - - )} +
); diff --git a/src/components/Sidebar/Sidebar.scss b/src/components/Sidebar/Sidebar.scss index 65e9bfe414..c4635f0528 100644 --- a/src/components/Sidebar/Sidebar.scss +++ b/src/components/Sidebar/Sidebar.scss @@ -352,10 +352,10 @@ a.subitem { .popup { position: absolute; - bottom: 4px; - left: -183px; + bottom: 12px; + left: -64px; background: white; - width: 200px; + width: 100px; border-radius: 5px; &:after { @@ -363,7 +363,7 @@ a.subitem { content: ''; position: absolute; bottom: -6px; - right: 11px; + right: 42px; } a { @@ -372,21 +372,23 @@ a.subitem { height: 30px; line-height: 31px; font-size: 13px; - text-align: right; + text-align: center; border-bottom: 1px solid #e0e0ea; color: $mainTextColor; - padding-right: 8px; &:hover{ background-color: darken(white,4%) } + &:first-child { - border-radius: 5px 5px 0 0; + border-radius: 5px; + // border-radius: 5px 5px 0 0; } &:last-child { - border-bottom: 0; - border-radius: 0 0 5px 5px; + border-radius: 5px; + // border-bottom: 0; + // border-radius: 0 0 5px 5px; } .emoji{ @@ -414,4 +416,4 @@ a.subitem { fill: white; } } -} \ No newline at end of file +}