diff --git a/src/common/entity/domain_icon.ts b/src/common/entity/domain_icon.ts
index 665897b187..783fd1bb5c 100644
--- a/src/common/entity/domain_icon.ts
+++ b/src/common/entity/domain_icon.ts
@@ -7,6 +7,7 @@ import { DEFAULT_DOMAIN_ICON } from "../const";
const fixedIcons = {
alert: "hass:alert",
+ alexa: "hass:amazon-alexa",
automation: "hass:playlist-play",
calendar: "hass:calendar",
camera: "hass:video",
@@ -15,6 +16,7 @@ const fixedIcons = {
conversation: "hass:text-to-speech",
device_tracker: "hass:account",
fan: "hass:fan",
+ google_assistant: "hass:google-assistant",
group: "hass:google-circles-communities",
history_graph: "hass:chart-line",
homeassistant: "hass:home-assistant",
diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts
index 16ef6184cc..b5eb5294d8 100644
--- a/src/components/ha-sidebar.ts
+++ b/src/components/ha-sidebar.ts
@@ -66,11 +66,28 @@ const computePanels = (hass: HomeAssistant) => {
return result;
};
+const renderPanel = (hass, panel) => html`
+
+
+
+
+ ${hass.localize(`panel.${panel.title}`) || panel.title}
+
+
+
+`;
+
/*
* @appliesMixin LocalizeMixin
*/
class HaSidebar extends LitElement {
@property() public hass?: HomeAssistant;
+ @property({ type: Boolean }) public alwaysExpand = false;
+ @property({ type: Boolean, reflect: true }) public expanded = false;
@property() public _defaultPage?: string =
localStorage.defaultPage || DEFAULT_PANEL;
@property() private _externalConfig?: ExternalConfig;
@@ -82,17 +99,25 @@ class HaSidebar extends LitElement {
return html``;
}
+ const panels = computePanels(hass);
+ const configPanelIdx = panels.findIndex(
+ (panel) => panel.component_name === "config"
+ );
+ const configPanel =
+ configPanelIdx === -1 ? undefined : panels.splice(configPanelIdx, 1)[0];
+
return html`
-
- Home Assistant
- ${hass.user
- ? html`
-
-
-
- `
- : ""}
-
+ ${this.expanded
+ ? html`
+
+ Home Assistant
+
+ `
+ : html`
+
+

+
+ `}
- ${computePanels(hass).map(
- (panel) => html`
-
-
-
- ${hass.localize(`panel.${panel.title}`) || panel.title}
-
-
- `
- )}
- ${this._externalConfig && this._externalConfig.hasSettingsScreen
- ? html`
-
-
-
- ${hass.localize(
- "ui.sidebar.external_app_configuration"
- )}
-
-
- `
- : ""}
- ${!hass.user
- ? html`
-
-
- ${hass.localize("ui.sidebar.log_out")}
-
- `
- : html``}
-
+ ${panels.map((panel) => renderPanel(hass, panel))}
- ${hass.user && hass.user.is_admin
- ? html`
-