mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +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,
|
mdiEyeOff,
|
||||||
mdiOpenInNew,
|
mdiOpenInNew,
|
||||||
} from "@mdi/js";
|
} from "@mdi/js";
|
||||||
|
import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
import {
|
import {
|
||||||
ATTENTION_SOURCES,
|
ATTENTION_SOURCES,
|
||||||
@ -16,6 +17,7 @@ import {
|
|||||||
localizeConfigFlowTitle,
|
localizeConfigFlowTitle,
|
||||||
} from "../../../data/config_flow";
|
} from "../../../data/config_flow";
|
||||||
import type { IntegrationManifest } from "../../../data/integration";
|
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 { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow";
|
||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
@ -112,7 +114,10 @@ export class HaConfigFlowCard extends LitElement {
|
|||||||
${DISCOVERY_SOURCES.includes(this.flow.context.source) &&
|
${DISCOVERY_SOURCES.includes(this.flow.context.source) &&
|
||||||
this.flow.context.unique_id
|
this.flow.context.unique_id
|
||||||
? html`
|
? html`
|
||||||
<mwc-list-item graphic="icon" @click=${this._ignoreFlow}>
|
<mwc-list-item
|
||||||
|
graphic="icon"
|
||||||
|
@request-selected=${this._ignoreFlow}
|
||||||
|
>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.integrations.ignore.ignore"
|
"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, {
|
const confirmed = await showConfirmationDialog(this, {
|
||||||
title: this.hass!.localize(
|
title: this.hass!.localize(
|
||||||
"ui.panel.config.integrations.ignore.confirm_ignore_title",
|
"ui.panel.config.integrations.ignore.confirm_ignore_title",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user