Fix circular progress size + fix bug in assist pipeline debug (#19268)

This commit is contained in:
Bram Kragten 2024-01-04 03:21:42 +01:00 committed by GitHub
parent 0d8c0ac1a0
commit 4f05bd9e22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -47,7 +47,7 @@ export class HaAuthTextField extends HaTextField {
// TODO: live() directive needs casting for lit-analyzer
// https://github.com/runem/lit-analyzer/pull/91/files
// TODO: lit-analyzer labels min/max as (number|string) instead of string
return html` <input
return html`<input
aria-labelledby=${ifDefined(ariaLabelledbyOrUndef)}
aria-controls=${ifDefined(ariaControlsOrUndef)}
aria-describedby=${ifDefined(ariaDescribedbyOrUndef)}

View File

@ -53,7 +53,7 @@ class MediaUploadButton extends LitElement {
${this._uploading > 0
? html`
<ha-circular-progress
size="tiny"
size="small"
indeterminate
area-label="Uploading"
slot="icon"

View File

@ -326,7 +326,7 @@ class DialogSystemInformation extends LitElement {
value = html`
<ha-circular-progress
indeterminate
size="tiny"
size="small"
></ha-circular-progress>
`;
} else if (info.type === "failed") {

View File

@ -247,7 +247,7 @@ export class AssistPipelineRunDebug extends LitElement {
}
// Play audio when we're done.
if (updatedRun.stage === "done") {
if (updatedRun.stage === "done" && !updatedRun.error) {
const url = updatedRun.tts!.tts_output!.url;
const audio = new Audio(url);
audio.addEventListener("ended", () => {
@ -261,7 +261,10 @@ export class AssistPipelineRunDebug extends LitElement {
}
});
audio.play();
} else if (updatedRun.stage === "error") {
} else if (
(updatedRun.stage === "done" && updatedRun.error) ||
updatedRun.stage === "error"
) {
this._finished = true;
}
},

View File

@ -90,7 +90,7 @@ const renderProgress = (
return html``;
}
return html`
<ha-circular-progress size="tiny" indeterminate></ha-circular-progress>
<ha-circular-progress size="small" indeterminate></ha-circular-progress>
`;
}