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

View File

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