hassio fixes (#11688)

This commit is contained in:
Bram Kragten 2022-02-14 22:33:12 +01:00 committed by GitHub
parent 523afe2f6f
commit fc654d86c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 21 deletions

View File

@ -221,13 +221,14 @@ class HassioAddonStore extends LitElement {
margin-top: 24px;
}
.search {
padding: 0 16px;
background: var(--sidebar-background-color);
border-bottom: 1px solid var(--divider-color);
position: sticky;
top: 0;
z-index: 2;
}
.search search-input {
position: relative;
top: 2px;
search-input {
display: block;
--mdc-text-field-fill-color: var(--sidebar-background-color);
--mdc-text-field-idle-line-color: var(--divider-color);
}
.advanced {
padding: 12px;

View File

@ -56,8 +56,8 @@ class HassioAddonAudio extends LitElement {
${this._error
? html`<ha-alert alert-type="error">${this._error}</ha-alert>`
: ""}
<mwc-select
${this._inputDevices &&
html`<mwc-select
.label=${this.supervisor.localize(
"addon.configuration.audio.input"
)}
@ -67,16 +67,16 @@ class HassioAddonAudio extends LitElement {
naturalMenuWidth
.value=${this._selectedInput!}
>
${this._inputDevices &&
this._inputDevices.map(
${this._inputDevices.map(
(item) => html`
<mwc-list-item .value=${item.device || ""}>
${item.name}
</mwc-list-item>
`
)}
</mwc-select>
<mwc-select
</mwc-select>`}
${this._outputDevices &&
html`<mwc-select
.label=${this.supervisor.localize(
"addon.configuration.audio.output"
)}
@ -86,15 +86,14 @@ class HassioAddonAudio extends LitElement {
naturalMenuWidth
.value=${this._selectedOutput!}
>
${this._outputDevices &&
this._outputDevices.map(
${this._outputDevices.map(
(item) => html`
<mwc-list-item .value=${item.device || ""}
>${item.name}</mwc-list-item
>
`
)}
</mwc-select>
</mwc-select>`}
</div>
<div class="card-actions">
<ha-progress-button @click=${this._saveSettings}>
@ -121,12 +120,18 @@ class HassioAddonAudio extends LitElement {
.card-actions {
text-align: right;
}
mwc-select {
width: 100%;
}
mwc-select:last-child {
margin-top: 8px;
}
`,
];
}
protected update(changedProperties: PropertyValues): void {
super.update(changedProperties);
protected willUpdate(changedProperties: PropertyValues): void {
super.willUpdate(changedProperties);
if (changedProperties.has("addon")) {
this._addonChanged();
}

View File

@ -178,7 +178,7 @@ class HassioHardwareDialog extends LitElement {
padding: 0.2em 0.4em;
}
search-input {
margin: 0 16px;
margin: 8px 16px 0;
display: block;
}
.device-property {

View File

@ -146,8 +146,8 @@ class HassioSupervisorLog extends LitElement {
white-space: pre-wrap;
}
mwc-select {
padding: 0 2%;
width: 96%;
width: 100%;
margin-bottom: 4px;
}
`,
];

View File

@ -10,7 +10,6 @@ import {
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../../src/common/dom/fire_event";
import "../../../src/common/search/search-input";
import "../../../src/components/buttons/ha-progress-button";
import "../../../src/components/ha-alert";
import "../../../src/components/ha-button-menu";