Add icon at unsupported message in voice settings (#16358)

This commit is contained in:
Bram Kragten 2023-05-01 14:28:26 +02:00 committed by GitHub
parent 3f2aac0842
commit 2fb1dd0ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import { mdiAlertCircle } from "@mdi/js";
import {
css,
CSSResultGroup,
@ -32,8 +33,8 @@ import {
updateEntityRegistryEntry,
} from "../../../data/entity_registry";
import {
GoogleEntity,
fetchCloudGoogleEntity,
GoogleEntity,
} from "../../../data/google_assistant";
import { exposeEntities, voiceAssistants } from "../../../data/voice";
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
@ -223,7 +224,8 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
/>
<span slot="heading">${voiceAssistants[key].name}</span>
${!supported
? html`<div slot="description">
? html`<div slot="description" class="unsupported">
<ha-svg-icon .path=${mdiAlertCircle}></ha-svg-icon>
${this.hass.localize(
"ui.dialogs.voice-settings.unsupported"
)}
@ -379,6 +381,15 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
ha-checkbox {
--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 {
margin-top: 8px;
margin-bottom: 4px;