Hide stop for hassio (#10905)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Joakim Sørensen 2021-12-14 01:29:01 +01:00 committed by GitHub
parent b8832f2121
commit 792278cf17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ import "@polymer/paper-input/paper-input";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators"; import { customElement, property, state } from "lit/decorators";
import { componentsWithService } from "../../../common/config/components_with_service"; import { componentsWithService } from "../../../common/config/components_with_service";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import "../../../components/buttons/ha-call-service-button"; import "../../../components/buttons/ha-call-service-button";
import "../../../components/ha-card"; import "../../../components/ha-card";
import { checkCoreConfig } from "../../../data/core"; import { checkCoreConfig } from "../../../data/core";
@ -157,18 +158,20 @@ export class HaConfigServerControl extends LitElement {
"ui.panel.config.server_control.section.server_management.restart" "ui.panel.config.server_control.section.server_management.restart"
)} )}
</ha-call-service-button> </ha-call-service-button>
<ha-call-service-button ${!isComponentLoaded(this.hass, "hassio")
class="warning" ? html`<ha-call-service-button
.hass=${this.hass} class="warning"
domain="homeassistant" .hass=${this.hass}
service="stop" domain="homeassistant"
confirmation=${this.hass.localize( service="stop"
"ui.panel.config.server_control.section.server_management.confirm_stop" confirmation=${this.hass.localize(
)} "ui.panel.config.server_control.section.server_management.confirm_stop"
>${this.hass.localize( )}
"ui.panel.config.server_control.section.server_management.stop" >${this.hass.localize(
)} "ui.panel.config.server_control.section.server_management.stop"
</ha-call-service-button> )}
</ha-call-service-button>`
: ""}
</div> </div>
</ha-card> </ha-card>