mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Improve delete device button and confirmation dialog (#13500)
This commit is contained in:
parent
2751adf440
commit
e273b6b659
@ -944,7 +944,18 @@ export class HaConfigDevicePage extends LitElement {
|
||||
buttons.push({
|
||||
action: async () => {
|
||||
const confirmed = await showConfirmationDialog(this, {
|
||||
text: this.hass.localize("ui.panel.config.devices.confirm_delete"),
|
||||
text:
|
||||
this._integrations(device, this.entries).length > 1
|
||||
? this.hass.localize(
|
||||
`ui.panel.config.devices.confirm_delete_integration`,
|
||||
{
|
||||
integration: domainToName(
|
||||
this.hass.localize,
|
||||
entry.domain
|
||||
),
|
||||
}
|
||||
)
|
||||
: this.hass.localize(`ui.panel.config.devices.confirm_delete`),
|
||||
});
|
||||
|
||||
if (!confirmed) {
|
||||
@ -960,7 +971,7 @@ export class HaConfigDevicePage extends LitElement {
|
||||
classes: "warning",
|
||||
icon: mdiDelete,
|
||||
label:
|
||||
buttons.length > 1
|
||||
this._integrations(device, this.entries).length > 1
|
||||
? this.hass.localize(
|
||||
`ui.panel.config.devices.delete_device_integration`,
|
||||
{
|
||||
|
@ -2576,7 +2576,7 @@
|
||||
"download_diagnostics": "Download diagnostics",
|
||||
"download_diagnostics_integration": "Download {integration} diagnostics",
|
||||
"delete_device": "Delete",
|
||||
"delete_device_integration": "Remove {integration} from device",
|
||||
"delete_device_integration": "Remove device from {integration}",
|
||||
"type": {
|
||||
"device_heading": "Device",
|
||||
"device": "device",
|
||||
@ -2653,6 +2653,7 @@
|
||||
},
|
||||
"delete": "Delete",
|
||||
"confirm_delete": "Are you sure you want to delete this device?",
|
||||
"confirm_delete_integration": "Are you sure you want to remove this device from {integration}?",
|
||||
"picker": {
|
||||
"search": "Search devices",
|
||||
"filter": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user