mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Dont show config changes when user saved it (#8520)
This commit is contained in:
parent
33cbf7eabe
commit
0a3505ed89
@ -81,7 +81,7 @@ class LovelaceFullConfigEditor extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
<mwc-button
|
<mwc-button
|
||||||
raised
|
raised
|
||||||
@click="${this._handleSave}"
|
@click=${this._handleSave}
|
||||||
.disabled=${!this._changed}
|
.disabled=${!this._changed}
|
||||||
>${this.hass!.localize(
|
>${this.hass!.localize(
|
||||||
"ui.panel.lovelace.editor.raw_editor.save"
|
"ui.panel.lovelace.editor.raw_editor.save"
|
||||||
@ -95,8 +95,8 @@ class LovelaceFullConfigEditor extends LitElement {
|
|||||||
autofocus
|
autofocus
|
||||||
.rtl=${computeRTL(this.hass)}
|
.rtl=${computeRTL(this.hass)}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
@value-changed="${this._yamlChanged}"
|
@value-changed=${this._yamlChanged}
|
||||||
@editor-save="${this._handleSave}"
|
@editor-save=${this._handleSave}
|
||||||
>
|
>
|
||||||
</ha-code-editor>
|
</ha-code-editor>
|
||||||
</div>
|
</div>
|
||||||
@ -112,6 +112,7 @@ class LovelaceFullConfigEditor extends LitElement {
|
|||||||
protected updated(changedProps: PropertyValues) {
|
protected updated(changedProps: PropertyValues) {
|
||||||
const oldLovelace = changedProps.get("lovelace") as Lovelace | undefined;
|
const oldLovelace = changedProps.get("lovelace") as Lovelace | undefined;
|
||||||
if (
|
if (
|
||||||
|
!this._saving &&
|
||||||
oldLovelace &&
|
oldLovelace &&
|
||||||
this.lovelace &&
|
this.lovelace &&
|
||||||
oldLovelace.config !== this.lovelace.config &&
|
oldLovelace.config !== this.lovelace.config &&
|
||||||
@ -305,8 +306,8 @@ class LovelaceFullConfigEditor extends LitElement {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
window.onbeforeunload = null;
|
window.onbeforeunload = null;
|
||||||
this._saving = false;
|
|
||||||
this._changed = false;
|
this._changed = false;
|
||||||
|
this._saving = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private get yamlEditor(): HaCodeEditor {
|
private get yamlEditor(): HaCodeEditor {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user