mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 13:37:47 +00:00
commit
0056237d85
@ -7,22 +7,26 @@
|
||||
{
|
||||
"src": "/static/icons/favicon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/favicon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/favicon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/favicon-1024x1024.png",
|
||||
"sizes": "1024x1024",
|
||||
"type": "image/png"
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
}
|
||||
],
|
||||
"lang": "en-US",
|
||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="home-assistant-frontend",
|
||||
version="20191115.0",
|
||||
version="20191118.0",
|
||||
description="The Home Assistant frontend",
|
||||
url="https://github.com/home-assistant/home-assistant-polymer",
|
||||
author="The Home Assistant Authors",
|
||||
|
@ -87,7 +87,7 @@ class MoreInfoWeather extends LitElement {
|
||||
${this.stateObj.attributes.temperature} ${this.getUnit("temperature")}
|
||||
</div>
|
||||
</div>
|
||||
${this.stateObj.attributes.pressure
|
||||
${this._showValue(this.stateObj.attributes.pressure)
|
||||
? html`
|
||||
<div class="flex">
|
||||
<iron-icon icon="hass:gauge"></iron-icon>
|
||||
@ -101,7 +101,7 @@ class MoreInfoWeather extends LitElement {
|
||||
</div>
|
||||
`
|
||||
: ""}
|
||||
${this.stateObj.attributes.humidity
|
||||
${this._showValue(this.stateObj.attributes.humidity)
|
||||
? html`
|
||||
<div class="flex">
|
||||
<iron-icon icon="hass:water-percent"></iron-icon>
|
||||
@ -112,7 +112,7 @@ class MoreInfoWeather extends LitElement {
|
||||
</div>
|
||||
`
|
||||
: ""}
|
||||
${this.stateObj.attributes.wind_speed
|
||||
${this._showValue(this.stateObj.attributes.wind_speed)
|
||||
? html`
|
||||
<div class="flex">
|
||||
<iron-icon icon="hass:weather-windy"></iron-icon>
|
||||
@ -128,7 +128,7 @@ class MoreInfoWeather extends LitElement {
|
||||
</div>
|
||||
`
|
||||
: ""}
|
||||
${this.stateObj.attributes.visibility
|
||||
${this._showValue(this.stateObj.attributes.visibility)
|
||||
? html`
|
||||
<div class="flex">
|
||||
<iron-icon icon="hass:eye"></iron-icon>
|
||||
@ -156,14 +156,14 @@ class MoreInfoWeather extends LitElement {
|
||||
></iron-icon>
|
||||
`
|
||||
: ""}
|
||||
${!item.templow
|
||||
${!this._showValue(item.templow)
|
||||
? html`
|
||||
<div class="main">
|
||||
${this.computeDateTime(item.datetime)}
|
||||
</div>
|
||||
`
|
||||
: ""}
|
||||
${item.templow
|
||||
${this._showValue(item.templow)
|
||||
? html`
|
||||
<div class="main">
|
||||
${this.computeDate(item.datetime)}
|
||||
@ -172,7 +172,7 @@ class MoreInfoWeather extends LitElement {
|
||||
${item.templow} ${this.getUnit("temperature")}
|
||||
</div>
|
||||
`
|
||||
: ""};
|
||||
: ""}
|
||||
<div class="temp">
|
||||
${item.temperature} ${this.getUnit("temperature")}
|
||||
</div>
|
||||
@ -279,6 +279,10 @@ class MoreInfoWeather extends LitElement {
|
||||
}
|
||||
return `${speed} ${this.getUnit("length")}/h`;
|
||||
}
|
||||
|
||||
private _showValue(item: string): boolean {
|
||||
return typeof item !== "undefined" && item !== null;
|
||||
}
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
@ -111,12 +111,10 @@ class ActionHandler extends HTMLElement implements ActionHandler {
|
||||
y = (ev as MouseEvent).pageY;
|
||||
}
|
||||
|
||||
if (options.hasHold) {
|
||||
this.timer = window.setTimeout(() => {
|
||||
this.startAnimation(x, y);
|
||||
this.held = true;
|
||||
}, this.holdTime);
|
||||
}
|
||||
this.timer = window.setTimeout(() => {
|
||||
this.startAnimation(x, y);
|
||||
this.held = true;
|
||||
}, this.holdTime);
|
||||
|
||||
this.cooldownStart = true;
|
||||
window.setTimeout(() => (this.cooldownStart = false), 100);
|
||||
@ -166,7 +164,7 @@ class ActionHandler extends HTMLElement implements ActionHandler {
|
||||
// That might be a bug, but until it's fixed, this should make action-handler work.
|
||||
// If it's not a bug that is fixed, this might need updating with the next iOS version.
|
||||
// Note that all events (both touch and mouse) must be listened for in order to work on computers with both mouse and touchscreen.
|
||||
const isIOS13 = window.navigator.userAgent.match(/iPhone OS 13_/);
|
||||
const isIOS13 = /iPhone OS 13_/.test(window.navigator.userAgent);
|
||||
if (!isIOS13) {
|
||||
element.addEventListener("mousedown", clickStart, { passive: true });
|
||||
element.addEventListener("click", clickEnd);
|
||||
@ -193,7 +191,7 @@ class ActionHandler extends HTMLElement implements ActionHandler {
|
||||
|
||||
customElements.define("action-handler", ActionHandler);
|
||||
|
||||
const geActionHandler = (): ActionHandler => {
|
||||
const getActionHandler = (): ActionHandler => {
|
||||
const body = document.body;
|
||||
if (body.querySelector("action-handler")) {
|
||||
return body.querySelector("action-handler") as ActionHandler;
|
||||
@ -209,7 +207,7 @@ export const actionHandlerBind = (
|
||||
element: ActionHandlerElement,
|
||||
options: ActionHandlerOptions
|
||||
) => {
|
||||
const actionhandler: ActionHandler = geActionHandler();
|
||||
const actionhandler: ActionHandler = getActionHandler();
|
||||
if (!actionhandler) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user