mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Quickly search for entities from the Overview Dashboard (#12324)
This commit is contained in:
parent
bad5a389b5
commit
76e1721c58
@ -7,6 +7,7 @@ import {
|
|||||||
mdiFileMultiple,
|
mdiFileMultiple,
|
||||||
mdiFormatListBulletedTriangle,
|
mdiFormatListBulletedTriangle,
|
||||||
mdiHelp,
|
mdiHelp,
|
||||||
|
mdiMagnify,
|
||||||
mdiHelpCircle,
|
mdiHelpCircle,
|
||||||
mdiMicrophone,
|
mdiMicrophone,
|
||||||
mdiPencil,
|
mdiPencil,
|
||||||
@ -72,6 +73,7 @@ import { showEditViewDialog } from "./editor/view-editor/show-edit-view-dialog";
|
|||||||
import type { Lovelace } from "./types";
|
import type { Lovelace } from "./types";
|
||||||
import "./views/hui-view";
|
import "./views/hui-view";
|
||||||
import type { HUIView } from "./views/hui-view";
|
import type { HUIView } from "./views/hui-view";
|
||||||
|
import { showQuickBar } from "../../dialogs/quick-bar/show-dialog-quick-bar";
|
||||||
|
|
||||||
class HUIRoot extends LitElement {
|
class HUIRoot extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
@ -264,6 +266,10 @@ class HUIRoot extends LitElement {
|
|||||||
</ha-tabs>
|
</ha-tabs>
|
||||||
`
|
`
|
||||||
: html`<div main-title>${this.config.title}</div>`}
|
: html`<div main-title>${this.config.title}</div>`}
|
||||||
|
<ha-icon-button
|
||||||
|
.path=${mdiMagnify}
|
||||||
|
@click=${this._showQuickBar}
|
||||||
|
></ha-icon-button>
|
||||||
${!this.narrow &&
|
${!this.narrow &&
|
||||||
this._conversation(this.hass.config.components)
|
this._conversation(this.hass.config.components)
|
||||||
? html`
|
? html`
|
||||||
@ -673,6 +679,13 @@ class HUIRoot extends LitElement {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _showQuickBar(): void {
|
||||||
|
showQuickBar(this, {
|
||||||
|
commandMode: false,
|
||||||
|
hint: this.hass.localize("ui.dialogs.quick-bar.key_e_hint"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private _handleRawEditor(ev: CustomEvent<RequestSelectedDetail>): void {
|
private _handleRawEditor(ev: CustomEvent<RequestSelectedDetail>): void {
|
||||||
if (!shouldHandleRequestSelectedEvent(ev)) {
|
if (!shouldHandleRequestSelectedEvent(ev)) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user