fix: Add destructive styling to delete button in dashboard config rem… (#21729)

* fix: Add destructive styling to delete button in dashboard config removal dialog

* changed translation key 'remove' to 'delete'

* Update src/translations/en.json

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
Gourav Soni 2024-08-21 23:55:42 +05:30 committed by GitHub
parent 968c0de141
commit a235f76985
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -231,14 +231,15 @@ class LovelaceFullConfigEditor extends LitElement {
if (!value) {
showConfirmationDialog(this, {
title: this.hass.localize(
"ui.panel.lovelace.editor.raw_editor.confirm_remove_config_title"
"ui.panel.lovelace.editor.raw_editor.confirm_delete_config_title"
),
text: this.hass.localize(
"ui.panel.lovelace.editor.raw_editor.confirm_remove_config_text"
"ui.panel.lovelace.editor.raw_editor.confirm_delete_config_text"
),
confirmText: this.hass.localize("ui.common.remove"),
confirmText: this.hass.localize("ui.common.delete"),
dismissText: this.hass.localize("ui.common.cancel"),
confirm: () => this._removeConfig(),
destructive: true,
});
return;
}

View File

@ -5492,8 +5492,8 @@
"saved": "Saved",
"reload": "Reload",
"lovelace_changed": "Your dashboard was updated, do you want to load the updated config in the editor and lose your current changes?",
"confirm_remove_config_title": "Are you sure you want to remove your dashboard configuration?",
"confirm_remove_config_text": "We will automatically generate your dashboard views with your areas and devices if you remove your dashboard configuration.",
"confirm_delete_config_title": "Delete dashboard configuration?",
"confirm_delete_config_text": "This dashboard will be permanently deleted. The dashboard will be automatically regenerated to display your areas, devices and entities.",
"confirm_unsaved_changes": "You have unsaved changes, are you sure you want to exit?",
"confirm_unsaved_comments": "Your configuration might contains comment(s), these will not be saved. Do you want to continue?",
"error_parse_yaml": "Unable to parse YAML: {error}",