mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Update packages
This commit is contained in:
parent
374d9a0514
commit
4d3c0e6a4c
@ -8,11 +8,11 @@
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"polymer": "Polymer/polymer#~1.2.3",
|
||||
"polymer": "Polymer/polymer#~1.2.4",
|
||||
"pikaday": "1.4",
|
||||
"leaflet-map": "1.2.0",
|
||||
"iron-elements": "PolymerElements/iron-elements#~1.0.7",
|
||||
"iron-elements": "PolymerElements/iron-elements#~1.0.8",
|
||||
"paper-elements": "PolymerElements/paper-elements#~1.0.7",
|
||||
"google-apis": "GoogleWebComponents/google-apis#~1.1.3"
|
||||
"google-apis": "GoogleWebComponents/google-apis#~1.1.4"
|
||||
}
|
||||
}
|
||||
|
10
package.json
10
package.json
@ -20,9 +20,9 @@
|
||||
"author": "Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> (http://paulusschoutsen.nl)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#12d633c5d643172aa630e95d64ab5656a81a4ad4",
|
||||
"home-assistant-js": "git+https://github.com/balloob/home-assistant-js.git#f397463bb72042c21b2026aa177b49c3b9d3d359",
|
||||
"lodash": "^3.10.0",
|
||||
"moment": "^2.11.1"
|
||||
"moment": "^2.11.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.4",
|
||||
@ -33,11 +33,11 @@
|
||||
"babel-plugin-transform-export-extensions": "^6.4.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.3.13",
|
||||
"babel-preset-es2015": "^6.3.13",
|
||||
"bower": "^1.7.2",
|
||||
"bower": "^1.7.7",
|
||||
"eslint": "^1.10.3",
|
||||
"eslint-config-airbnb": "^3.1.0",
|
||||
"eslint-config-airbnb": "^5.0.0",
|
||||
"html-minifier": "^1.1.1",
|
||||
"vulcanize": "^1.14.0",
|
||||
"vulcanize": "^1.14.5",
|
||||
"webpack": "^1.12"
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export default new Polymer({
|
||||
if (newVal.domain === 'light' && newVal.state === 'on' &&
|
||||
newVal.attributes.rgb_color &&
|
||||
newVal.attributes.rgb_color.reduce((cur, tot) => cur + tot, 0) < 730) {
|
||||
this.$.icon.style.color = 'rgb(' + newVal.attributes.rgb_color.join(',') + ')';
|
||||
this.$.icon.style.color = `rgb(${newVal.attributes.rgb_color.join(',')})`;
|
||||
} else {
|
||||
this.$.icon.style.color = null;
|
||||
}
|
||||
|
@ -44,6 +44,10 @@ export default new Polymer({
|
||||
},
|
||||
|
||||
selectedChanged(newVal) {
|
||||
if (document.activeElement) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
const menuItems = this.querySelectorAll('.menu [data-panel]');
|
||||
|
||||
for (let idx = 0; idx < menuItems.length; idx++) {
|
||||
|
@ -75,6 +75,6 @@ export default new Polymer({
|
||||
},
|
||||
|
||||
computeFormClasses(narrow) {
|
||||
return 'layout ' + (narrow ? 'vertical' : 'horizontal');
|
||||
return `layout ${narrow ? 'vertical' : 'horizontal'}`;
|
||||
},
|
||||
});
|
||||
|
@ -52,6 +52,6 @@ export default new Polymer({
|
||||
},
|
||||
|
||||
computeFormClasses(narrow) {
|
||||
return 'layout ' + (narrow ? 'vertical' : 'horizontal');
|
||||
return `layout ${narrow ? 'vertical' : 'horizontal'}`;
|
||||
},
|
||||
});
|
||||
|
@ -73,6 +73,6 @@ export default new Polymer({
|
||||
},
|
||||
|
||||
computeFormClasses(narrow) {
|
||||
return 'layout ' + (narrow ? 'vertical' : 'horizontal');
|
||||
return `layout ${narrow ? 'vertical' : 'horizontal'}`;
|
||||
},
|
||||
});
|
||||
|
@ -67,7 +67,7 @@ export default new Polymer({
|
||||
},
|
||||
|
||||
computeFormClasses(narrow) {
|
||||
return 'content fit layout ' + (narrow ? 'vertical' : 'horizontal');
|
||||
return `content fit layout ${narrow ? 'vertical' : 'horizontal'}`;
|
||||
},
|
||||
|
||||
computeRenderedClasses(error) {
|
||||
|
@ -75,6 +75,6 @@ export default new Polymer({
|
||||
},
|
||||
|
||||
computeContentClasses(narrow) {
|
||||
return 'flex content ' + (narrow ? 'narrow' : 'wide');
|
||||
return `flex content ${narrow ? 'narrow' : 'wide'}`;
|
||||
},
|
||||
});
|
||||
|
@ -54,7 +54,7 @@ export default new Polymer({
|
||||
root.removeChild(root.lastChild);
|
||||
}
|
||||
|
||||
const moreInfo = document.createElement('more-info-' + newMoreInfoType);
|
||||
const moreInfo = document.createElement(`more-info-${newMoreInfoType}`);
|
||||
moreInfo.stateObj = newVal;
|
||||
moreInfo.dialogOpen = this.dialogOpen;
|
||||
root.appendChild(moreInfo);
|
||||
|
@ -51,15 +51,13 @@ self.addEventListener('fetch', event => {
|
||||
}
|
||||
|
||||
event.respondWith(
|
||||
caches.open(CACHE).then(cache => {
|
||||
return cache.match(INDEX_CACHE_URL).then(cachedResponse => {
|
||||
const networkFetch = fetch(event.request).then(response => {
|
||||
caches.open(CACHE).then(cache =>
|
||||
cache.match(INDEX_CACHE_URL).then(cachedResponse =>
|
||||
cachedResponse || fetch(event.request).then(response => {
|
||||
cache.put(INDEX_CACHE_URL, response.clone());
|
||||
return response;
|
||||
});
|
||||
|
||||
return cachedResponse || networkFetch;
|
||||
});
|
||||
})
|
||||
})
|
||||
)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
export default function attributeClassNames(stateObj, attributes) {
|
||||
if (!stateObj) return '';
|
||||
return attributes.map(
|
||||
(attribute) => attribute in stateObj.attributes ? 'has-' + attribute : ''
|
||||
(attribute) => attribute in stateObj.attributes ? `has-${attribute}` : ''
|
||||
).join(' ');
|
||||
}
|
||||
|
@ -39,12 +39,8 @@ export default function domainIcon(domain, state) {
|
||||
return state && state === 'unlocked' ? 'mdi:lock-open' : 'mdi:lock';
|
||||
|
||||
case 'media_player':
|
||||
let icon = 'mdi:cast';
|
||||
if (state && state !== 'off' && state !== 'idle') {
|
||||
icon += '-connected';
|
||||
}
|
||||
|
||||
return icon;
|
||||
return state && state !== 'off' && state !== 'idle' ?
|
||||
'mdi:cast-connected' : 'mdi:cast';
|
||||
|
||||
case 'notify':
|
||||
return 'mdi:comment-alert';
|
||||
|
Loading…
x
Reference in New Issue
Block a user