Cleanup more info styling (#7004)

This commit is contained in:
Bram Kragten 2020-09-15 00:07:45 +02:00 committed by GitHub
parent 8a9d5f7753
commit 7628569579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 21 deletions

View File

@ -32,7 +32,7 @@ class MoreInfoPerson extends LitElement {
return html` return html`
<ha-attributes <ha-attributes
.stateObj=${this.stateObj} .stateObj=${this.stateObj}
extraFilters="id,user_id,editable" extra-filters="id,user_id,editable"
></ha-attributes> ></ha-attributes>
${this.stateObj.attributes.latitude && this.stateObj.attributes.longitude ${this.stateObj.attributes.latitude && this.stateObj.attributes.longitude
? html` ? html`
@ -78,6 +78,9 @@ class MoreInfoPerson extends LitElement {
margin: 36px 0 8px 0; margin: 36px 0 8px 0;
text-align: right; text-align: right;
} }
ha-map {
margin-top: 16px;
}
`; `;
} }
} }

View File

@ -26,10 +26,8 @@ import { navigate } from "../../common/navigate";
import "../../components/ha-dialog"; import "../../components/ha-dialog";
import "../../components/ha-header-bar"; import "../../components/ha-header-bar";
import "../../components/ha-svg-icon"; import "../../components/ha-svg-icon";
import "../../components/state-history-charts";
import { removeEntityRegistryEntry } from "../../data/entity_registry"; import { removeEntityRegistryEntry } from "../../data/entity_registry";
import { showEntityEditorDialog } from "../../panels/config/entities/show-dialog-entity-editor"; import { showEntityEditorDialog } from "../../panels/config/entities/show-dialog-entity-editor";
import "../../panels/logbook/ha-logbook";
import { haStyleDialog } from "../../resources/styles"; import { haStyleDialog } from "../../resources/styles";
import "../../state-summary/state-card-content"; import "../../state-summary/state-card-content";
import { HomeAssistant } from "../../types"; import { HomeAssistant } from "../../types";
@ -394,7 +392,9 @@ export class MoreInfoDialog extends LitElement {
--dialog-content-padding: 0; --dialog-content-padding: 0;
} }
state-card-content { state-card-content,
ha-more-info-history,
ha-more-info-logbook:not(:last-child) {
display: block; display: block;
margin-bottom: 16px; margin-bottom: 16px;
} }

View File

@ -1,5 +1,4 @@
import { import {
css,
customElement, customElement,
html, html,
internalProperty, internalProperty,
@ -13,7 +12,6 @@ import { throttle } from "../../common/util/throttle";
import "../../components/state-history-charts"; import "../../components/state-history-charts";
import { getRecentWithCache } from "../../data/cached-history"; import { getRecentWithCache } from "../../data/cached-history";
import { HistoryResult } from "../../data/history"; import { HistoryResult } from "../../data/history";
import { haStyle } from "../../resources/styles";
import { HomeAssistant } from "../../types"; import { HomeAssistant } from "../../types";
@customElement("ha-more-info-history") @customElement("ha-more-info-history")
@ -88,18 +86,6 @@ export class MoreInfoHistory extends LitElement {
this.hass!.language this.hass!.language
); );
} }
static get styles() {
return [
haStyle,
css`
state-history-charts {
display: block;
margin-bottom: 16px;
}
`,
];
}
} }
declare global { declare global {

View File

@ -152,8 +152,6 @@ export class MoreInfoLogbook extends LitElement {
ha-logbook { ha-logbook {
max-height: 250px; max-height: 250px;
overflow: auto; overflow: auto;
display: block;
margin-top: 16px;
} }
ha-circular-progress { ha-circular-progress {
display: flex; display: flex;

View File

@ -285,7 +285,7 @@ class HaLogbook extends LitElement {
.narrow .entry { .narrow .entry {
flex-direction: column; flex-direction: column;
line-height: 1.5; line-height: 1.5;
padding: 8px; padding: 8px 0;
} }
.narrow .icon-message ha-icon { .narrow .icon-message ha-icon {