mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Add icon at unsupported message in voice settings (#16358)
This commit is contained in:
parent
3f2aac0842
commit
2fb1dd0ec1
@ -1,3 +1,4 @@
|
|||||||
|
import { mdiAlertCircle } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResultGroup,
|
CSSResultGroup,
|
||||||
@ -32,8 +33,8 @@ import {
|
|||||||
updateEntityRegistryEntry,
|
updateEntityRegistryEntry,
|
||||||
} from "../../../data/entity_registry";
|
} from "../../../data/entity_registry";
|
||||||
import {
|
import {
|
||||||
GoogleEntity,
|
|
||||||
fetchCloudGoogleEntity,
|
fetchCloudGoogleEntity,
|
||||||
|
GoogleEntity,
|
||||||
} from "../../../data/google_assistant";
|
} from "../../../data/google_assistant";
|
||||||
import { exposeEntities, voiceAssistants } from "../../../data/voice";
|
import { exposeEntities, voiceAssistants } from "../../../data/voice";
|
||||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||||
@ -223,7 +224,8 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
/>
|
/>
|
||||||
<span slot="heading">${voiceAssistants[key].name}</span>
|
<span slot="heading">${voiceAssistants[key].name}</span>
|
||||||
${!supported
|
${!supported
|
||||||
? html`<div slot="description">
|
? html`<div slot="description" class="unsupported">
|
||||||
|
<ha-svg-icon .path=${mdiAlertCircle}></ha-svg-icon>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.dialogs.voice-settings.unsupported"
|
"ui.dialogs.voice-settings.unsupported"
|
||||||
)}
|
)}
|
||||||
@ -379,6 +381,15 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
ha-checkbox {
|
ha-checkbox {
|
||||||
--mdc-checkbox-state-layer-size: 40px;
|
--mdc-checkbox-state-layer-size: 40px;
|
||||||
}
|
}
|
||||||
|
.unsupported {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.unsupported ha-svg-icon {
|
||||||
|
color: var(--error-color);
|
||||||
|
--mdc-icon-size: 16px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user