This commit is contained in:
Bram Kragten 2021-08-02 22:57:39 +02:00 committed by GitHub
parent dc6ac668b4
commit 49d426675f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -60,9 +60,9 @@ export class HuiViewEditor extends LitElement {
get _type(): string {
if (!this._config) {
return "masonary";
return "masonry";
}
return this._config.panel ? "panel" : this._config.type || "masonary";
return this._config.panel ? "panel" : this._config.type || "masonry";
}
set config(config: LovelaceViewConfig) {
@ -125,7 +125,7 @@ export class HuiViewEditor extends LitElement {
attr-for-selected="type"
@iron-select=${this._typeChanged}
>
${["masonary", "sidebar", "panel"].map(
${["masonry", "sidebar", "panel"].map(
(type) => html`<paper-item .type=${type}>
${this.hass.localize(
`ui.panel.lovelace.editor.edit_view.types.${type}`
@ -167,7 +167,7 @@ export class HuiViewEditor extends LitElement {
...this._config,
};
delete newConfig.panel;
if (selected === "masonary") {
if (selected === "masonry") {
delete newConfig.type;
} else {
newConfig.type = selected;

View File

@ -2946,7 +2946,7 @@
},
"type": "View type",
"types": {
"masonary": "Masonary (default)",
"masonry": "Masonry (default)",
"sidebar": "Sidebar",
"panel": "Panel (1 card)"
}