Fix logbook height (#9258)

This commit is contained in:
Bram Kragten 2021-05-26 12:44:10 +02:00 committed by GitHub
parent f7ef8180e4
commit 27845a7345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ import "../../components/state-history-charts";
import { getLogbookData, LogbookEntry } from "../../data/logbook"; import { getLogbookData, LogbookEntry } from "../../data/logbook";
import { loadTraceContexts, TraceContexts } from "../../data/trace"; import { loadTraceContexts, TraceContexts } from "../../data/trace";
import "../../panels/logbook/ha-logbook"; import "../../panels/logbook/ha-logbook";
import { haStyle, haStyleScrollbar } from "../../resources/styles"; import { haStyle } from "../../resources/styles";
import { HomeAssistant } from "../../types"; import { HomeAssistant } from "../../types";
import { closeDialog } from "../make-dialog-manager"; import { closeDialog } from "../make-dialog-manager";
@ -52,7 +52,6 @@ export class MoreInfoLogbook extends LitElement {
: this._logbookEntries.length : this._logbookEntries.length
? html` ? html`
<ha-logbook <ha-logbook
class="ha-scrollbar"
narrow narrow
no-icon no-icon
no-name no-name
@ -149,7 +148,6 @@ export class MoreInfoLogbook extends LitElement {
static get styles() { static get styles() {
return [ return [
haStyle, haStyle,
haStyleScrollbar,
css` css`
.no-entries { .no-entries {
text-align: center; text-align: center;
@ -157,12 +155,11 @@ export class MoreInfoLogbook extends LitElement {
color: var(--secondary-text-color); color: var(--secondary-text-color);
} }
ha-logbook { ha-logbook {
max-height: 250px; --logbook-max-height: 250px;
overflow: auto;
} }
@media all and (max-width: 450px), all and (max-height: 500px) { @media all and (max-width: 450px), all and (max-height: 500px) {
ha-logbook { ha-logbook {
max-height: unset; --logbook-max-height: unset;
} }
} }
ha-circular-progress { ha-circular-progress {

View File

@ -349,6 +349,10 @@ class HaLogbook extends LitElement {
color: var(--primary-color); color: var(--primary-color);
} }
.container {
max-height: var(--logbook-max-height);
}
:host([virtualize]) .container { :host([virtualize]) .container {
display: block; display: block;
position: relative; position: relative;

View File

@ -290,7 +290,6 @@ export class HuiLogbookCard extends LitElement implements LovelaceCard {
ha-logbook { ha-logbook {
height: 385px; height: 385px;
overflow: auto;
display: block; display: block;
} }