From 97eb660200565b297aa79b4061ee6fb01e226efa Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 12 Nov 2021 13:09:11 +0000 Subject: [PATCH] Wire up Space panel disablement --- res/css/structures/_LeftPanel.scss | 4 +++ res/css/structures/_SpacePanel.scss | 6 ++++ res/css/structures/_UserMenu.scss | 3 -- src/components/structures/LeftPanel.tsx | 11 ++++++- src/components/structures/LoggedInView.tsx | 19 ++++++++++- src/components/views/rooms/RoomListHeader.tsx | 5 ++- .../tabs/user/SidebarUserSettingsTab.tsx | 3 ++ src/i18n/strings/en_EN.json | 2 ++ src/settings/Settings.tsx | 9 +++++- src/stores/room-list/SpaceWatcher.ts | 32 +++++++++++++++---- 10 files changed, 80 insertions(+), 14 deletions(-) diff --git a/res/css/structures/_LeftPanel.scss b/res/css/structures/_LeftPanel.scss index f8ca34a0c71..0bf6cdcbe68 100644 --- a/res/css/structures/_LeftPanel.scss +++ b/res/css/structures/_LeftPanel.scss @@ -111,6 +111,10 @@ $roomListCollapsedWidth: 68px; display: flex; align-items: center; + .mx_UserMenu { + margin-right: 12px; + } + & + .mx_RoomListHeader { margin-top: 12px; } diff --git a/res/css/structures/_SpacePanel.scss b/res/css/structures/_SpacePanel.scss index 6749134a2c5..b2a3cef1b93 100644 --- a/res/css/structures/_SpacePanel.scss +++ b/res/css/structures/_SpacePanel.scss @@ -349,6 +349,12 @@ $activeBorderColor: $primary-content; mask-image: linear-gradient(180deg, transparent, black 5%, black 95%, transparent); } } + + .mx_UserMenu { + padding: 0 2px 8px; + border-bottom: 1px solid $quinary-content; + margin: 12px 14px 4px 18px; + } } .mx_SpacePanel_contextMenu { diff --git a/res/css/structures/_UserMenu.scss b/res/css/structures/_UserMenu.scss index 4545ecc0e60..66b89975e88 100644 --- a/res/css/structures/_UserMenu.scss +++ b/res/css/structures/_UserMenu.scss @@ -15,9 +15,6 @@ limitations under the License. */ .mx_UserMenu { - padding: 0 2px 8px; - border-bottom: 1px solid $quinary-content; - margin: 12px 14px 4px 18px; box-sizing: border-box; display: flex; align-items: center; diff --git a/src/components/structures/LeftPanel.tsx b/src/components/structures/LeftPanel.tsx index 36038f6d9bc..c950e2d44f6 100644 --- a/src/components/structures/LeftPanel.tsx +++ b/src/components/structures/LeftPanel.tsx @@ -43,10 +43,12 @@ import { UPDATE_EVENT } from "../../stores/AsyncStore"; import IndicatorScrollbar from "./IndicatorScrollbar"; import RoomBreadcrumbs from "../views/rooms/RoomBreadcrumbs"; import SettingsStore from "../../settings/SettingsStore"; +import UserMenu from "./UserMenu"; interface IProps { isMinimized: boolean; resizeNotifier: ResizeNotifier; + showUserMenu: boolean; } enum BreadcrumbsMode { @@ -380,6 +382,8 @@ export default class LeftPanel extends React.Component { onBlur={this.onBlur} onKeyDown={this.onKeyDown} > + { this.props.showUserMenu && } + {