mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Don't show add-on config if no schema (#8361)
This commit is contained in:
parent
a1d66aef0c
commit
c7821b9cee
@ -33,9 +33,9 @@ class HassioAddonConfigDashboard extends LitElement {
|
|||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div class="content">
|
<div class="content">
|
||||||
${hasOptions || hasSchema || this.addon.network || this.addon.audio
|
${(hasOptions && hasSchema) || this.addon.network || this.addon.audio
|
||||||
? html`
|
? html`
|
||||||
${hasOptions || hasSchema
|
${hasOptions && hasSchema
|
||||||
? html`
|
? html`
|
||||||
<hassio-addon-config
|
<hassio-addon-config
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
@ -108,12 +108,10 @@ class HassioAddonConfig extends LitElement {
|
|||||||
|
|
||||||
protected firstUpdated(changedProps) {
|
protected firstUpdated(changedProps) {
|
||||||
super.firstUpdated(changedProps);
|
super.firstUpdated(changedProps);
|
||||||
this._canShowSchema =
|
this._canShowSchema = !this.addon.schema!.find(
|
||||||
this.addon.schema !== null &&
|
// @ts-ignore
|
||||||
!this.addon.schema.find(
|
(entry) => !SUPPORTED_UI_TYPES.includes(entry.type) || entry.multiple
|
||||||
// @ts-ignore
|
);
|
||||||
(entry) => !SUPPORTED_UI_TYPES.includes(entry.type) || entry.multiple
|
|
||||||
);
|
|
||||||
this._yamlMode = !this._canShowSchema;
|
this._yamlMode = !this._canShowSchema;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user