Merge pull request #5481 from home-assistant/dev

20200407.0
This commit is contained in:
Bram Kragten 2020-04-07 15:58:47 +02:00 committed by GitHub
commit 1dcd913c04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 191 additions and 262 deletions

View File

@ -222,7 +222,7 @@ gulp.task("gen-index-gallery-dev", (done) => {
// In dev mode we don't mangle names, so we hardcode urls. That way we can // In dev mode we don't mangle names, so we hardcode urls. That way we can
// run webpack as last in watch mode, which blocks output. // run webpack as last in watch mode, which blocks output.
const content = renderGalleryTemplate("index", { const content = renderGalleryTemplate("index", {
latestGalleryJS: "./entrypoint.js", latestGalleryJS: "./frontend_latest/entrypoint.js",
}); });
fs.outputFileSync(path.resolve(config.gallery_root, "index.html"), content); fs.outputFileSync(path.resolve(config.gallery_root, "index.html"), content);

View File

@ -150,9 +150,8 @@ gulp.task(
gulp.task("webpack-dev-server-gallery", () => { gulp.task("webpack-dev-server-gallery", () => {
runDevServer({ runDevServer({
compiler: webpack( // We don't use the es5 build, but the dev server will fuck up the publicPath if we don't
createGalleryConfig({ latestBuild: true, isProdBuild: false }) compiler: webpack(bothBuilds(createGalleryConfig, { isProdBuild: false })),
),
contentBase: paths.gallery_root, contentBase: paths.gallery_root,
port: 8100, port: 8100,
}); });

View File

@ -245,9 +245,6 @@ const createHassioConfig = ({ isProdBuild, latestBuild }) => {
}; };
const createGalleryConfig = ({ isProdBuild, latestBuild }) => { const createGalleryConfig = ({ isProdBuild, latestBuild }) => {
if (!latestBuild) {
throw new Error("Gallery only supports latest build!");
}
const config = createWebpackConfig({ const config = createWebpackConfig({
entry: { entry: {
entrypoint: path.resolve(paths.gallery_dir, "src/entrypoint.js"), entrypoint: path.resolve(paths.gallery_dir, "src/entrypoint.js"),

View File

@ -57,6 +57,13 @@ class DemoCard extends PolymerElement {
}; };
} }
ready() {
super.ready();
this.addEventListener("ll-rebuild", () => {
this._configChanged(this.config);
});
}
_configChanged(config) { _configChanged(config) {
const card = this.$.card; const card = this.$.card;
while (card.lastChild) { while (card.lastChild) {

View File

@ -4,7 +4,6 @@ import { PolymerElement } from "@polymer/polymer/polymer-element";
import { provideHass } from "../../../src/fake_data/provide_hass"; import { provideHass } from "../../../src/fake_data/provide_hass";
import "../components/demo-cards"; import "../components/demo-cards";
import { createMediaPlayerEntities } from "../data/media_players"; import { createMediaPlayerEntities } from "../data/media_players";
import "../../../src/panels/lovelace/cards/hui-media-control-card";
const CONFIGS = [ const CONFIGS = [
{ {

View File

@ -1,72 +1,5 @@
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { createGalleryConfig } = require("../build-scripts/webpack.js"); const { createGalleryConfig } = require("../build-scripts/webpack.js");
const { babelLoaderConfig } = require("../build-scripts/babel.js");
const isProd = process.env.NODE_ENV === "production";
const chunkFilename = isProd ? "chunk.[chunkhash].js" : "[name].chunk.js";
const buildPath = path.resolve(__dirname, "dist");
const publicPath = isProd ? "./" : "http://localhost:8080/";
const latestBuild = true;
module.exports = createGalleryConfig({ module.exports = createGalleryConfig({
latestBuild: true, latestBuild: true,
}); });
const bla = () => {
const oldExports = {
mode: isProd ? "production" : "development",
// Disabled in prod while we make Home Assistant able to serve the right files.
// Was source-map
devtool: isProd ? "none" : "inline-source-map",
entry: "./src/entrypoint.js",
module: {
rules: [
babelLoaderConfig({ latestBuild }),
{
test: /\.css$/,
use: "raw-loader",
},
{
test: /\.(html)$/,
use: {
loader: "html-loader",
options: {
exportAsEs6Default: true,
},
},
},
],
},
optimization: webpackBase.optimization(latestBuild),
plugins: [
new CopyWebpackPlugin([
"public",
{ from: "../public", to: "static" },
{ from: "../build-translations/output", to: "static/translations" },
{
from: "../node_modules/leaflet/dist/leaflet.css",
to: "static/images/leaflet/",
},
{
from: "../node_modules/roboto-fontface/fonts/roboto/*.woff2",
to: "static/fonts/roboto/",
},
{
from: "../node_modules/leaflet/dist/images",
to: "static/images/leaflet/",
},
]),
].filter(Boolean),
resolve: webpackBase.resolve,
output: {
filename: "[name].js",
chunkFilename: chunkFilename,
path: buildPath,
publicPath,
},
devServer: {
contentBase: "./public",
},
};
};

View File

@ -178,7 +178,7 @@
"web-component-tester": "^6.9.2", "web-component-tester": "^6.9.2",
"webpack": "^4.40.2", "webpack": "^4.40.2",
"webpack-cli": "^3.3.9", "webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.1", "webpack-dev-server": "^3.10.3",
"webpack-manifest-plugin": "^2.0.4", "webpack-manifest-plugin": "^2.0.4",
"workbox-webpack-plugin": "^4.1.1", "workbox-webpack-plugin": "^4.1.1",
"workerize-loader": "^1.1.0" "workerize-loader": "^1.1.0"

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name="home-assistant-frontend", name="home-assistant-frontend",
version="20200406.0", version="20200407.0",
description="The Home Assistant frontend", description="The Home Assistant frontend",
url="https://github.com/home-assistant/home-assistant-polymer", url="https://github.com/home-assistant/home-assistant-polymer",
author="The Home Assistant Authors", author="The Home Assistant Authors",

View File

@ -1,50 +1,47 @@
import "@polymer/paper-tooltip/paper-tooltip";
import { import {
property,
LitElement,
html,
customElement,
css, css,
CSSResult, CSSResult,
customElement,
html,
LitElement,
property,
} from "lit-element"; } from "lit-element";
import { ifDefined } from "lit-html/directives/if-defined";
import memoizeOne from "memoize-one"; import memoizeOne from "memoize-one";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import "@polymer/paper-tooltip/paper-tooltip"; import { computeStateName } from "../../../common/entity/compute_state_name";
import { createValidEntityId } from "../../../common/entity/valid_entity_id";
import "../../../layouts/hass-tabs-subpage"; import { compare } from "../../../common/string/compare";
import "../../../layouts/hass-error-screen"; import "../../../components/ha-icon-next";
import "../ha-config-section"; import "../../../components/entity/ha-state-icon";
import { AreaRegistryEntry } from "../../../data/area_registry";
import "./device-detail/ha-device-info-card";
import "./device-detail/ha-device-card-mqtt";
import "./device-detail/ha-device-entities-card";
import { HomeAssistant, Route } from "../../../types";
import { ConfigEntry } from "../../../data/config_entries"; import { ConfigEntry } from "../../../data/config_entries";
import { import {
EntityRegistryEntry,
updateEntityRegistryEntry,
findBatteryEntity,
} from "../../../data/entity_registry";
import {
DeviceRegistryEntry,
computeDeviceName, computeDeviceName,
DeviceRegistryEntry,
updateDeviceRegistryEntry, updateDeviceRegistryEntry,
} from "../../../data/device_registry"; } from "../../../data/device_registry";
import { AreaRegistryEntry } from "../../../data/area_registry"; import {
EntityRegistryEntry,
findBatteryEntity,
updateEntityRegistryEntry,
} from "../../../data/entity_registry";
import { SceneEntities, showSceneEditor } from "../../../data/scene";
import { findRelated, RelatedResult } from "../../../data/search";
import { import {
loadDeviceRegistryDetailDialog, loadDeviceRegistryDetailDialog,
showDeviceRegistryDetailDialog, showDeviceRegistryDetailDialog,
} from "../../../dialogs/device-registry-detail/show-dialog-device-registry-detail"; } from "../../../dialogs/device-registry-detail/show-dialog-device-registry-detail";
import "../../../components/ha-icon-next"; import "../../../layouts/hass-error-screen";
import { compare } from "../../../common/string/compare"; import "../../../layouts/hass-tabs-subpage";
import { computeStateName } from "../../../common/entity/compute_state_name"; import { HomeAssistant, Route } from "../../../types";
import { createValidEntityId } from "../../../common/entity/valid_entity_id"; import "../ha-config-section";
import { configSections } from "../ha-panel-config"; import { configSections } from "../ha-panel-config";
import { RelatedResult, findRelated } from "../../../data/search"; import "./device-detail/ha-device-card-mqtt";
import { SceneEntities, showSceneEditor } from "../../../data/scene"; import "./device-detail/ha-device-entities-card";
import "./device-detail/ha-device-info-card";
import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation"; import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation";
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
import { ifDefined } from "lit-html/directives/if-defined";
export interface EntityRegistryStateEntry extends EntityRegistryEntry { export interface EntityRegistryStateEntry extends EntityRegistryEntry {
stateName?: string; stateName?: string;

View File

@ -15,6 +15,7 @@ import {
RowClickedEvent, RowClickedEvent,
} from "../../../../components/data-table/ha-data-table"; } from "../../../../components/data-table/ha-data-table";
import "../../../../components/ha-icon"; import "../../../../components/ha-icon";
import "../../../../components/ha-fab";
import "../../../../layouts/hass-loading-screen"; import "../../../../layouts/hass-loading-screen";
import "../../../../layouts/hass-tabs-subpage-data-table"; import "../../../../layouts/hass-tabs-subpage-data-table";
import { HomeAssistant, Route } from "../../../../types"; import { HomeAssistant, Route } from "../../../../types";

View File

@ -20,6 +20,7 @@ import {
RowClickedEvent, RowClickedEvent,
} from "../../../../components/data-table/ha-data-table"; } from "../../../../components/data-table/ha-data-table";
import "../../../../components/ha-icon"; import "../../../../components/ha-icon";
import "../../../../components/ha-fab";
import "../../../../layouts/hass-loading-screen"; import "../../../../layouts/hass-loading-screen";
import "../../../../layouts/hass-tabs-subpage-data-table"; import "../../../../layouts/hass-tabs-subpage-data-table";
import { HomeAssistant, Route } from "../../../../types"; import { HomeAssistant, Route } from "../../../../types";

View File

@ -39,12 +39,14 @@ class HaLogbook extends LitElement {
protected render(): TemplateResult { protected render(): TemplateResult {
if (!this.entries?.length) { if (!this.entries?.length) {
return html` return html`
${this.hass.localize("ui.panel.logbook.entries_not_found")} <div class="container">
${this.hass.localize("ui.panel.logbook.entries_not_found")}
</div>
`; `;
} }
return html` return html`
<div> <div class="container">
${scroll({ ${scroll({
items: this.entries, items: this.entries,
renderItem: (item: LogbookEntry, index?: number) => renderItem: (item: LogbookEntry, index?: number) =>
@ -154,13 +156,16 @@ class HaLogbook extends LitElement {
color: var(--primary-color); color: var(--primary-color);
} }
.container {
padding: 0 16px;
}
.uni-virtualizer-host { .uni-virtualizer-host {
display: block; display: block;
position: relative; position: relative;
contain: strict; contain: strict;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
padding: 0 16px;
} }
.uni-virtualizer-host > * { .uni-virtualizer-host > * {

View File

@ -9,6 +9,7 @@ import {
PropertyValues, PropertyValues,
} from "lit-element"; } from "lit-element";
import { repeat } from "lit-html/directives/repeat"; import { repeat } from "lit-html/directives/repeat";
import { classMap } from "lit-html/directives/class-map";
import { PaperInputElement } from "@polymer/paper-input/paper-input"; import { PaperInputElement } from "@polymer/paper-input/paper-input";
import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-checkbox/paper-checkbox";
@ -26,8 +27,6 @@ import {
} from "../../../data/shopping-list"; } from "../../../data/shopping-list";
import { ShoppingListCardConfig, SensorCardConfig } from "./types"; import { ShoppingListCardConfig, SensorCardConfig } from "./types";
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
import { actionHandler } from "../common/directives/action-handler-directive";
import { classMap } from "lit-html/directives/class-map";
@customElement("hui-shopping-list-card") @customElement("hui-shopping-list-card")
class HuiShoppingListCard extends LitElement implements LovelaceCard { class HuiShoppingListCard extends LitElement implements LovelaceCard {
@ -118,46 +117,40 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
<div class="addRow"> <div class="addRow">
<ha-icon <ha-icon
class="addButton" class="addButton"
@click="${this._addItem}"
icon="hass:plus" icon="hass:plus"
.title="${this.hass!.localize( .title=${this.hass!.localize(
"ui.panel.lovelace.cards.shopping-list.add_item" "ui.panel.lovelace.cards.shopping-list.add_item"
)}" )}
@click=${this._addItem}
> >
</ha-icon> </ha-icon>
<paper-item-body> <paper-input
<paper-input no-label-float
no-label-float class="addBox"
class="addBox" placeholder=${this.hass!.localize(
placeholder="${this.hass!.localize( "ui.panel.lovelace.cards.shopping-list.add_item"
"ui.panel.lovelace.cards.shopping-list.add_item" )}
)}" @keydown=${this._addKeyPress}
@keydown="${this._addKeyPress}" ></paper-input>
></paper-input>
</paper-item-body>
</div> </div>
${repeat( ${repeat(
this._uncheckedItems!, this._uncheckedItems!,
(item) => item.id, (item) => item.id,
(item, index) => (item) =>
html` html`
<div class="editRow"> <div class="editRow">
<paper-checkbox <paper-checkbox
slot="item-icon"
id="${index}"
?checked="${item.complete}"
.itemId="${item.id}"
@click="${this._completeItem}"
tabindex="0" tabindex="0"
?checked=${item.complete}
.itemId=${item.id}
@click=${this._completeItem}
></paper-checkbox> ></paper-checkbox>
<paper-item-body> <paper-input
<paper-input no-label-float
no-label-float .value=${item.name}
.value="${item.name}" .itemId=${item.id}
.itemId="${item.id}" @change=${this._saveEdit}
@change="${this._saveEdit}" ></paper-input>
></paper-input>
</paper-item-body>
</div> </div>
` `
)} )}
@ -165,45 +158,40 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
? html` ? html`
<div class="divider"></div> <div class="divider"></div>
<div class="checked"> <div class="checked">
<span class="label"> <span>
${this.hass!.localize( ${this.hass!.localize(
"ui.panel.lovelace.cards.shopping-list.checked_items" "ui.panel.lovelace.cards.shopping-list.checked_items"
)} )}
</span> </span>
<ha-icon <ha-icon
class="clearall" class="clearall"
@action=${this._clearItems}
.actionHandler=${actionHandler()}
tabindex="0" tabindex="0"
icon="hass:notification-clear-all" icon="hass:notification-clear-all"
.title="${this.hass!.localize( .title=${this.hass!.localize(
"ui.panel.lovelace.cards.shopping-list.clear_items" "ui.panel.lovelace.cards.shopping-list.clear_items"
)}" )}
@click=${this._clearItems}
> >
</ha-icon> </ha-icon>
</div> </div>
${repeat( ${repeat(
this._checkedItems!, this._checkedItems!,
(item) => item.id, (item) => item.id,
(item, index) => (item) =>
html` html`
<div class="editRow"> <div class="editRow">
<paper-checkbox <paper-checkbox
slot="item-icon"
id="${index}"
?checked="${item.complete}"
.itemId="${item.id}"
@click="${this._completeItem}"
tabindex="0" tabindex="0"
?checked=${item.complete}
.itemId=${item.id}
@click=${this._completeItem}
></paper-checkbox> ></paper-checkbox>
<paper-item-body> <paper-input
<paper-input no-label-float
no-label-float .value=${item.name}
.value="${item.name}" .itemId=${item.id}
.itemId="${item.id}" @change=${this._saveEdit}
@change="${this._saveEdit}" ></paper-input>
></paper-input>
</paper-item-body>
</div> </div>
` `
)} )}
@ -216,8 +204,7 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
static get styles(): CSSResult { static get styles(): CSSResult {
return css` return css`
ha-card { ha-card {
padding-bottom: 16px; padding: 16px;
padding-top: 16px;
} }
.has-header { .has-header {
@ -225,63 +212,51 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
} }
.editRow, .editRow,
.addRow { .addRow,
.checked {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center;
}
.addRow ha-icon {
color: var(--secondary-text-color);
--iron-icon-width: 26px;
--iron-icon-height: 26px;
} }
.addButton { .addButton {
padding: 9px 15px 11px 15px; padding-right: 16px;
cursor: pointer; cursor: pointer;
} }
paper-item-body {
width: 75%;
}
paper-checkbox { paper-checkbox {
padding: 11px 11px 11px 18px; padding-left: 4px;
padding-right: 20px;
--paper-checkbox-label-spacing: 0px;
} }
paper-input { paper-input {
--paper-input-container-underline: { flex-grow: 1;
display: none;
}
--paper-input-container-underline-focus: {
display: none;
}
--paper-input-container-underline-disabled: {
display: none;
}
position: relative;
top: 1px;
} }
.checked { .checked {
margin-left: 17px; margin: 12px 0;
margin-bottom: 11px; justify-content: space-between;
margin-top: 11px;
} }
.label { .checked span {
color: var(--primary-color); color: var(--primary-color);
} }
.divider { .divider {
height: 1px; height: 1px;
background-color: var(--divider-color); background-color: var(--divider-color);
margin: 10px; margin: 10px 0;
} }
.clearall { .clearall {
cursor: pointer; cursor: pointer;
margin-bottom: 3px;
float: right;
padding-right: 10px;
}
.addRow > ha-icon {
color: var(--secondary-text-color);
} }
`; `;
} }

View File

@ -10,6 +10,7 @@ import "@polymer/paper-input/paper-input";
import "../../components/hui-action-editor"; import "../../components/hui-action-editor";
import "../../components/hui-theme-select-editor"; import "../../components/hui-theme-select-editor";
import "../../components/hui-entity-editor"; import "../../components/hui-entity-editor";
import "../../../../components/ha-icon-input";
import { struct } from "../../common/structs/struct"; import { struct } from "../../common/structs/struct";
import { import {
@ -23,6 +24,7 @@ import { fireEvent } from "../../../../common/dom/fire_event";
import { configElementStyle } from "./config-elements-style"; import { configElementStyle } from "./config-elements-style";
import { ActionConfig } from "../../../../data/lovelace"; import { ActionConfig } from "../../../../data/lovelace";
import { ButtonCardConfig } from "../../cards/types"; import { ButtonCardConfig } from "../../cards/types";
import { stateIcon } from "../../../../common/entity/state_icon";
const cardConfigStruct = struct({ const cardConfigStruct = struct({
type: "string", type: "string",
@ -127,16 +129,18 @@ export class HuiButtonCardEditor extends LitElement
.configValue="${"name"}" .configValue="${"name"}"
@value-changed="${this._valueChanged}" @value-changed="${this._valueChanged}"
></paper-input> ></paper-input>
<paper-input <ha-icon-input
.label="${this.hass.localize( .label="${this.hass.localize(
"ui.panel.lovelace.editor.card.generic.icon" "ui.panel.lovelace.editor.card.generic.icon"
)} (${this.hass.localize( )} (${this.hass.localize(
"ui.panel.lovelace.editor.card.config.optional" "ui.panel.lovelace.editor.card.config.optional"
)})" )})"
.value="${this._icon}" .value=${this._icon}
.configValue="${"icon"}" .placeholder=${this._icon ||
@value-changed="${this._valueChanged}" stateIcon(this.hass.states[this._entity])}
></paper-input> .configValue=${"icon"}
@value-changed=${this._valueChanged}
></ha-icon-input>
</div> </div>
<div class="side-by-side"> <div class="side-by-side">
<ha-switch <ha-switch

View File

@ -10,6 +10,7 @@ import "@polymer/paper-input/paper-input";
import "../../components/hui-action-editor"; import "../../components/hui-action-editor";
import "../../components/hui-theme-select-editor"; import "../../components/hui-theme-select-editor";
import "../../components/hui-entity-editor"; import "../../components/hui-entity-editor";
import "../../../../components/ha-icon-input";
import { struct } from "../../common/structs/struct"; import { struct } from "../../common/structs/struct";
import { EntitiesEditorEvent, EditorTarget } from "../types"; import { EntitiesEditorEvent, EditorTarget } from "../types";
@ -19,6 +20,7 @@ import { fireEvent } from "../../../../common/dom/fire_event";
import { configElementStyle } from "./config-elements-style"; import { configElementStyle } from "./config-elements-style";
import { EntityCardConfig } from "../../cards/types"; import { EntityCardConfig } from "../../cards/types";
import { headerFooterConfigStructs } from "../../header-footer/types"; import { headerFooterConfigStructs } from "../../header-footer/types";
import { stateIcon } from "../../../../common/entity/state_icon";
const cardConfigStruct = struct({ const cardConfigStruct = struct({
type: "string", type: "string",
@ -28,7 +30,6 @@ const cardConfigStruct = struct({
attribute: "string?", attribute: "string?",
unit: "string?", unit: "string?",
theme: "string?", theme: "string?",
header: struct.optional(headerFooterConfigStructs),
footer: struct.optional(headerFooterConfigStructs), footer: struct.optional(headerFooterConfigStructs),
}); });
@ -99,16 +100,18 @@ export class HuiEntityCardEditor extends LitElement
.configValue=${"name"} .configValue=${"name"}
@value-changed=${this._valueChanged} @value-changed=${this._valueChanged}
></paper-input> ></paper-input>
<paper-input <ha-icon-input
.label="${this.hass.localize( .label="${this.hass.localize(
"ui.panel.lovelace.editor.card.generic.icon" "ui.panel.lovelace.editor.card.generic.icon"
)} (${this.hass.localize( )} (${this.hass.localize(
"ui.panel.lovelace.editor.card.config.optional" "ui.panel.lovelace.editor.card.config.optional"
)})" )})"
.value=${this._icon} .value=${this._icon}
.placeholder=${this._icon ||
stateIcon(this.hass.states[this._entity])}
.configValue=${"icon"} .configValue=${"icon"}
@value-changed=${this._valueChanged} @value-changed=${this._valueChanged}
></paper-input> ></ha-icon-input>
</div> </div>
<div class="side-by-side"> <div class="side-by-side">
<paper-input <paper-input

View File

@ -12,6 +12,7 @@ import "@polymer/paper-listbox/paper-listbox";
import "../../components/hui-theme-select-editor"; import "../../components/hui-theme-select-editor";
import "../../../../components/entity/ha-entity-picker"; import "../../../../components/entity/ha-entity-picker";
import "../../../../components/ha-icon-input";
import { struct } from "../../common/structs/struct"; import { struct } from "../../common/structs/struct";
import { EntitiesEditorEvent, EditorTarget } from "../types"; import { EntitiesEditorEvent, EditorTarget } from "../types";
@ -20,6 +21,7 @@ import { LovelaceCardEditor } from "../../types";
import { fireEvent } from "../../../../common/dom/fire_event"; import { fireEvent } from "../../../../common/dom/fire_event";
import { configElementStyle } from "./config-elements-style"; import { configElementStyle } from "./config-elements-style";
import { SensorCardConfig } from "../../cards/types"; import { SensorCardConfig } from "../../cards/types";
import { stateIcon } from "../../../../common/entity/state_icon";
const cardConfigStruct = struct({ const cardConfigStruct = struct({
type: "string", type: "string",
@ -111,16 +113,18 @@ export class HuiSensorCardEditor extends LitElement
@value-changed="${this._valueChanged}" @value-changed="${this._valueChanged}"
></paper-input> ></paper-input>
<div class="side-by-side"> <div class="side-by-side">
<paper-input <ha-icon-input
.label="${this.hass.localize( .label="${this.hass.localize(
"ui.panel.lovelace.editor.card.generic.icon" "ui.panel.lovelace.editor.card.generic.icon"
)} (${this.hass.localize( )} (${this.hass.localize(
"ui.panel.lovelace.editor.card.config.optional" "ui.panel.lovelace.editor.card.config.optional"
)})" )})"
.value="${this._icon}" .value=${this._icon}
.configValue="${"icon"}" .placeholder=${this._icon ||
@value-changed="${this._valueChanged}" stateIcon(this.hass.states[this._entity])}
></paper-input> .configValue=${"icon"}
@value-changed=${this._valueChanged}
></ha-icon-input>
<paper-dropdown-menu <paper-dropdown-menu
.label="${this.hass.localize( .label="${this.hass.localize(
"ui.panel.lovelace.editor.card.sensor.graph_type" "ui.panel.lovelace.editor.card.sensor.graph_type"

View File

@ -28,6 +28,9 @@ class HaMfaModuleSetupFlow extends LocalizeMixin(EventsMixin(PolymerElement)) {
ha-paper-dialog { ha-paper-dialog {
max-width: 500px; max-width: 500px;
} }
h2 {
white-space: normal;
}
ha-markdown img:first-child:last-child, ha-markdown img:first-child:last-child,
ha-markdown svg:first-child:last-child { ha-markdown svg:first-child:last-child {
background-color: white; background-color: white;

View File

@ -1173,21 +1173,26 @@
"name": "Elfennau'r Llun" "name": "Elfennau'r Llun"
}, },
"picture-entity": { "picture-entity": {
"description": "Mae'r cerdyn Endid Lluniau yn arddangos endid ar ffurf delwedd. Yn lle delweddau o URL, gall hefyd ddangos y llun o endidau camera.",
"name": "Endid Llun" "name": "Endid Llun"
}, },
"picture-glance": { "picture-glance": {
"description": "Mae'r cerdyn Cipolwg Llun yn dangos delwedd a chyflyrau endidau cyfatebol fel eicon. Mae'r endidau ar yr ochr dde yn caniatáu toglo gweithredoedd, mae eraill yn dangos y dialog mwy o wybodaeth.",
"name": "Cipolwg ar lun" "name": "Cipolwg ar lun"
}, },
"picture": { "picture": {
"name": "Llun" "name": "Llun"
}, },
"plant-status": { "plant-status": {
"description": "Mae'r cerdyn Statws Planhigion ar gyfer yr holl fotanegwyr hyfryd allan yna.",
"name": "Statws planhigyn" "name": "Statws planhigyn"
}, },
"sensor": { "sensor": {
"description": "Mae'r cerdyn Synhwyrydd yn rhoi trosolwg cyflym o gyflwr eich synwyryddion gyda graff dewisol i ddelweddu newid dros amser.",
"name": "Synhwyrydd" "name": "Synhwyrydd"
}, },
"shopping-list": { "shopping-list": {
"description": "Mae'r cerdyn Rhestr Siopa yn caniatáu ichi ychwanegu, golygu, gwirio a chlirio eitemau o'ch rhestr siopa.",
"name": "Rhestr siopa" "name": "Rhestr siopa"
}, },
"thermostat": { "thermostat": {

View File

@ -2164,6 +2164,7 @@
"name": "Entity Filter" "name": "Entity Filter"
}, },
"entity": { "entity": {
"description": "The Entity card gives you a quick overview of your entitys state.",
"name": "Entity" "name": "Entity"
}, },
"gauge": { "gauge": {

105
yarn.lock
View File

@ -3639,11 +3639,6 @@ async@2.0.1:
dependencies: dependencies:
lodash "^4.8.0" lodash "^4.8.0"
async@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=
async@^2.0.0, async@^2.0.1, async@^2.1.2, async@^2.4.1, async@^2.6.1, async@^2.6.2: async@^2.0.0, async@^2.0.1, async@^2.1.2, async@^2.4.1, async@^2.6.1, async@^2.6.2:
version "2.6.2" version "2.6.2"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381"
@ -5460,7 +5455,7 @@ debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.
dependencies: dependencies:
ms "2.0.0" ms "2.0.0"
debug@3.2.6, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6: debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
version "3.2.6" version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
@ -7809,6 +7804,16 @@ http-parser-js@>=0.4.0:
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8"
integrity sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w== integrity sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==
http-proxy-middleware@0.19.1:
version "0.19.1"
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a"
integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==
dependencies:
http-proxy "^1.17.0"
is-glob "^4.0.0"
lodash "^4.17.11"
micromatch "^3.1.10"
http-proxy-middleware@^0.17.2: http-proxy-middleware@^0.17.2:
version "0.17.4" version "0.17.4"
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833"
@ -7819,16 +7824,6 @@ http-proxy-middleware@^0.17.2:
lodash "^4.17.2" lodash "^4.17.2"
micromatch "^2.3.11" micromatch "^2.3.11"
http-proxy-middleware@^0.19.1:
version "0.19.1"
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a"
integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==
dependencies:
http-proxy "^1.17.0"
is-glob "^4.0.0"
lodash "^4.17.11"
micromatch "^3.1.10"
http-proxy@^1.16.2, http-proxy@^1.17.0: http-proxy@^1.16.2, http-proxy@^1.17.0:
version "1.17.0" version "1.17.0"
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a"
@ -8102,10 +8097,10 @@ ipaddr.js@1.9.0, ipaddr.js@^1.9.0:
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65"
integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==
is-absolute-url@^3.0.2: is-absolute-url@^3.0.3:
version "3.0.2" version "3.0.3"
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.2.tgz#554f2933e7385cc46e94351977ca2081170a206e" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698"
integrity sha512-+5g/wLlcm1AcxSP7014m6GvbPHswDx980vD/3bZaap8aGV9Yfs7Q6y6tfaupgZ5O74Byzc8dGrSCJ+bFXx0KdA== integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==
is-absolute@^1.0.0: is-absolute@^1.0.0:
version "1.0.0" version "1.0.0"
@ -9237,10 +9232,10 @@ logform@^2.1.1:
ms "^2.1.1" ms "^2.1.1"
triple-beam "^1.3.0" triple-beam "^1.3.0"
loglevel@^1.6.4: loglevel@^1.6.6:
version "1.6.4" version "1.6.7"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.7.tgz#b3e034233188c68b889f5b862415306f565e2c56"
integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g== integrity sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==
lolex@^1.6.0: lolex@^1.6.0:
version "1.6.0" version "1.6.0"
@ -9683,7 +9678,7 @@ mixin-object@^2.0.1:
for-in "^0.1.3" for-in "^0.1.3"
is-extendable "^0.1.1" is-extendable "^0.1.1"
mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1:
version "0.5.1" version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
@ -9908,10 +9903,10 @@ node-environment-flags@1.0.4:
dependencies: dependencies:
object.getownpropertydescriptors "^2.0.3" object.getownpropertydescriptors "^2.0.3"
node-forge@0.8.2: node-forge@0.9.0:
version "0.8.2" version "0.9.0"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579"
integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg== integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==
"node-libs-browser@^1.0.0 || ^2.0.0": "node-libs-browser@^1.0.0 || ^2.0.0":
version "2.2.0" version "2.2.0"
@ -11025,14 +11020,14 @@ polyserve@^0.27.13:
send "^0.16.2" send "^0.16.2"
spdy "^3.3.3" spdy "^3.3.3"
portfinder@^1.0.24: portfinder@^1.0.25:
version "1.0.24" version "1.0.25"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.24.tgz#11efbc6865f12f37624b6531ead1d809ed965cfa" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
integrity sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg== integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==
dependencies: dependencies:
async "^1.5.2" async "^2.6.2"
debug "^2.2.0" debug "^3.1.1"
mkdirp "0.5.x" mkdirp "^0.5.1"
posix-character-classes@^0.1.0: posix-character-classes@^0.1.0:
version "0.1.1" version "0.1.1"
@ -11998,12 +11993,12 @@ selenium-standalone@^6.7.0:
which "^1.3.1" which "^1.3.1"
yauzl "^2.10.0" yauzl "^2.10.0"
selfsigned@^1.10.6: selfsigned@^1.10.7:
version "1.10.6" version "1.10.7"
resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.6.tgz#7b3cd37ed9c2034261a173af1a1aae27d8169b67" resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b"
integrity sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w== integrity sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==
dependencies: dependencies:
node-forge "0.8.2" node-forge "0.9.0"
semver-compare@^1.0.0: semver-compare@^1.0.0:
version "1.0.0" version "1.0.0"
@ -14033,10 +14028,10 @@ webpack-cli@^3.3.9:
v8-compile-cache "2.0.3" v8-compile-cache "2.0.3"
yargs "13.2.4" yargs "13.2.4"
webpack-dev-middleware@^3.7.1: webpack-dev-middleware@^3.7.2:
version "3.7.1" version "3.7.2"
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3"
integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A== integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==
dependencies: dependencies:
memory-fs "^0.4.1" memory-fs "^0.4.1"
mime "^2.4.4" mime "^2.4.4"
@ -14044,10 +14039,10 @@ webpack-dev-middleware@^3.7.1:
range-parser "^1.2.1" range-parser "^1.2.1"
webpack-log "^2.0.0" webpack-log "^2.0.0"
webpack-dev-server@^3.8.1: webpack-dev-server@^3.10.3:
version "3.8.1" version "3.10.3"
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0"
integrity sha512-9F5DnfFA9bsrhpUCAfQic/AXBVHvq+3gQS+x6Zj0yc1fVVE0erKh2MV4IV12TBewuTrYeeTIRwCH9qLMvdNvTw== integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ==
dependencies: dependencies:
ansi-html "0.0.7" ansi-html "0.0.7"
bonjour "^3.5.0" bonjour "^3.5.0"
@ -14058,18 +14053,18 @@ webpack-dev-server@^3.8.1:
del "^4.1.1" del "^4.1.1"
express "^4.17.1" express "^4.17.1"
html-entities "^1.2.1" html-entities "^1.2.1"
http-proxy-middleware "^0.19.1" http-proxy-middleware "0.19.1"
import-local "^2.0.0" import-local "^2.0.0"
internal-ip "^4.3.0" internal-ip "^4.3.0"
ip "^1.1.5" ip "^1.1.5"
is-absolute-url "^3.0.2" is-absolute-url "^3.0.3"
killable "^1.0.1" killable "^1.0.1"
loglevel "^1.6.4" loglevel "^1.6.6"
opn "^5.5.0" opn "^5.5.0"
p-retry "^3.0.1" p-retry "^3.0.1"
portfinder "^1.0.24" portfinder "^1.0.25"
schema-utils "^1.0.0" schema-utils "^1.0.0"
selfsigned "^1.10.6" selfsigned "^1.10.7"
semver "^6.3.0" semver "^6.3.0"
serve-index "^1.9.1" serve-index "^1.9.1"
sockjs "0.3.19" sockjs "0.3.19"
@ -14078,7 +14073,7 @@ webpack-dev-server@^3.8.1:
strip-ansi "^3.0.1" strip-ansi "^3.0.1"
supports-color "^6.1.0" supports-color "^6.1.0"
url "^0.11.0" url "^0.11.0"
webpack-dev-middleware "^3.7.1" webpack-dev-middleware "^3.7.2"
webpack-log "^2.0.0" webpack-log "^2.0.0"
ws "^6.2.1" ws "^6.2.1"
yargs "12.0.5" yargs "12.0.5"