mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Hide supervisor only config, fix backup config page (#12401)
This commit is contained in:
parent
6b67546daf
commit
94953ddf6c
@ -130,7 +130,7 @@ export class HaTabsSubpageDataTable extends LitElement {
|
||||
* Array of tabs to show on the page.
|
||||
* @type {Array}
|
||||
*/
|
||||
@property() public tabs!: PageNavigation[];
|
||||
@property() public tabs: PageNavigation[] = [];
|
||||
|
||||
/**
|
||||
* Force hides the filter menu.
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import { canShowPage } from "../../../common/config/can_show_page";
|
||||
import "../../../components/ha-card";
|
||||
import "../../../components/ha-navigation-list";
|
||||
import { CloudStatus } from "../../../data/cloud";
|
||||
@ -23,12 +24,14 @@ class HaConfigSystemNavigation extends LitElement {
|
||||
@property({ type: Boolean }) public showAdvanced!: boolean;
|
||||
|
||||
protected render(): TemplateResult {
|
||||
const pages = configSections.general.map((page) => ({
|
||||
...page,
|
||||
name: page.translationKey
|
||||
? this.hass.localize(page.translationKey)
|
||||
: page.name,
|
||||
}));
|
||||
const pages = configSections.general
|
||||
.filter((page) => canShowPage(this.hass, page))
|
||||
.map((page) => ({
|
||||
...page,
|
||||
name: page.translationKey
|
||||
? this.hass.localize(page.translationKey)
|
||||
: page.name,
|
||||
}));
|
||||
|
||||
return html`
|
||||
<hass-subpage
|
||||
|
@ -306,12 +306,14 @@ export const configSections: { [name: string]: PageNavigation[] } = {
|
||||
translationKey: "ui.panel.config.storage.caption",
|
||||
iconPath: mdiServer,
|
||||
iconColor: "#518C43",
|
||||
component: "hassio",
|
||||
},
|
||||
{
|
||||
path: "/config/hardware",
|
||||
translationKey: "ui.panel.config.hardware.caption",
|
||||
iconPath: mdiCpu32Bit,
|
||||
iconColor: "#301A8E",
|
||||
component: "hassio",
|
||||
},
|
||||
],
|
||||
about: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user