mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-19 00:26:33 +00:00
Improve stream and iOS checks in error-log-card (#22738)
Improve stream and download checks in error-log-card
This commit is contained in:
parent
d8df380edc
commit
bee629f7ed
@ -339,31 +339,26 @@ class ErrorLogCard extends LitElement {
|
|||||||
|
|
||||||
protected willUpdate(changedProps: PropertyValues) {
|
protected willUpdate(changedProps: PropertyValues) {
|
||||||
super.willUpdate(changedProps);
|
super.willUpdate(changedProps);
|
||||||
if (
|
if (!this.hasUpdated) {
|
||||||
this._downloadSupported === undefined ||
|
|
||||||
this._streamSupported === undefined
|
|
||||||
) {
|
|
||||||
this._downloadSupported = downloadFileSupported(this.hass);
|
this._downloadSupported = downloadFileSupported(this.hass);
|
||||||
this._streamSupported = atLeastVersion(
|
this._streamSupported =
|
||||||
this.hass.config.version,
|
!__SUPERVISOR__ || atLeastVersion(this.hass.config.version, 2024, 11);
|
||||||
2024,
|
|
||||||
11
|
// just needs to be loaded once, because only the host endpoints provide boots information
|
||||||
|
this._loadBoots();
|
||||||
|
|
||||||
|
window.addEventListener(
|
||||||
|
"connection-status",
|
||||||
|
this._handleConnectionStatus
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.hass.loadFragmentTranslation("config");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changedProps.has("provider")) {
|
if (changedProps.has("provider")) {
|
||||||
this._boot = 0;
|
this._boot = 0;
|
||||||
this._loadLogs();
|
this._loadLogs();
|
||||||
}
|
}
|
||||||
if (this.hasUpdated) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// just needs to be loaded once, because only the host endpoints provide boots information
|
|
||||||
this._loadBoots();
|
|
||||||
|
|
||||||
window.addEventListener("connection-status", this._handleConnectionStatus);
|
|
||||||
|
|
||||||
this.hass.loadFragmentTranslation("config");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected firstUpdated(changedProps: PropertyValues) {
|
protected firstUpdated(changedProps: PropertyValues) {
|
||||||
|
@ -2,4 +2,4 @@ import type { HomeAssistant } from "../types";
|
|||||||
import { isSafari } from "./is_safari";
|
import { isSafari } from "./is_safari";
|
||||||
|
|
||||||
export const isIosApp = (hass: HomeAssistant): boolean =>
|
export const isIosApp = (hass: HomeAssistant): boolean =>
|
||||||
isSafari && !!hass.auth.external;
|
!!hass.auth.external && isSafari;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user