mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Show error if not supported
This commit is contained in:
parent
2bb64e9e2f
commit
96986164a4
@ -12,6 +12,7 @@ import {
|
|||||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||||
import "../../../src/components/buttons/ha-call-api-button";
|
import "../../../src/components/buttons/ha-call-api-button";
|
||||||
import "../../../src/components/ha-card";
|
import "../../../src/components/ha-card";
|
||||||
|
import { HassioHostInfo as HassioHostInfoType } from "../../../src/data/hassio/host";
|
||||||
import {
|
import {
|
||||||
HassioSupervisorInfo as HassioSupervisorInfoType,
|
HassioSupervisorInfo as HassioSupervisorInfoType,
|
||||||
setSupervisorOption,
|
setSupervisorOption,
|
||||||
@ -33,6 +34,8 @@ class HassioSupervisorInfo extends LitElement {
|
|||||||
|
|
||||||
@property() public supervisorInfo!: HassioSupervisorInfoType;
|
@property() public supervisorInfo!: HassioSupervisorInfoType;
|
||||||
|
|
||||||
|
@property() public hostInfo!: HassioHostInfoType;
|
||||||
|
|
||||||
@internalProperty() private _errors?: string;
|
@internalProperty() private _errors?: string;
|
||||||
|
|
||||||
public render(): TemplateResult | void {
|
public render(): TemplateResult | void {
|
||||||
@ -80,10 +83,22 @@ class HassioSupervisorInfo extends LitElement {
|
|||||||
@change=${this._toggleDiagnostics}
|
@change=${this._toggleDiagnostics}
|
||||||
></ha-switch>
|
></ha-switch>
|
||||||
</ha-settings-row>`
|
</ha-settings-row>`
|
||||||
: ""}
|
: html`<div class="error">
|
||||||
|
You are running an unsupported installation.
|
||||||
|
<a
|
||||||
|
href="https://github.com/home-assistant/architecture/blob/master/adr/${this.hostInfo.features.includes(
|
||||||
|
"hassos"
|
||||||
|
)
|
||||||
|
? "0015-home-assistant-os.md"
|
||||||
|
: "0014-home-assistant-supervised.md"}"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>Learn More</a
|
||||||
|
>
|
||||||
|
</div>`}
|
||||||
</div>
|
</div>
|
||||||
${this._errors
|
${this._errors
|
||||||
? html` <div class="errors">Error: ${this._errors}</div> `
|
? html` <div class="error">Error: ${this._errors}</div> `
|
||||||
: ""}
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
@ -145,10 +160,6 @@ class HassioSupervisorInfo extends LitElement {
|
|||||||
.info td:nth-child(2) {
|
.info td:nth-child(2) {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.errors {
|
|
||||||
color: var(--error-color);
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
ha-settings-row {
|
ha-settings-row {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@ class HassioSystem extends LitElement {
|
|||||||
<div class="card-group">
|
<div class="card-group">
|
||||||
<hassio-supervisor-info
|
<hassio-supervisor-info
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
.hostInfo=${this.hostInfo}
|
||||||
.supervisorInfo=${this.supervisorInfo}
|
.supervisorInfo=${this.supervisorInfo}
|
||||||
></hassio-supervisor-info>
|
></hassio-supervisor-info>
|
||||||
<hassio-host-info
|
<hassio-host-info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user