diff --git a/src/panels/profile/ha-long-lived-access-tokens-card.ts b/src/panels/profile/ha-long-lived-access-tokens-card.ts index a835f98986..25c7fd44c1 100644 --- a/src/panels/profile/ha-long-lived-access-tokens-card.ts +++ b/src/panels/profile/ha-long-lived-access-tokens-card.ts @@ -135,10 +135,15 @@ class HaLongLivedTokens extends LitElement { const token = (ev.currentTarget as any).token; if ( !(await showConfirmationDialog(this, { + title: this.hass.localize( + "ui.panel.profile.long_lived_access_tokens.confirm_delete_title" + ), text: this.hass.localize( - "ui.panel.profile.long_lived_access_tokens.confirm_delete", + "ui.panel.profile.long_lived_access_tokens.confirm_delete_text", { name: token.client_name } ), + confirmText: this.hass.localize("ui.common.delete"), + destructive: true, })) ) { return; diff --git a/src/panels/profile/ha-refresh-tokens-card.ts b/src/panels/profile/ha-refresh-tokens-card.ts index 4a0bf2c77c..2309045e7f 100644 --- a/src/panels/profile/ha-refresh-tokens-card.ts +++ b/src/panels/profile/ha-refresh-tokens-card.ts @@ -295,9 +295,13 @@ class HaRefreshTokens extends LitElement { private async _deleteAllTokens(): Promise { if ( !(await showConfirmationDialog(this, { + title: this.hass.localize( + "ui.panel.profile.refresh_tokens.confirm_delete_all_title" + ), text: this.hass.localize( "ui.panel.profile.refresh_tokens.confirm_delete_all" ), + confirmText: this.hass.localize("ui.common.delete"), destructive: true, })) ) { diff --git a/src/translations/en.json b/src/translations/en.json index 83e115d2ee..ec84ebd489 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1888,7 +1888,9 @@ "editor": { "confirm_unsaved": "You have unsaved changes. Are you sure you want to leave?" }, - "multiselect": { "failed": "Failed to update {number} items." }, + "multiselect": { + "failed": "Failed to update {number} items." + }, "learn_more": "Learn more" }, "updates": { @@ -6405,6 +6407,7 @@ "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.", "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.", "delete_failed": "Failed to delete the refresh token.", "current_token_tooltip": "Unable to delete current refresh token" @@ -6414,7 +6417,8 @@ "description": "Create long-lived access tokens to allow your scripts to interact with your Home Assistant instance. Each token will be valid for 10 years from creation. The following long-lived access tokens are currently active.", "learn_auth_requests": "Learn how to make authenticated requests.", "created": "Created {date}", - "confirm_delete": "Are you sure you want to delete the access token for {name}?", + "confirm_delete_title": "Delete long-lived access token?", + "confirm_delete_text": "Are you sure you want to delete the long-lived access token for {name}?", "delete_failed": "Failed to delete the access token.", "create": "Create Token", "create_failed": "Failed to create the access token.",