mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 12:16:39 +00:00
After rebase clean
This commit is contained in:
parent
94c1af7729
commit
1d007a5aaf
@ -33,7 +33,6 @@ export interface LovelaceSectionElement extends HTMLElement {
|
||||
lovelace?: Lovelace;
|
||||
preview?: boolean;
|
||||
viewIndex?: number;
|
||||
columnSpan?: number;
|
||||
index?: number;
|
||||
cards?: HuiCard[];
|
||||
isStrategy: boolean;
|
||||
|
@ -35,8 +35,6 @@ export class GridSection extends LitElement implements LovelaceSectionElement {
|
||||
|
||||
@property({ type: Boolean }) public isStrategy = false;
|
||||
|
||||
@property({ type: Number, attribute: "column_span" }) public columnSpan = 1;
|
||||
|
||||
@property({ attribute: false }) public cards: HuiCard[] = [];
|
||||
|
||||
@state() _config?: LovelaceSectionConfig;
|
||||
@ -79,12 +77,7 @@ export class GridSection extends LitElement implements LovelaceSectionElement {
|
||||
.options=${CARD_SORTABLE_OPTIONS}
|
||||
invert-swap
|
||||
>
|
||||
<div
|
||||
class="container ${classMap({ "edit-mode": editMode })}"
|
||||
style=${styleMap({
|
||||
"--column-span": this.columnSpan,
|
||||
})}
|
||||
>
|
||||
<div class="container ${classMap({ "edit-mode": editMode })}">
|
||||
${repeat(
|
||||
cardsConfig,
|
||||
(cardConfig) => this._getKey(cardConfig),
|
||||
|
@ -47,8 +47,6 @@ export class HuiSection extends ReactiveElement {
|
||||
|
||||
@property({ type: Number }) public viewIndex!: number;
|
||||
|
||||
@property({ type: Number }) public columnSpan!: number;
|
||||
|
||||
@state() private _cards: HuiCard[] = [];
|
||||
|
||||
private _layoutElementType?: string;
|
||||
@ -133,9 +131,6 @@ export class HuiSection extends ReactiveElement {
|
||||
if (changedProperties.has("_cards")) {
|
||||
this._layoutElement.cards = this._cards;
|
||||
}
|
||||
if (changedProperties.has("columnSpan")) {
|
||||
this._layoutElement.columnSpan = this.columnSpan;
|
||||
}
|
||||
if (changedProperties.has("hass") || changedProperties.has("preview")) {
|
||||
this._updateElement();
|
||||
}
|
||||
@ -200,7 +195,6 @@ export class HuiSection extends ReactiveElement {
|
||||
this._layoutElement!.lovelace = this.lovelace;
|
||||
this._layoutElement!.index = this.index;
|
||||
this._layoutElement!.viewIndex = this.viewIndex;
|
||||
this._layoutElement!.columnSpan = this.columnSpan;
|
||||
this._layoutElement!.cards = this._cards;
|
||||
|
||||
if (addLayoutElement) {
|
||||
|
@ -225,10 +225,10 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
|
||||
sectionConfig?.column_span || 1,
|
||||
maxColumnCount
|
||||
);
|
||||
|
||||
const rowSpan = sectionConfig?.row_span || 1;
|
||||
|
||||
(section as any).itemPath = [idx];
|
||||
(section as any).columnSpan = columnSpan;
|
||||
|
||||
return html`
|
||||
<div
|
||||
@ -384,7 +384,6 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
|
||||
--column-gap: var(--ha-view-sections-column-gap, 24px);
|
||||
--column-min-width: var(--ha-view-sections-column-min-width, 320px);
|
||||
--column-max-width: var(--ha-view-sections-column-max-width, 500px);
|
||||
--column-min-width: var(--ha-view-sections-column-min-width, 320px);
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user