mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Add area ID to area ID modal
This commit is contained in:
parent
fb16156f8d
commit
88131ade23
@ -44,6 +44,7 @@ class DialogAreaDetail extends LitElement {
|
|||||||
if (!this._params) {
|
if (!this._params) {
|
||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
|
const entry = this._params.entry;
|
||||||
const nameInvalid = this._name.trim() === "";
|
const nameInvalid = this._name.trim() === "";
|
||||||
return html`
|
return html`
|
||||||
<paper-dialog
|
<paper-dialog
|
||||||
@ -52,8 +53,8 @@ class DialogAreaDetail extends LitElement {
|
|||||||
@opened-changed="${this._openedChanged}"
|
@opened-changed="${this._openedChanged}"
|
||||||
>
|
>
|
||||||
<h2>
|
<h2>
|
||||||
${this._params.entry
|
${entry
|
||||||
? this._params.entry.name
|
? entry.name
|
||||||
: this.hass.localize(
|
: this.hass.localize(
|
||||||
"ui.panel.config.area_registry.editor.default_name"
|
"ui.panel.config.area_registry.editor.default_name"
|
||||||
)}
|
)}
|
||||||
@ -65,17 +66,23 @@ class DialogAreaDetail extends LitElement {
|
|||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
<div class="form">
|
<div class="form">
|
||||||
|
${entry
|
||||||
|
? html`
|
||||||
|
<div>Area ID: ${entry.area_id}</div>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
|
||||||
<paper-input
|
<paper-input
|
||||||
.value=${this._name}
|
.value=${this._name}
|
||||||
@value-changed=${this._nameChanged}
|
@value-changed=${this._nameChanged}
|
||||||
.label=${this.hass.localize("ui.dialogs.more_info_settings.name")}
|
label="Name"
|
||||||
error-message="Name is required"
|
error-message="Name is required"
|
||||||
.invalid=${nameInvalid}
|
.invalid=${nameInvalid}
|
||||||
></paper-input>
|
></paper-input>
|
||||||
</div>
|
</div>
|
||||||
</paper-dialog-scrollable>
|
</paper-dialog-scrollable>
|
||||||
<div class="paper-dialog-buttons">
|
<div class="paper-dialog-buttons">
|
||||||
${this._params.entry
|
${entry
|
||||||
? html`
|
? html`
|
||||||
<mwc-button
|
<mwc-button
|
||||||
class="warning"
|
class="warning"
|
||||||
@ -92,7 +99,7 @@ class DialogAreaDetail extends LitElement {
|
|||||||
@click="${this._updateEntry}"
|
@click="${this._updateEntry}"
|
||||||
.disabled=${nameInvalid || this._submitting}
|
.disabled=${nameInvalid || this._submitting}
|
||||||
>
|
>
|
||||||
${this._params.entry
|
${entry
|
||||||
? this.hass.localize(
|
? this.hass.localize(
|
||||||
"ui.panel.config.area_registry.editor.update"
|
"ui.panel.config.area_registry.editor.update"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user