mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 06:16:33 +00:00
Fix the automation picker icons (#8790)
This commit is contained in:
parent
1fb3663398
commit
b6f59d3c98
@ -1,5 +1,12 @@
|
|||||||
import "@material/mwc-icon-button";
|
import "@material/mwc-icon-button";
|
||||||
import { mdiHelpCircle, mdiPlus } from "@mdi/js";
|
import {
|
||||||
|
mdiHelpCircle,
|
||||||
|
mdiHistory,
|
||||||
|
mdiInformationOutline,
|
||||||
|
mdiPencil,
|
||||||
|
mdiPencilOff,
|
||||||
|
mdiPlus,
|
||||||
|
} from "@mdi/js";
|
||||||
import "@polymer/paper-tooltip/paper-tooltip";
|
import "@polymer/paper-tooltip/paper-tooltip";
|
||||||
import {
|
import {
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -148,14 +155,15 @@ class HaAutomationPicker extends LitElement {
|
|||||||
title: "",
|
title: "",
|
||||||
type: "icon-button",
|
type: "icon-button",
|
||||||
template: (_info, automation) => html`
|
template: (_info, automation) => html`
|
||||||
<ha-icon-button
|
<mwc-icon-button
|
||||||
.automation=${automation}
|
.automation=${automation}
|
||||||
@click=${this._showInfo}
|
@click=${this._showInfo}
|
||||||
icon="hass:information-outline"
|
.label="${this.hass.localize(
|
||||||
title="${this.hass.localize(
|
|
||||||
"ui.panel.config.automation.picker.show_info_automation"
|
"ui.panel.config.automation.picker.show_info_automation"
|
||||||
)}"
|
)}"
|
||||||
></ha-icon-button>
|
>
|
||||||
|
<ha-svg-icon .path=${mdiInformationOutline}></ha-svg-icon>
|
||||||
|
</mwc-icon-button>
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
columns.trace = {
|
columns.trace = {
|
||||||
@ -169,13 +177,14 @@ class HaAutomationPicker extends LitElement {
|
|||||||
: undefined
|
: undefined
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ha-icon-button
|
<mwc-icon-button
|
||||||
icon="hass:graph-outline"
|
.label=${this.hass.localize(
|
||||||
.disabled=${!automation.attributes.id}
|
|
||||||
title="${this.hass.localize(
|
|
||||||
"ui.panel.config.automation.picker.dev_automation"
|
"ui.panel.config.automation.picker.dev_automation"
|
||||||
)}"
|
)}
|
||||||
></ha-icon-button>
|
.disabled=${!automation.attributes.id}
|
||||||
|
>
|
||||||
|
<ha-svg-icon .path=${mdiHistory}></ha-svg-icon>
|
||||||
|
</mwc-icon-button>
|
||||||
</a>
|
</a>
|
||||||
${!automation.attributes.id
|
${!automation.attributes.id
|
||||||
? html`
|
? html`
|
||||||
@ -199,17 +208,17 @@ class HaAutomationPicker extends LitElement {
|
|||||||
: undefined
|
: undefined
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ha-icon-button
|
<mwc-icon-button
|
||||||
.icon=${automation.attributes.id
|
|
||||||
? "hass:pencil"
|
|
||||||
: "hass:pencil-off"}
|
|
||||||
.disabled=${!automation.attributes.id}
|
.disabled=${!automation.attributes.id}
|
||||||
title="${this.hass.localize(
|
.label="${this.hass.localize(
|
||||||
"ui.panel.config.automation.picker.edit_automation"
|
"ui.panel.config.automation.picker.edit_automation"
|
||||||
)}"
|
)}"
|
||||||
></ha-icon-button>
|
><ha-svg-icon .path=${
|
||||||
|
automation.attributes.id ? mdiPencil : mdiPencilOff
|
||||||
|
}></ha-svg-icon>
|
||||||
</a>
|
</a>
|
||||||
${!automation.attributes.id
|
${
|
||||||
|
!automation.attributes.id
|
||||||
? html`
|
? html`
|
||||||
<paper-tooltip animation-delay="0" position="left">
|
<paper-tooltip animation-delay="0" position="left">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
@ -217,7 +226,8 @@ class HaAutomationPicker extends LitElement {
|
|||||||
)}
|
)}
|
||||||
</paper-tooltip>
|
</paper-tooltip>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
return columns;
|
return columns;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user