1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Use show in sidebar property instead of checking title (#29815)

This commit is contained in:
Paul Bottein
2026-02-25 16:37:25 +01:00
committed by GitHub
parent 86b4bd0013
commit d17217fc90
3 changed files with 4 additions and 2 deletions

View File

@@ -144,6 +144,7 @@ export const computePanels = memoizeOne(
if (
!isDefaultPanel &&
(!panel.title ||
panel.show_in_sidebar === false ||
hiddenPanels.includes(panel.url_path) ||
(panel.default_visible === false &&
!panelsOrder.includes(panel.url_path)))

View File

@@ -344,7 +344,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
const item: DataTableItem = {
icon: getPanelIcon(panelInfo),
title: getPanelTitle(this.hass, panelInfo) || panelInfo.url_path,
show_in_sidebar: panelInfo.title != null,
show_in_sidebar: panelInfo.show_in_sidebar || false,
mode: "storage",
url_path: panelInfo.url_path,
filename: "",
@@ -487,7 +487,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
title: getPanelTitle(this.hass, panelInfo) || panelInfo.url_path,
icon: getPanelIcon(panelInfo),
requireAdmin: panelInfo.require_admin || false,
showInSidebar: panelInfo.title != null,
showInSidebar: panelInfo.show_in_sidebar || false,
isDefault: panelInfo.url_path === defaultPanel,
updatePanel: async (values) => {
await updatePanel(this.hass!, panelInfo.url_path, values);

View File

@@ -142,6 +142,7 @@ export interface PanelInfo<T = Record<string, any> | null> {
config_panel_domain?: string;
default_visible?: boolean;
require_admin?: boolean;
show_in_sidebar?: boolean;
}
export type Panels = Record<string, PanelInfo>;