mirror of
https://github.com/home-assistant/frontend
synced 2024-08-22 04:35:08 +02:00
Handle 0 updates and show back on supervisor panels (#10744)
This commit is contained in:
parent
fd6785b593
commit
1d97d8dca9
@ -173,7 +173,8 @@ export class HassioBackups extends LitElement {
|
|||||||
clickable
|
clickable
|
||||||
selectable
|
selectable
|
||||||
hasFab
|
hasFab
|
||||||
main-page
|
.mainPage=${!atLeastVersion(this.hass.config.version, 2021, 12)}
|
||||||
|
back-path="/config"
|
||||||
supervisor
|
supervisor
|
||||||
>
|
>
|
||||||
<ha-button-menu
|
<ha-button-menu
|
||||||
|
@ -29,7 +29,8 @@ class HassioDashboard extends LitElement {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.route=${this.route}
|
.route=${this.route}
|
||||||
.tabs=${supervisorTabs(this.hass)}
|
.tabs=${supervisorTabs(this.hass)}
|
||||||
main-page
|
.mainPage=${!atLeastVersion(this.hass.config.version, 2021, 12)}
|
||||||
|
back-path="/config"
|
||||||
supervisor
|
supervisor
|
||||||
hasFab
|
hasFab
|
||||||
>
|
>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
|
import { atLeastVersion } from "../../../src/common/config/version";
|
||||||
import { Supervisor } from "../../../src/data/supervisor/supervisor";
|
import { Supervisor } from "../../../src/data/supervisor/supervisor";
|
||||||
import "../../../src/layouts/hass-tabs-subpage";
|
import "../../../src/layouts/hass-tabs-subpage";
|
||||||
import { haStyle } from "../../../src/resources/styles";
|
import { haStyle } from "../../../src/resources/styles";
|
||||||
@ -29,7 +30,8 @@ class HassioSystem extends LitElement {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.route=${this.route}
|
.route=${this.route}
|
||||||
.tabs=${supervisorTabs(this.hass)}
|
.tabs=${supervisorTabs(this.hass)}
|
||||||
main-page
|
.mainPage=${!atLeastVersion(this.hass.config.version, 2021, 12)}
|
||||||
|
back-path="/config"
|
||||||
supervisor
|
supervisor
|
||||||
>
|
>
|
||||||
<span slot="header"> ${this.supervisor.localize("panel.system")} </span>
|
<span slot="header"> ${this.supervisor.localize("panel.system")} </span>
|
||||||
|
@ -76,7 +76,7 @@ class HaConfigDashboard extends LitElement {
|
|||||||
${isComponentLoaded(this.hass, "hassio") &&
|
${isComponentLoaded(this.hass, "hassio") &&
|
||||||
this.supervisorUpdates === undefined
|
this.supervisorUpdates === undefined
|
||||||
? html``
|
? html``
|
||||||
: html`${this.supervisorUpdates !== null
|
: html`${this.supervisorUpdates?.length
|
||||||
? html`<ha-card>
|
? html`<ha-card>
|
||||||
<ha-config-updates
|
<ha-config-updates
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
@ -86,7 +86,7 @@ class HaConfigDashboard extends LitElement {
|
|||||||
</ha-card>`
|
</ha-card>`
|
||||||
: ""}
|
: ""}
|
||||||
<ha-card>
|
<ha-card>
|
||||||
${this.narrow && this.supervisorUpdates !== null
|
${this.narrow && this.supervisorUpdates?.length
|
||||||
? html`<div class="title">
|
? html`<div class="title">
|
||||||
${this.hass.localize("panel.config")}
|
${this.hass.localize("panel.config")}
|
||||||
</div>`
|
</div>`
|
||||||
|
@ -29,7 +29,7 @@ class HaConfigUpdates extends LitElement {
|
|||||||
@state() private _showAll = false;
|
@state() private _showAll = false;
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
if (!this.supervisorUpdates) {
|
if (!this.supervisorUpdates?.length) {
|
||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ export const configSections: { [name: string]: PageNavigation[] } = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/config/helpers",
|
path: "/config/helpers",
|
||||||
name: "Helpers",
|
name: "Automation Helpers",
|
||||||
description: "Elements that help build automations",
|
description: "Elements that help build automations",
|
||||||
iconPath: mdiTools,
|
iconPath: mdiTools,
|
||||||
iconColor: "#4D2EA4",
|
iconColor: "#4D2EA4",
|
||||||
|
Loading…
Reference in New Issue
Block a user