From cff2f856b3f38149df3cf9b8f30e35400f671e30 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 25 Apr 2022 20:37:48 +0200 Subject: [PATCH] Don't show tabs in supervisor (#12417) --- hassio/src/dashboard/hassio-dashboard.ts | 32 +++++++++++++++++ hassio/src/hassio-tabs.ts | 45 +++++++++++++----------- 2 files changed, 56 insertions(+), 21 deletions(-) diff --git a/hassio/src/dashboard/hassio-dashboard.ts b/hassio/src/dashboard/hassio-dashboard.ts index 917ff856a1..89cb7c500d 100644 --- a/hassio/src/dashboard/hassio-dashboard.ts +++ b/hassio/src/dashboard/hassio-dashboard.ts @@ -10,6 +10,7 @@ import { HomeAssistant, Route } from "../../../src/types"; import { supervisorTabs } from "../hassio-tabs"; import "./hassio-addons"; import "./hassio-update"; +import "../../../src/layouts/hass-subpage"; @customElement("hassio-dashboard") class HassioDashboard extends LitElement { @@ -22,6 +23,31 @@ class HassioDashboard extends LitElement { @property({ attribute: false }) public route!: Route; protected render(): TemplateResult { + if (atLeastVersion(this.hass.config.version, 2022, 5)) { + return html` + + + + + `; + } + return html` [ - { - translationKey: atLeastVersion(hass.config.version, 2021, 12) - ? "panel.addons" - : "panel.dashboard", - path: `/hassio/dashboard`, - iconPath: atLeastVersion(hass.config.version, 2021, 12) - ? mdiPuzzle - : mdiViewDashboard, - }, - { - translationKey: "panel.backups", - path: `/hassio/backups`, - iconPath: mdiBackupRestore, - }, - { - translationKey: "panel.system", - path: `/hassio/system`, - iconPath: mdiCogs, - }, -]; +export const supervisorTabs = (hass: HomeAssistant): PageNavigation[] => + atLeastVersion(hass.config.version, 2022, 5) + ? [] + : [ + { + translationKey: atLeastVersion(hass.config.version, 2021, 12) + ? "panel.addons" + : "panel.dashboard", + path: `/hassio/dashboard`, + iconPath: atLeastVersion(hass.config.version, 2021, 12) + ? mdiPuzzle + : mdiViewDashboard, + }, + { + translationKey: "panel.backups", + path: `/hassio/backups`, + iconPath: mdiBackupRestore, + }, + { + translationKey: "panel.system", + path: `/hassio/system`, + iconPath: mdiCogs, + }, + ];