diff --git a/.eslintrc.json b/.eslintrc.json
index 266ef17ca8..92943aa598 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -126,6 +126,5 @@
"lit-a11y/anchor-is-valid": "warn",
"lit-a11y/role-has-required-aria-attrs": "warn"
},
- "plugins": ["disable", "unused-imports"],
- "processor": "disable/disable"
+ "plugins": ["unused-imports"]
}
diff --git a/package.json b/package.json
index c6b40a8dec..f85a53aaaf 100644
--- a/package.json
+++ b/package.json
@@ -198,7 +198,6 @@
"eslint-config-airbnb-typescript": "18.0.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-webpack": "0.13.8",
- "eslint-plugin-disable": "2.0.3",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-lit": "1.13.0",
"eslint-plugin-lit-a11y": "4.1.2",
diff --git a/pyproject.toml b/pyproject.toml
index 65d925019d..32bf3ddd7c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "home-assistant-frontend"
-version = "20240529.0"
+version = "20240530.0"
license = {text = "Apache-2.0"}
description = "The Home Assistant frontend"
readme = "README.md"
diff --git a/src/panels/config/core/ha-config-section-updates.ts b/src/panels/config/core/ha-config-section-updates.ts
index 9f3191b7be..15a437b742 100644
--- a/src/panels/config/core/ha-config-section-updates.ts
+++ b/src/panels/config/core/ha-config-section-updates.ts
@@ -82,10 +82,13 @@ class HaConfigSectionUpdates extends LitElement {
>
${this.hass.localize("ui.panel.config.updates.show_skipped")}
- ${this._supervisorInfo && this._supervisorInfo.channel !== "dev"
+ ${this._supervisorInfo
? html`
-
+
${this._supervisorInfo.channel === "stable"
? this.hass.localize("ui.panel.config.updates.join_beta")
: this.hass.localize(
diff --git a/src/panels/config/integrations/ha-config-integration-page.ts b/src/panels/config/integrations/ha-config-integration-page.ts
index 2afb107fd9..8ef1ddebb9 100644
--- a/src/panels/config/integrations/ha-config-integration-page.ts
+++ b/src/panels/config/integrations/ha-config-integration-page.ts
@@ -1,6 +1,6 @@
import "@lrnwebcomponents/simple-tooltip/simple-tooltip";
import "@material/mwc-list/mwc-list";
-import { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item-base";
+import "@material/web/divider/divider";
import {
mdiAlertCircle,
mdiBookshelf,
@@ -27,13 +27,13 @@ import {
} from "@mdi/js";
import { UnsubscribeFunc } from "home-assistant-js-websocket";
import {
- css,
CSSResultGroup,
- html,
LitElement,
- nothing,
PropertyValues,
TemplateResult,
+ css,
+ html,
+ nothing,
} from "lit";
import { customElement, property, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
@@ -41,15 +41,15 @@ import { until } from "lit/directives/until";
import memoizeOne from "memoize-one";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { isDevVersion } from "../../../common/config/version";
-import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event";
import { caseInsensitiveStringCompare } from "../../../common/string/compare";
import { nextRender } from "../../../common/util/render-status";
import "../../../components/ha-button";
+import "../../../components/ha-button-menu-new";
import "../../../components/ha-card";
import "../../../components/ha-list-item";
-import "../../../components/ha-list-new";
import "../../../components/ha-list-item-new";
-import "../../../components/ha-button-menu-new";
+import "../../../components/ha-list-new";
+import "../../../components/ha-menu-item";
import {
deleteApplicationCredential,
fetchApplicationCredentialsConfigEntry,
@@ -57,13 +57,13 @@ import {
import { getSignedPath } from "../../../data/auth";
import {
ConfigEntry,
+ DisableConfigEntryResult,
+ ERROR_STATES,
+ RECOVERABLE_STATES,
deleteConfigEntry,
disableConfigEntry,
- DisableConfigEntryResult,
enableConfigEntry,
- ERROR_STATES,
getConfigEntries,
- RECOVERABLE_STATES,
reloadConfigEntry,
updateConfigEntry,
} from "../../../data/config_entries";
@@ -80,13 +80,13 @@ import {
} from "../../../data/entity_registry";
import { getErrorLogDownloadUrl } from "../../../data/error_log";
import {
+ IntegrationLogInfo,
+ IntegrationManifest,
+ LogSeverity,
domainToName,
fetchIntegrationManifest,
integrationIssuesUrl,
- IntegrationLogInfo,
- IntegrationManifest,
integrationsWithPanel,
- LogSeverity,
setIntegrationLogLevel,
subscribeLogInfo,
} from "../../../data/integration";
@@ -792,104 +792,98 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
RECOVERABLE_STATES.includes(item.state) &&
item.supports_unload &&
item.source !== "system"
- ? html`
- ${this.hass.localize(
- "ui.panel.config.integrations.config_entry.reload"
- )}
-
- `
- : ""}
+ ? html`
+
+
+ ${this.hass.localize(
+ "ui.panel.config.integrations.config_entry.reload"
+ )}
+
+ `
+ : nothing}
-
+
+
${this.hass.localize(
"ui.panel.config.integrations.config_entry.rename"
)}
-
-
+
-
+
${this._diagnosticHandler && item.state === "loaded"
- ? html`
-
+ ? html`
+
+
${this.hass.localize(
"ui.panel.config.integrations.config_entry.download_diagnostics"
)}
-
-
- `
+
+ `
: ""}
${!item.disabled_by &&
item.supports_reconfigure &&
item.source !== "system"
- ? html`
- ${this.hass.localize(
- "ui.panel.config.integrations.config_entry.reconfigure"
- )}
-
- `
- : ""}
+ ? html`
+
+
+ ${this.hass.localize(
+ "ui.panel.config.integrations.config_entry.reconfigure"
+ )}
+
+ `
+ : nothing}
-
+
+
${this.hass.localize(
"ui.panel.config.integrations.config_entry.system_options"
)}
-
-
+
${item.disabled_by === "user"
- ? html`
- ${this.hass.localize("ui.common.enable")}
-
- `
- : item.source !== "system"
- ? html`
- ${this.hass.localize("ui.common.disable")}
+ ? html`
+
- `
- : ""}
+ ${this.hass.localize("ui.common.enable")}
+
+ `
+ : item.source !== "system"
+ ? html`
+
+
+ ${this.hass.localize("ui.common.disable")}
+
+ `
+ : nothing}
${item.source !== "system"
- ? html`
- ${this.hass.localize(
- "ui.panel.config.integrations.config_entry.delete"
- )}
-
- `
- : ""}
+ ? html`
+
+
+ ${this.hass.localize(
+ "ui.panel.config.integrations.config_entry.delete"
+ )}
+
+ `
+ : nothing}
`;
}
@@ -1055,64 +1049,43 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
);
}
- private _handleRename(ev: CustomEvent): void {
- if (!shouldHandleRequestSelectedEvent(ev)) {
- return;
- }
+ private _handleRename(ev: Event): void {
this._editEntryName(
((ev.target as HTMLElement).closest(".config_entry") as any).configEntry
);
}
- private _handleReload(ev: CustomEvent): void {
- if (!shouldHandleRequestSelectedEvent(ev)) {
- return;
- }
+ private _handleReload(ev: Event): void {
this._reloadIntegration(
((ev.target as HTMLElement).closest(".config_entry") as any).configEntry
);
}
- private _handleReconfigure(ev: CustomEvent): void {
- if (!shouldHandleRequestSelectedEvent(ev)) {
- return;
- }
+ private _handleReconfigure(ev: Event): void {
this._reconfigureIntegration(
((ev.target as HTMLElement).closest(".config_entry") as any).configEntry
);
}
- private _handleDelete(ev: CustomEvent): void {
- if (!shouldHandleRequestSelectedEvent(ev)) {
- return;
- }
+ private _handleDelete(ev: Event): void {
this._removeIntegration(
((ev.target as HTMLElement).closest(".config_entry") as any).configEntry
);
}
- private _handleDisable(ev: CustomEvent): void {
- if (!shouldHandleRequestSelectedEvent(ev)) {
- return;
- }
+ private _handleDisable(ev: Event): void {
this._disableIntegration(
((ev.target as HTMLElement).closest(".config_entry") as any).configEntry
);
}
- private _handleEnable(ev: CustomEvent): void {
- if (ev.detail.source && !shouldHandleRequestSelectedEvent(ev)) {
- return;
- }
+ private _handleEnable(ev: Event): void {
this._enableIntegration(
((ev.target as HTMLElement).closest(".config_entry") as any).configEntry
);
}
- private _handleSystemOptions(ev: CustomEvent): void {
- if (!shouldHandleRequestSelectedEvent(ev)) {
- return;
- }
+ private _handleSystemOptions(ev: Event): void {
this._showSystemOptions(
((ev.target as HTMLElement).closest(".config_entry") as any).configEntry
);
@@ -1327,7 +1300,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
}
private async _signUrl(ev) {
- const anchor = ev.target.closest("a");
+ const anchor = ev.currentTarget;
ev.preventDefault();
const signedUrl = await getSignedPath(
this.hass,
@@ -1438,8 +1411,8 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
--mdc-list-item-meta-size: auto;
--mdc-list-item-meta-display: flex;
}
- ha-button-menu-new ha-list-item {
- --mdc-list-item-meta-size: 24px;
+ ha-button-menu-new ha-menu-item {
+ --mdc-icon-size: 24px;
}
ha-list-item-new.config_entry::after {
position: absolute;
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.",
diff --git a/yarn.lock b/yarn.lock
index 010ae66b36..d04f5745cc 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7583,17 +7583,6 @@ __metadata:
languageName: node
linkType: hard
-"eslint-plugin-disable@npm:2.0.3":
- version: 2.0.3
- resolution: "eslint-plugin-disable@npm:2.0.3"
- dependencies:
- resolve: "npm:^1.1.6"
- peerDependencies:
- eslint: ">=0.16.0"
- checksum: 10/2d68c0e5750325fb42c5cdc4300751753a10530df8e4a0656f102bcd1eb44cca01dfdf563b3f0a33c10c8ffdb7d92b8bb38b4c73717e04a967500af649512128
- languageName: node
- linkType: hard
-
"eslint-plugin-import@npm:2.29.1":
version: 2.29.1
resolution: "eslint-plugin-import@npm:2.29.1"
@@ -9057,7 +9046,6 @@ __metadata:
eslint-config-airbnb-typescript: "npm:18.0.0"
eslint-config-prettier: "npm:9.1.0"
eslint-import-resolver-webpack: "npm:0.13.8"
- eslint-plugin-disable: "npm:2.0.3"
eslint-plugin-import: "npm:2.29.1"
eslint-plugin-lit: "npm:1.13.0"
eslint-plugin-lit-a11y: "npm:4.1.2"
@@ -12571,7 +12559,7 @@ __metadata:
languageName: node
linkType: hard
-"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4":
+"resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4":
version: 1.22.8
resolution: "resolve@npm:1.22.8"
dependencies:
@@ -12597,7 +12585,7 @@ __metadata:
languageName: node
linkType: hard
-"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin":
+"resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin":
version: 1.22.8
resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d"
dependencies: