mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Various fixes in dialogs (#20935)
* allow escape and scrim action for repair dialogs * improve delete entity dialogs * reiterate refresh token dialog wordings (kept refresh token for now) * improve device delete dialogs * Improve deletable text and invalidation
This commit is contained in:
parent
2e5cce5409
commit
d3222f8bb0
@ -1028,6 +1028,9 @@ export class HaConfigDevicePage extends LitElement {
|
||||
: this.hass.localize(
|
||||
`ui.panel.config.devices.confirm_delete`
|
||||
),
|
||||
confirmText: this.hass.localize("ui.common.delete"),
|
||||
dismissText: this.hass.localize("ui.common.cancel"),
|
||||
destructive: true,
|
||||
});
|
||||
|
||||
if (!confirmed) {
|
||||
|
@ -164,6 +164,9 @@ export class EntitySettingsHelperTab extends LitElement {
|
||||
text: this.hass.localize(
|
||||
"ui.dialogs.entity_registry.editor.confirm_delete"
|
||||
),
|
||||
confirmText: this.hass.localize("ui.common.delete"),
|
||||
dismissText: this.hass.localize("ui.common.cancel"),
|
||||
destructive: true,
|
||||
}))
|
||||
) {
|
||||
return;
|
||||
|
@ -215,6 +215,9 @@ export class EntityRegistrySettings extends SubscribeMixin(LitElement) {
|
||||
text: this.hass.localize(
|
||||
"ui.dialogs.entity_registry.editor.confirm_delete"
|
||||
),
|
||||
confirmText: this.hass.localize("ui.common.delete"),
|
||||
dismissText: this.hass.localize("ui.common.cancel"),
|
||||
destructive: true,
|
||||
}))
|
||||
) {
|
||||
return;
|
||||
|
@ -839,7 +839,7 @@ ${
|
||||
></ha-svg-icon>
|
||||
<div slot="headline">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.entities.picker.remove_selected.button"
|
||||
"ui.panel.config.entities.picker.delete_selected.button"
|
||||
)}
|
||||
</div>
|
||||
</ha-menu-item>
|
||||
@ -1256,25 +1256,23 @@ ${rejected
|
||||
});
|
||||
showConfirmationDialog(this, {
|
||||
title: this.hass.localize(
|
||||
`ui.panel.config.entities.picker.remove_selected.confirm_${
|
||||
removeableEntities.length !== this._selected.length ? "partly_" : ""
|
||||
}title`,
|
||||
{ number: removeableEntities.length }
|
||||
`ui.panel.config.entities.picker.delete_selected.confirm_title`
|
||||
),
|
||||
text:
|
||||
removeableEntities.length === this._selected.length
|
||||
? this.hass.localize(
|
||||
"ui.panel.config.entities.picker.remove_selected.confirm_text"
|
||||
"ui.panel.config.entities.picker.delete_selected.confirm_text"
|
||||
)
|
||||
: this.hass.localize(
|
||||
"ui.panel.config.entities.picker.remove_selected.confirm_partly_text",
|
||||
"ui.panel.config.entities.picker.delete_selected.confirm_partly_text",
|
||||
{
|
||||
removable: removeableEntities.length,
|
||||
deletable: removeableEntities.length,
|
||||
selected: this._selected.length,
|
||||
}
|
||||
),
|
||||
confirmText: this.hass.localize("ui.common.remove"),
|
||||
confirmText: this.hass.localize("ui.common.delete"),
|
||||
dismissText: this.hass.localize("ui.common.cancel"),
|
||||
destructive: true,
|
||||
confirm: () => {
|
||||
removeableEntities.forEach((entity) =>
|
||||
removeEntityRegistryEntry(this.hass, entity)
|
||||
|
@ -31,8 +31,6 @@ class DialogIntegrationStartup extends LitElement {
|
||||
return html`
|
||||
<ha-dialog
|
||||
open
|
||||
scrimClickAction
|
||||
escapeKeyAction
|
||||
hideActions
|
||||
.heading=${createCloseHeading(
|
||||
this.hass,
|
||||
|
@ -143,8 +143,6 @@ class DialogSystemInformation extends LitElement {
|
||||
<ha-dialog
|
||||
open
|
||||
@closed=${this.closeDialog}
|
||||
scrimClickAction
|
||||
escapeKeyAction
|
||||
.heading=${createCloseHeading(
|
||||
this.hass,
|
||||
this.hass.localize("ui.panel.config.repairs.system_information")
|
||||
|
@ -301,7 +301,7 @@ class HaRefreshTokens extends LitElement {
|
||||
text: this.hass.localize(
|
||||
"ui.panel.profile.refresh_tokens.confirm_delete_all"
|
||||
),
|
||||
confirmText: this.hass.localize("ui.common.delete"),
|
||||
confirmText: this.hass.localize("ui.common.delete_all"),
|
||||
destructive: true,
|
||||
}))
|
||||
) {
|
||||
|
@ -326,6 +326,7 @@
|
||||
"refresh": "Refresh",
|
||||
"cancel": "Cancel",
|
||||
"delete": "Delete",
|
||||
"delete_all": "Delete all",
|
||||
"download": "[%key:supervisor::backup::download%]",
|
||||
"duplicate": "Duplicate",
|
||||
"remove": "Remove",
|
||||
@ -4094,12 +4095,11 @@
|
||||
"confirm_title": "Do you want to disable {number} {number, plural,\n one {entity}\n other {entities}\n}?",
|
||||
"confirm_text": "Disabled entities will not be added to Home Assistant."
|
||||
},
|
||||
"remove_selected": {
|
||||
"button": "Remove selected",
|
||||
"confirm_title": "Do you want to remove {number} {number, plural,\n one {entity}\n other {entities}\n}?",
|
||||
"confirm_partly_title": "Only {number} {number, plural,\n one {selected entity}\n other {selected entities}\n} can be removed.",
|
||||
"confirm_text": "You should remove them from your dashboard config and automations if they contain these entities.",
|
||||
"confirm_partly_text": "You can only remove {removable} of the selected {selected} entities. Entities can only be removed when the integration is no longer providing the entities. Sometimes you have to restart Home Assistant before you can remove the entities of a removed integration. Are you sure you want to remove the removable entities?"
|
||||
"delete_selected": {
|
||||
"button": "Delete selected",
|
||||
"confirm_title": "Delete selected entities?",
|
||||
"confirm_text": "Are you sure you want to delete the entities?\n\nRemove them from your dashboard and automations if they include these entities.",
|
||||
"confirm_partly_text": "You can only delete {deletable} of the {selected} entities. The others require the integration to stop providing them, and sometimes a Home Assistant restart is needed. Are you sure you want to delete the deletable entities?\n\nRemove them from your dashboard and automations if they include these entities."
|
||||
},
|
||||
"hide_selected": {
|
||||
"button": "Hide selected",
|
||||
@ -6390,10 +6390,10 @@
|
||||
"disable_expiration_failed": "Failed to disable refresh token expiration",
|
||||
"enable_expiration_failed": "Failed to enable refresh token expiration",
|
||||
"confirm_delete_title": "Delete refresh token?",
|
||||
"confirm_delete_text": "The refresh token for ''{name}'' will be permanently deleted. This will end the login session on the associated device.",
|
||||
"confirm_delete_text": "The refresh token for ''{name}'' will be permanently deleted. This associated device will not have access anymore.",
|
||||
"delete_all_tokens": "Delete all tokens",
|
||||
"confirm_delete_all_title": "Delete all refresh tokens?",
|
||||
"confirm_delete_all": "Are you sure you want to delete all refresh tokens? Your current session token will not be removed. Your long-lived access tokens will not be removed.",
|
||||
"confirm_delete_all": "Are you sure you want to delete all refresh tokens? These associated devices will not have access anymore. Your current session and long-lived access tokens will not be deleted.",
|
||||
"delete_failed": "Failed to delete the refresh token.",
|
||||
"current_token_tooltip": "Unable to delete current refresh token"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user