mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-02 05:57:54 +00:00
Fixed extra space issue + RTL support when no entries
This commit is contained in:
parent
ba67b1291f
commit
346eb78c4e
@ -19,6 +19,7 @@ import "../../components/ha-icon";
|
|||||||
import { LogbookEntry } from "../../data/logbook";
|
import { LogbookEntry } from "../../data/logbook";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import { restoreScroll } from "../../common/decorators/restore-scroll";
|
import { restoreScroll } from "../../common/decorators/restore-scroll";
|
||||||
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
|
|
||||||
class HaLogbook extends LitElement {
|
class HaLogbook extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
@ -48,7 +49,7 @@ class HaLogbook extends LitElement {
|
|||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
if (!this.entries?.length) {
|
if (!this.entries?.length) {
|
||||||
return html`
|
return html`
|
||||||
<div class="container">
|
<div class=${classMap({ container: true, rtl: this._rtl })}>
|
||||||
${this.hass.localize("ui.panel.logbook.entries_not_found")}
|
${this.hass.localize("ui.panel.logbook.entries_not_found")}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@ -106,9 +107,8 @@ class HaLogbook extends LitElement {
|
|||||||
@click=${this._entityClicked}
|
@click=${this._entityClicked}
|
||||||
.entityId=${item.entity_id}
|
.entityId=${item.entity_id}
|
||||||
class="name"
|
class="name"
|
||||||
|
>${item.name}</a
|
||||||
>
|
>
|
||||||
${item.name}
|
|
||||||
</a>
|
|
||||||
`}
|
`}
|
||||||
<span
|
<span
|
||||||
>${item.message}${item_username
|
>${item.message}${item_username
|
||||||
@ -177,6 +177,9 @@ class HaLogbook extends LitElement {
|
|||||||
.container {
|
.container {
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
|
.container.rtl {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
|
||||||
.uni-virtualizer-host {
|
.uni-virtualizer-host {
|
||||||
display: block;
|
display: block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user