mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Update delete script dialog (#13768)
This commit is contained in:
parent
a97dfbb51f
commit
5fcb219fcd
@ -697,10 +697,17 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
||||
|
||||
private async _deleteConfirm() {
|
||||
showConfirmationDialog(this, {
|
||||
text: this.hass.localize("ui.panel.config.script.editor.delete_confirm"),
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.script.editor.delete_confirm_title"
|
||||
),
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.script.editor.delete_confirm_text",
|
||||
{ name: this._config?.alias }
|
||||
),
|
||||
confirmText: this.hass!.localize("ui.common.delete"),
|
||||
dismissText: this.hass!.localize("ui.common.cancel"),
|
||||
confirm: () => this._delete(),
|
||||
destructive: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -322,10 +322,18 @@ class HaScriptPicker extends LitElement {
|
||||
|
||||
private async _deleteConfirm(script: any) {
|
||||
showConfirmationDialog(this, {
|
||||
text: this.hass.localize("ui.panel.config.script.editor.delete_confirm"),
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.script.editor.delete_confirm_title"
|
||||
),
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.script.editor.delete_confirm_text",
|
||||
"name",
|
||||
{ name: script.name }
|
||||
),
|
||||
confirmText: this.hass!.localize("ui.common.delete"),
|
||||
dismissText: this.hass!.localize("ui.common.cancel"),
|
||||
confirm: () => this._delete(script),
|
||||
destructive: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2313,7 +2313,8 @@
|
||||
"load_error_not_duplicable": "Only scripts in scripts.yaml can be duplicated.",
|
||||
"load_error_not_deletable": "Only scripts in scripts.yaml can be deleted.",
|
||||
"load_error_unknown": "Error loading script ({err_no}).",
|
||||
"delete_confirm": "Are you sure you want to delete this script?",
|
||||
"delete_confirm_title": "Delete script?",
|
||||
"delete_confirm_text": "{name} will be permanently deleted.",
|
||||
"save_script": "Save script",
|
||||
"sequence": "Sequence",
|
||||
"sequence_sentence": "The sequence of actions of this script.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user