Visual alignment of automation and script more info dialogs (#8234)

This commit is contained in:
Philip Allgaier 2021-01-26 10:25:34 +01:00 committed by GitHub
parent cf43b26e14
commit 0a09ec706f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 5 deletions

View File

@ -57,7 +57,9 @@ class MoreInfoAutomation extends LitElement {
}
.actions {
margin: 8px 0;
text-align: right;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
`;
}

View File

@ -1,5 +1,7 @@
import { HassEntity } from "home-assistant-js-websocket";
import {
css,
CSSResult,
customElement,
html,
LitElement,
@ -21,10 +23,12 @@ class MoreInfoScript extends LitElement {
}
return html`
<div class="flex">
<div>
${this.hass.localize(
"ui.dialogs.more_info_control.script.last_triggered"
)}:
</div>
${this.stateObj.attributes.last_triggered
? html`
<ha-relative-time
@ -36,6 +40,15 @@ class MoreInfoScript extends LitElement {
</div>
`;
}
static get styles(): CSSResult {
return css`
.flex {
display: flex;
justify-content: space-between;
}
`;
}
}
declare global {