mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 13:26:34 +00:00
Masonry (#9689)
This commit is contained in:
parent
dc6ac668b4
commit
49d426675f
@ -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;
|
||||||
|
@ -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)"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user