mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 04:16:34 +00:00
Lint fixes
This commit is contained in:
parent
4029f16e97
commit
ff0e24fecb
@ -65,6 +65,10 @@ Polymer({
|
|||||||
hass: {
|
hass: {
|
||||||
type: Object,
|
type: Object,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
entryObj: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
entityClicked: function (ev) {
|
entityClicked: function (ev) {
|
||||||
|
@ -32,6 +32,10 @@ Polymer({
|
|||||||
hass: {
|
hass: {
|
||||||
type: Object,
|
type: Object,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
stateObj: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
computeTitle: function (stateObj) {
|
computeTitle: function (stateObj) {
|
||||||
|
@ -39,6 +39,10 @@ Polymer({
|
|||||||
is: 'ha-labeled-slider',
|
is: 'ha-labeled-slider',
|
||||||
|
|
||||||
properties: {
|
properties: {
|
||||||
|
caption: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
|
||||||
icon: {
|
icon: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
40
src/components/ha-menu-button.html
Normal file
40
src/components/ha-menu-button.html
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<dom-module id='ha-menu-button'>
|
||||||
|
<template>
|
||||||
|
<style>
|
||||||
|
.invisible {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<paper-icon-button
|
||||||
|
icon='mdi:menu'
|
||||||
|
class$='[[computeMenuButtonClass(narrow, showMenu)]]'
|
||||||
|
on-tap='toggleMenu'
|
||||||
|
></paper-icon-button>
|
||||||
|
</template>
|
||||||
|
</dom-module>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
Polymer({
|
||||||
|
is: 'ha-menu-button',
|
||||||
|
|
||||||
|
properties: {
|
||||||
|
narrow: {
|
||||||
|
type: Boolean,
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
showMenu: {
|
||||||
|
type: Boolean,
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
computeMenuButtonClass: function (narrow, showMenu) {
|
||||||
|
return !narrow && showMenu ? 'invisible' : '';
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleMenu: function () {
|
||||||
|
this.fire('open-menu');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
@ -6,4 +6,5 @@
|
|||||||
<link rel="import" href="../layouts/partial-base.html">
|
<link rel="import" href="../layouts/partial-base.html">
|
||||||
<link rel="import" href="../components/display-time.html">
|
<link rel="import" href="../components/display-time.html">
|
||||||
<link rel="import" href="../components/domain-icon.html">
|
<link rel="import" href="../components/domain-icon.html">
|
||||||
|
<link rel="import" href="../components/ha-menu-button.html">
|
||||||
<link rel="import" href="../../bower_components/paper-input/paper-textarea.html">
|
<link rel="import" href="../../bower_components/paper-input/paper-textarea.html">
|
||||||
|
@ -24,6 +24,10 @@ Polymer({
|
|||||||
is: 'state-card-toggle',
|
is: 'state-card-toggle',
|
||||||
|
|
||||||
properties: {
|
properties: {
|
||||||
|
hass: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
|
|
||||||
inDialog: {
|
inDialog: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
value: false,
|
value: false,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<state-badge state-obj='[[stateObj]]' in-dialog='[[inDialog]]'></state-badge>
|
<state-badge state-obj='[[stateObj]]' in-dialog='[[inDialog]]'></state-badge>
|
||||||
<a href='[[stateObj.state]]' target='_blank' class='name' id='link'>[[stateObj.entityDisplay]]</a>
|
<a href$='[[stateObj.state]]' target='_blank' class='name' id='link'>[[stateObj.entityDisplay]]</a>
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user