mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Save scene before switching to live edit (#23094)
Save scene changes before live edit, align delete icons for entities.
This commit is contained in:
parent
6d01728d54
commit
05eb6e15a5
@ -559,6 +559,7 @@ export class HaSceneEditor extends SubscribeMixin(
|
||||
}
|
||||
return html`
|
||||
<ha-list-item
|
||||
class="entity"
|
||||
hasMeta
|
||||
.graphic=${this._mode === "live"
|
||||
? "icon"
|
||||
@ -776,13 +777,15 @@ export class HaSceneEditor extends SubscribeMixin(
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.scene.editor.enter_live_mode_unsaved"
|
||||
),
|
||||
confirmText: this.hass!.localize("ui.common.continue"),
|
||||
destructive: true,
|
||||
confirmText: this.hass!.localize(
|
||||
"ui.panel.config.scene.editor.save_before_live"
|
||||
),
|
||||
dismissText: this.hass!.localize("ui.common.cancel"),
|
||||
});
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
await this._saveScene();
|
||||
}
|
||||
|
||||
this._entities.forEach((entity) => this._storeState(entity));
|
||||
@ -1326,6 +1329,9 @@ export class HaSceneEditor extends SubscribeMixin(
|
||||
li[role="separator"] {
|
||||
border-bottom-color: var(--divider-color);
|
||||
}
|
||||
ha-list-item.entity {
|
||||
padding-right: 28px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
@ -3881,7 +3881,8 @@
|
||||
"review_mode_detail": "You can adjust the scene's details and remove devices or entities. To fully edit, switch to Live Edit, which will apply the scene.",
|
||||
"live_edit": "Live Edit",
|
||||
"live_edit_detail": "In Live Edit, all changes to this scene are applied in real-time to your devices and entities.",
|
||||
"enter_live_mode_unsaved": "You have unsaved changes to this scene. Continuing to live preview will apply the saved scene, which may overwrite your unsaved changes. Consider if you would like to save the scene first before activating it.",
|
||||
"enter_live_mode_unsaved": "Before proceeding to Live Edit, please save your current changes.",
|
||||
"save_before_live": "Save and Live Edit",
|
||||
"switch_to_review_mode": "Switch to review mode",
|
||||
"default_name": "New scene",
|
||||
"load_error_not_editable": "Only scenes in scenes.yaml are editable.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user