Fix spinner position logbook (#6306)

This commit is contained in:
Bram Kragten 2020-07-02 17:55:06 +02:00 committed by GitHub
parent 750e7b1262
commit 06a94f0f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,10 +113,12 @@ export class HaPanelLogbook extends LitElement {
</div>
${this._isLoading
? html`<ha-circular-progress
active
alt=${this.hass.localize("ui.common.loading")}
></ha-circular-progress>`
? html`<div class="progress-wrapper">
<ha-circular-progress
active
alt=${this.hass.localize("ui.common.loading")}
></ha-circular-progress>
</div>`
: html`<ha-logbook
.hass=${this.hass}
.entries=${this._entries}
@ -248,11 +250,13 @@ export class HaPanelLogbook extends LitElement {
return [
haStyle,
css`
ha-logbook {
ha-logbook,
.progress-wrapper {
height: calc(100vh - 136px);
}
:host([narrow]) ha-logbook {
:host([narrow]) ha-logbook,
:host([narrow]) .progress-wrapper {
height: calc(100vh - 198px);
}
@ -265,6 +269,10 @@ export class HaPanelLogbook extends LitElement {
margin-right: 0;
}
.progress-wrapper {
position: relative;
}
ha-circular-progress {
position: absolute;
left: 50%;
@ -272,10 +280,6 @@ export class HaPanelLogbook extends LitElement {
transform: translate(-50%, -50%);
}
.wrap {
margin-bottom: 24px;
}
.filters {
display: flex;
align-items: flex-end;