mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 14:56:37 +00:00
Also handle enter key on ignore menu for discovered integrations (#14061)
This commit is contained in:
parent
9b51df02d6
commit
c3b9438b3b
@ -8,6 +8,7 @@ import {
|
||||
mdiEyeOff,
|
||||
mdiOpenInNew,
|
||||
} from "@mdi/js";
|
||||
import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item";
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import {
|
||||
ATTENTION_SOURCES,
|
||||
@ -16,6 +17,7 @@ import {
|
||||
localizeConfigFlowTitle,
|
||||
} from "../../../data/config_flow";
|
||||
import type { IntegrationManifest } from "../../../data/integration";
|
||||
import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event";
|
||||
import { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow";
|
||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||
import type { HomeAssistant } from "../../../types";
|
||||
@ -112,7 +114,10 @@ export class HaConfigFlowCard extends LitElement {
|
||||
${DISCOVERY_SOURCES.includes(this.flow.context.source) &&
|
||||
this.flow.context.unique_id
|
||||
? html`
|
||||
<mwc-list-item graphic="icon" @click=${this._ignoreFlow}>
|
||||
<mwc-list-item
|
||||
graphic="icon"
|
||||
@request-selected=${this._ignoreFlow}
|
||||
>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.ignore.ignore"
|
||||
)}
|
||||
@ -134,7 +139,10 @@ export class HaConfigFlowCard extends LitElement {
|
||||
});
|
||||
}
|
||||
|
||||
private async _ignoreFlow() {
|
||||
private async _ignoreFlow(ev: CustomEvent<RequestSelectedDetail>) {
|
||||
if (!shouldHandleRequestSelectedEvent(ev)) {
|
||||
return;
|
||||
}
|
||||
const confirmed = await showConfirmationDialog(this, {
|
||||
title: this.hass!.localize(
|
||||
"ui.panel.config.integrations.ignore.confirm_ignore_title",
|
||||
|
Loading…
x
Reference in New Issue
Block a user