mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 18:36:35 +00:00
* Fixes and cleanup * Rename function to genHassioIcons * Update
This commit is contained in:
parent
cd33e2568a
commit
21dcbb3b9d
@ -5,9 +5,11 @@ const {
|
||||
generateIconset,
|
||||
} = require('../../gulp/tasks/gen-icons.js');
|
||||
|
||||
function genHassIcons() {
|
||||
const iconNames = findIcons('./src', 'hassio');
|
||||
const MENU_BUTTON_ICON = 'menu';
|
||||
|
||||
function genHassioIcons() {
|
||||
const iconNames = findIcons('./src', 'hassio').concat(MENU_BUTTON_ICON);
|
||||
fs.writeFileSync('./hassio-icons.html', generateIconset('hassio', iconNames));
|
||||
}
|
||||
|
||||
genHassIcons();
|
||||
genHassioIcons();
|
||||
|
@ -7,7 +7,6 @@ import { html } from '@polymer/polymer/lib/utils/html-tag.js';
|
||||
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
||||
|
||||
import '../../../src/components/ha-menu-button.js';
|
||||
// For hassio-iconset: hassio:menu
|
||||
import '../../../src/resources/ha-style.js';
|
||||
import '../hassio-markdown-dialog.js';
|
||||
import './hassio-addon-audio.js';
|
||||
|
@ -8,7 +8,6 @@ import { html } from '@polymer/polymer/lib/utils/html-tag.js';
|
||||
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
||||
|
||||
import '../../src/components/ha-menu-button.js';
|
||||
// For hassio-iconset: hassio:menu
|
||||
import '../../src/resources/ha-style.js';
|
||||
import './addon-store/hassio-addon-store.js';
|
||||
import './dashboard/hassio-dashboard.js';
|
||||
|
@ -48,6 +48,7 @@ class HaMenuButton extends EventsMixin(PolymerElement) {
|
||||
}
|
||||
|
||||
_getIcon(hassio) {
|
||||
// hass:menu
|
||||
return `${hassio ? 'hassio' : 'hass'}:menu`;
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ class HuiCameraPreviewCard extends PolymerElement {
|
||||
|
||||
_hassChanged(hass) {
|
||||
if (this.lastChild && this._entityId) {
|
||||
const element = this.childNodes[0];
|
||||
const element = this.lastChild;
|
||||
const stateObj = hass.states[this._entityId];
|
||||
element.stateObj = stateObj;
|
||||
element.hass = hass;
|
||||
|
@ -63,7 +63,7 @@ class HuiHistoryGraphCard extends PolymerElement {
|
||||
|
||||
_hassChanged(hass) {
|
||||
if (this.lastChild && this._entityId) {
|
||||
const element = this.childNodes[0];
|
||||
const element = this.lastChild;
|
||||
const stateObj = hass.states[this._entityId];
|
||||
element.stateObj = stateObj;
|
||||
element.hass = hass;
|
||||
|
@ -63,7 +63,7 @@ class HuiMediaControlCard extends PolymerElement {
|
||||
|
||||
_hassChanged(hass) {
|
||||
if (this.lastChild && this._entityId) {
|
||||
const element = this.childNodes[0];
|
||||
const element = this.lastChild;
|
||||
const stateObj = hass.states[this._entityId];
|
||||
element.stateObj = stateObj;
|
||||
element.hass = hass;
|
||||
|
@ -63,7 +63,7 @@ class HuiPlantStatusCard extends PolymerElement {
|
||||
|
||||
_hassChanged(hass) {
|
||||
if (this.lastChild && this._entityId) {
|
||||
const element = this.childNodes[0];
|
||||
const element = this.lastChild;
|
||||
const stateObj = hass.states[this._entityId];
|
||||
element.stateObj = stateObj;
|
||||
element.hass = hass;
|
||||
|
@ -63,7 +63,7 @@ class HuiWeatherForecastCard extends PolymerElement {
|
||||
|
||||
_hassChanged(hass) {
|
||||
if (this.lastChild && this._entityId) {
|
||||
const element = this.childNodes[0];
|
||||
const element = this.lastChild;
|
||||
const stateObj = hass.states[this._entityId];
|
||||
element.stateObj = stateObj;
|
||||
element.hass = hass;
|
||||
|
Loading…
x
Reference in New Issue
Block a user