mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Logbook card: fix height in Panel view (#24745)
* fix height in Panel * Update src/panels/lovelace/cards/hui-logbook-card.ts Co-authored-by: Paul Bottein <paul.bottein@gmail.com> * prettier --------- Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
parent
b24f185d62
commit
8dab7c598e
@ -52,6 +52,8 @@ export class HuiLogbookCard extends LitElement implements LovelaceCard {
|
|||||||
|
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
|
@property({ attribute: false }) public layout?: string;
|
||||||
|
|
||||||
@state() private _config?: LogbookCardConfig;
|
@state() private _config?: LogbookCardConfig;
|
||||||
|
|
||||||
@state() private _time?: HaLogbook["time"];
|
@state() private _time?: HaLogbook["time"];
|
||||||
@ -139,6 +141,13 @@ export class HuiLogbookCard extends LitElement implements LovelaceCard {
|
|||||||
resolveEntityIDs(this.hass, targetPickerValue, entities, devices, areas)
|
resolveEntityIDs(this.hass, targetPickerValue, entities, devices, areas)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
protected update(changedProperties) {
|
||||||
|
super.update(changedProperties);
|
||||||
|
if (changedProperties.has("layout")) {
|
||||||
|
this.toggleAttribute("ispanel", this.layout === "panel");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected updated(changedProperties: PropertyValues) {
|
protected updated(changedProperties: PropertyValues) {
|
||||||
super.updated(changedProperties);
|
super.updated(changedProperties);
|
||||||
if (!this._config || !this.hass) {
|
if (!this._config || !this.hass) {
|
||||||
@ -214,6 +223,11 @@ export class HuiLogbookCard extends LitElement implements LovelaceCard {
|
|||||||
height: 385px;
|
height: 385px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host([ispanel]) .content,
|
||||||
|
:host([ispanel]) ha-logbook {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user