Compare commits

...
4 changed files with 41 additions and 14 deletions

No files matched your search

@@ -620,15 +620,14 @@ class MoreInfoWeather extends LitElement {
}
.temp-attribute .temp {
position: relative;
margin-right: var(--ha-space-6);
direction: ltr;
}
.temp-attribute .temp span {
position: absolute;
position: relative;
font-size: var(--ha-font-size-2xl);
top: 1px;
vertical-align: top;
}
.state,
@@ -95,6 +95,23 @@ class DialogStartupProgress extends DialogMixin(LitElement) {
.slice(0, MAX_SLOWEST);
});
}
if (changedProps.has("_progress") || changedProps.has("_setups")) {
this._loadTitles();
}
}
private _loadTitles() {
const progress = this._progress
? this._computeProgress(this._progress, this._config.config.state)
: undefined;
const domains = [
...(progress?.active.map(([domain]) => domain) ?? []),
...(progress?.failed ?? []),
...(this._setups?.map((setup) => setup.domain) ?? []),
];
if (domains.length) {
this._i18n.loadBackendTranslation("title", domains);
}
}
protected render() {
@@ -820,15 +820,14 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
}
.temp-attribute .temp {
position: relative;
margin-right: 24px;
direction: ltr;
}
.temp-attribute .temp span {
position: absolute;
position: relative;
font-size: var(--ha-font-size-2xl);
top: 1px;
vertical-align: top;
}
.state,
@@ -1025,12 +1024,6 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
font-size: var(--ha-font-size-xl);
}
[class*="narrow"] .temp-attribute .temp {
margin-right: 16px;
margin-inline-end: 16px;
margin-inline-start: initial;
}
[class*="narrow"] .temp span {
top: 1px;
font-size: var(--ha-font-size-l);
+20 -2
View File
@@ -28,12 +28,20 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
private _startupToastKey?: string;
private _startupDetailsOpen = false;
private _disconnectedTimeout?: number;
protected firstUpdated(changedProps: PropertyValues<this>) {
super.firstUpdated(changedProps);
// Need to load in advance because when disconnected, can't dynamically load code.
setTimeout(() => import("../managers/notification-manager"), 5000);
this.addEventListener("dialog-closed", (ev) => {
if (ev.detail.dialog === "dialog-startup-progress") {
this._startupDetailsOpen = false;
this._updateStartupProgress();
}
});
}
updated(changedProperties: PropertyValues<this>) {
@@ -135,6 +143,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
// Wait until the translations are available.
if (
!this._startupProgressVisible ||
this._startupDetailsOpen ||
!this.hass!.localize("ui.startup_progress.starting")
) {
return;
@@ -163,13 +172,19 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
? {
text: { translationKey: "ui.startup_progress.details" },
icon: mdiInformationOutline,
keepOpen: true,
action: () => showStartupProgressDialog(this),
action: () => this._showStartupDetails(),
}
: undefined,
});
}
// Toasts always show above dialogs, so the toast is hidden while the details are open.
private _showStartupDetails() {
this._startupDetailsOpen = true;
this._startupToastKey = undefined;
showStartupProgressDialog(this);
}
// Keeps the subscription, so the completion toast still reflects late failures.
private _hideStartupProgress() {
this._startupProgressVisible = false;
@@ -193,6 +208,9 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
);
this._hideStartupProgress();
this._unsubscribeBootstrapProgress();
if (this._startupDetailsOpen) {
return;
}
const issues = failed.length;
showToast(this, {
id: SERVER_STARTUP_TOAST_ID,