mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Revert "Add shortcut hint to assist dialog" (#23918)
Revert "Add shortcut hint to assist dialog (#23739)" This reverts commit d121b332635f5073adb355ea44f863a7193d0f18.
This commit is contained in:
parent
cc48ae82d6
commit
f8d2560104
@ -29,7 +29,6 @@ import { haStyleDialog } from "../../resources/styles";
|
|||||||
import type { HomeAssistant } from "../../types";
|
import type { HomeAssistant } from "../../types";
|
||||||
import { documentationUrl } from "../../util/documentation-url";
|
import { documentationUrl } from "../../util/documentation-url";
|
||||||
import type { VoiceCommandDialogParams } from "./show-ha-voice-command-dialog";
|
import type { VoiceCommandDialogParams } from "./show-ha-voice-command-dialog";
|
||||||
import "../../components/ha-tip";
|
|
||||||
|
|
||||||
@customElement("ha-voice-command-dialog")
|
@customElement("ha-voice-command-dialog")
|
||||||
export class HaVoiceCommandDialog extends LitElement {
|
export class HaVoiceCommandDialog extends LitElement {
|
||||||
@ -52,8 +51,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
|
|
||||||
@state() private _errorLoadAssist?: "not_found" | "unknown";
|
@state() private _errorLoadAssist?: "not_found" | "unknown";
|
||||||
|
|
||||||
@state() private _hint?: string;
|
|
||||||
|
|
||||||
private _startListening = false;
|
private _startListening = false;
|
||||||
|
|
||||||
public async showDialog(
|
public async showDialog(
|
||||||
@ -71,7 +68,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
|
|
||||||
this._startListening = params.start_listening;
|
this._startListening = params.start_listening;
|
||||||
this._opened = true;
|
this._opened = true;
|
||||||
this._hint = params.hint;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async closeDialog(): Promise<void> {
|
public async closeDialog(): Promise<void> {
|
||||||
@ -189,9 +185,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
size="large"
|
size="large"
|
||||||
></ha-circular-progress>
|
></ha-circular-progress>
|
||||||
</div>`}
|
</div>`}
|
||||||
${this._hint
|
|
||||||
? html`<ha-tip .hass=${this.hass}>${this._hint}</ha-tip>`
|
|
||||||
: nothing}
|
|
||||||
</ha-dialog>
|
</ha-dialog>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -254,7 +247,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
css`
|
css`
|
||||||
ha-dialog {
|
ha-dialog {
|
||||||
--mdc-dialog-max-width: 500px;
|
--mdc-dialog-max-width: 500px;
|
||||||
--mdc-dialog-max-height: 550px;
|
--mdc-dialog-max-height: 500px;
|
||||||
--dialog-content-padding: 0;
|
--dialog-content-padding: 0;
|
||||||
}
|
}
|
||||||
ha-dialog-header a {
|
ha-dialog-header a {
|
||||||
@ -319,9 +312,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
margin: 0 24px 16px;
|
margin: 0 24px 16px;
|
||||||
min-height: 399px;
|
min-height: 399px;
|
||||||
}
|
}
|
||||||
ha-tip {
|
|
||||||
padding-bottom: 16px;
|
|
||||||
}
|
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ const loadVoiceCommandDialog = () => import("./ha-voice-command-dialog");
|
|||||||
export interface VoiceCommandDialogParams {
|
export interface VoiceCommandDialogParams {
|
||||||
pipeline_id: "last_used" | "preferred" | string;
|
pipeline_id: "last_used" | "preferred" | string;
|
||||||
start_listening?: boolean;
|
start_listening?: boolean;
|
||||||
hint?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const showVoiceCommandDialog = (
|
export const showVoiceCommandDialog = (
|
||||||
@ -32,7 +31,6 @@ export const showVoiceCommandDialog = (
|
|||||||
pipeline_id: dialogParams.pipeline_id,
|
pipeline_id: dialogParams.pipeline_id,
|
||||||
// Don't start listening by default for web
|
// Don't start listening by default for web
|
||||||
start_listening: dialogParams.start_listening ?? false,
|
start_listening: dialogParams.start_listening ?? false,
|
||||||
hint: dialogParams.hint,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -730,12 +730,7 @@ class HUIRoot extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _showVoiceCommandDialog(): void {
|
private _showVoiceCommandDialog(): void {
|
||||||
showVoiceCommandDialog(this, this.hass, {
|
showVoiceCommandDialog(this, this.hass, { pipeline_id: "last_used" });
|
||||||
pipeline_id: "last_used",
|
|
||||||
hint: this.hass.enableShortcuts
|
|
||||||
? this.hass.localize("ui.tips.key_a_hint")
|
|
||||||
: undefined,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleEnableEditMode(ev: CustomEvent<RequestSelectedDetail>): void {
|
private _handleEnableEditMode(ev: CustomEvent<RequestSelectedDetail>): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user