Color all deletion options consistenly red (#6891)

* Color all deletion options consistenly red

* CSS cleanup

* Color the "Remove Selected" entity config button

* Make eslint happy

* Getting rid of a wayward bracket
This commit is contained in:
Philip Allgaier 2020-09-09 20:48:51 +02:00 committed by GitHub
parent 42bf350034
commit 1890aab1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 115 additions and 108 deletions

View File

@ -336,7 +336,6 @@ export default class HaAutomationActionRow extends LitElement {
--mdc-theme-text-primary-on-background: var(--disabled-text-color); --mdc-theme-text-primary-on-background: var(--disabled-text-color);
} }
.warning { .warning {
color: var(--warning-color);
margin-bottom: 8px; margin-bottom: 8px;
} }
.warning ul { .warning ul {

View File

@ -104,6 +104,7 @@ export class HaAutomationEditor extends LitElement {
<ha-svg-icon .path=${mdiContentDuplicate}></ha-svg-icon> <ha-svg-icon .path=${mdiContentDuplicate}></ha-svg-icon>
</mwc-icon-button> </mwc-icon-button>
<mwc-icon-button <mwc-icon-button
class="warning"
slot="toolbar-icon" slot="toolbar-icon"
title="${this.hass.localize( title="${this.hass.localize(
"ui.panel.config.automation.picker.delete_automation" "ui.panel.config.automation.picker.delete_automation"

View File

@ -58,6 +58,7 @@ import {
loadEntityEditorDialog, loadEntityEditorDialog,
showEntityEditorDialog, showEntityEditorDialog,
} from "./show-dialog-entity-editor"; } from "./show-dialog-entity-editor";
import { haStyle } from "../../../resources/styles";
export interface StateEntity extends EntityRegistryEntry { export interface StateEntity extends EntityRegistryEntry {
readonly?: boolean; readonly?: boolean;
@ -378,7 +379,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
"ui.panel.config.entities.picker.disable_selected.button" "ui.panel.config.entities.picker.disable_selected.button"
)}</mwc-button )}</mwc-button
> >
<mwc-button @click=${this._removeSelected} <mwc-button @click=${this._removeSelected} class="warning"
>${this.hass.localize( >${this.hass.localize(
"ui.panel.config.entities.picker.remove_selected.button" "ui.panel.config.entities.picker.remove_selected.button"
)}</mwc-button )}</mwc-button
@ -406,6 +407,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
)} )}
</paper-tooltip> </paper-tooltip>
<ha-icon-button <ha-icon-button
class="warning"
id="remove-btn" id="remove-btn"
icon="hass:delete" icon="hass:delete"
@click=${this._removeSelected} @click=${this._removeSelected}
@ -721,8 +723,10 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
navigate(this, window.location.pathname, true); navigate(this, window.location.pathname, true);
} }
static get styles(): CSSResult { static get styles(): CSSResult[] {
return css` return [
haStyle,
css`
hass-loading-screen { hass-loading-screen {
--app-header-background-color: var(--sidebar-background-color); --app-header-background-color: var(--sidebar-background-color);
--app-header-text-color: var(--sidebar-text-color); --app-header-text-color: var(--sidebar-text-color);
@ -826,6 +830,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
left: 0; left: 0;
content: ""; content: "";
} }
`; `,
];
} }
} }

View File

@ -198,6 +198,7 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
? "" ? ""
: html` : html`
<ha-icon-button <ha-icon-button
class="warning"
slot="toolbar-icon" slot="toolbar-icon"
title="${this.hass.localize( title="${this.hass.localize(
"ui.panel.config.scene.picker.delete_scene" "ui.panel.config.scene.picker.delete_scene"

View File

@ -74,6 +74,7 @@ export class HaScriptEditor extends LitElement {
? "" ? ""
: html` : html`
<ha-icon-button <ha-icon-button
class="warning"
slot="toolbar-icon" slot="toolbar-icon"
title="${this.hass.localize( title="${this.hass.localize(
"ui.panel.config.script.editor.delete_script" "ui.panel.config.script.editor.delete_script"