From de95c92e2d18de7f8906ddda1b3b84668e0c4014 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 14 Sep 2020 23:46:40 +0200 Subject: [PATCH] Sidebar tweaks (#6994) --- src/components/ha-sidebar.ts | 79 +++++++++++++------------- src/layouts/home-assistant-main.ts | 49 +++++++++++----- src/panels/profile/ha-panel-profile.ts | 2 +- src/resources/ha-sortable-style.ts | 26 +++++++++ src/state/sidebar-mixin.ts | 2 - 5 files changed, 104 insertions(+), 54 deletions(-) diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 028fe8defd..3266046064 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -159,8 +159,6 @@ const computePanels = memoizeOne( let Sortable; -let sortStyles: CSSResult; - @customElement("ha-sidebar") class HaSidebar extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; @@ -171,12 +169,12 @@ class HaSidebar extends LitElement { @property({ type: Boolean, reflect: true }) public expanded = false; + @property({ type: Boolean }) public editMode = false; + @internalProperty() private _externalConfig?: ExternalConfig; @internalProperty() private _notifications?: PersistentNotification[]; - @internalProperty() private _editMode = false; - // property used only in css // @ts-ignore @property({ type: Boolean, reflect: true }) public rtl = false; @@ -227,19 +225,12 @@ class HaSidebar extends LitElement { } return html` - ${this._editMode - ? html` - - ` - : ""}