mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Update delete scene dialog (#13767)
This commit is contained in:
parent
3b103619ec
commit
dcfcd54f10
@ -268,18 +268,22 @@ class HaSceneDashboard extends LitElement {
|
||||
private _activateScene = async (scene: SceneEntity) => {
|
||||
await activateScene(this.hass, scene.entity_id);
|
||||
showToast(this, {
|
||||
message: this.hass.localize(
|
||||
"ui.panel.config.scene.activated",
|
||||
"name",
|
||||
computeStateName(scene)
|
||||
),
|
||||
message: this.hass.localize("ui.panel.config.scene.activated", {
|
||||
name: computeStateName(scene),
|
||||
}),
|
||||
});
|
||||
forwardHaptic("light");
|
||||
};
|
||||
|
||||
private _deleteConfirm(scene: SceneEntity): void {
|
||||
showConfirmationDialog(this, {
|
||||
text: this.hass!.localize("ui.panel.config.scene.picker.delete_confirm"),
|
||||
title: this.hass!.localize(
|
||||
"ui.panel.config.scene.picker.delete_confirm_title"
|
||||
),
|
||||
text: this.hass!.localize(
|
||||
"ui.panel.config.scene.picker.delete_confirm_text",
|
||||
{ name: computeStateName(scene) }
|
||||
),
|
||||
confirmText: this.hass!.localize("ui.common.delete"),
|
||||
dismissText: this.hass!.localize("ui.common.cancel"),
|
||||
confirm: () => this._delete(scene),
|
||||
|
@ -785,10 +785,18 @@ export class HaSceneEditor extends SubscribeMixin(
|
||||
|
||||
private _deleteTapped(): void {
|
||||
showConfirmationDialog(this, {
|
||||
text: this.hass!.localize("ui.panel.config.scene.picker.delete_confirm"),
|
||||
title: this.hass!.localize(
|
||||
"ui.panel.config.scene.picker.delete_confirm_title"
|
||||
),
|
||||
text: this.hass!.localize(
|
||||
"ui.panel.config.scene.picker.delete_confirm_text",
|
||||
"name",
|
||||
this._config?.name
|
||||
),
|
||||
confirmText: this.hass!.localize("ui.common.delete"),
|
||||
dismissText: this.hass!.localize("ui.common.cancel"),
|
||||
confirm: () => this._delete(),
|
||||
destructive: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2338,7 +2338,8 @@
|
||||
"activate": "Activate",
|
||||
"delete_scene": "Delete scene",
|
||||
"delete": "[%key:ui::common::delete%]",
|
||||
"delete_confirm": "Are you sure you want to delete this scene?",
|
||||
"delete_confirm_title": "Delete scene?",
|
||||
"delete_confirm_text": "{name} will be permanently deleted.",
|
||||
"duplicate_scene": "Duplicate scene",
|
||||
"duplicate": "[%key:ui::common::duplicate%]",
|
||||
"headers": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user