From a235f7698546f7a2f46111cac061176d1533d411 Mon Sep 17 00:00:00 2001 From: Gourav Soni <84095227+gouravg8@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:55:42 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20Add=20destructive=20styling=20to=20delet?= =?UTF-8?q?e=20button=20in=20dashboard=20config=20rem=E2=80=A6=20(#21729)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- src/panels/lovelace/hui-editor.ts | 7 ++++--- src/translations/en.json | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/panels/lovelace/hui-editor.ts b/src/panels/lovelace/hui-editor.ts index 1ea0d97f64da..fd6dcf2722f7 100644 --- a/src/panels/lovelace/hui-editor.ts +++ b/src/panels/lovelace/hui-editor.ts @@ -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; } diff --git a/src/translations/en.json b/src/translations/en.json index f9957b3c5c8e..7f17d450d5a9 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -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}",