Move log item level position + color in detail popup header (#8270)

This commit is contained in:
Philip Allgaier 2021-03-06 18:58:29 +01:00 committed by GitHub
parent d784a30d42
commit 4d3d27f2c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -72,11 +72,7 @@ class DialogSystemLogDetail extends LitElement {
<ha-svg-icon .path=${mdiClose}></ha-svg-icon> <ha-svg-icon .path=${mdiClose}></ha-svg-icon>
</mwc-icon-button> </mwc-icon-button>
<span slot="title"> <span slot="title">
${this.hass.localize( ${this.hass.localize("ui.panel.config.logs.details", "level", html`<span class="${item.level.toLowerCase()}">${item.level}</span>`)}
"ui.panel.config.logs.details",
"level",
item.level
)}
</span> </span>
<mwc-icon-button id="copy" @click=${this._copyLog} slot="actionItems"> <mwc-icon-button id="copy" @click=${this._copyLog} slot="actionItems">
<ha-svg-icon .path=${mdiContentCopy}></ha-svg-icon> <ha-svg-icon .path=${mdiContentCopy}></ha-svg-icon>
@ -176,6 +172,12 @@ class DialogSystemLogDetail extends LitElement {
margin-bottom: 0; margin-bottom: 0;
font-family: var(--code-font-family, monospace); font-family: var(--code-font-family, monospace);
} }
.error {
color: var(--error-color);
}
.warning {
color: var(--warning-color);
}
ha-header-bar { ha-header-bar {
--mdc-theme-on-primary: var(--primary-text-color); --mdc-theme-on-primary: var(--primary-text-color);

View File

@ -71,15 +71,15 @@ export class SystemLogCard extends LitElement {
this.hass!.language this.hass!.language
)} )}
${html`(<span class="${item.level.toLowerCase()}"
>${item.level}</span
>) `}
${integrations[idx] ${integrations[idx]
? domainToName( ? domainToName(
this.hass!.localize, this.hass!.localize,
integrations[idx]! integrations[idx]!
) )
: item.source[0]} : item.source[0]}
${html`(<span class="${item.level.toLowerCase()}"
>${item.level}</span
>)`}
${item.count > 1 ${item.count > 1
? html` ? html`
- -