mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 08:46:35 +00:00
Option to hide create box on todo card (#23571)
This commit is contained in:
parent
334c87b194
commit
e9f3f71be1
@ -195,11 +195,10 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
|||||||
"has-header": "title" in this._config,
|
"has-header": "title" in this._config,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div class="addRow">
|
${!this._config.hide_create &&
|
||||||
${this._todoListSupportsFeature(
|
this._todoListSupportsFeature(TodoListEntityFeature.CREATE_TODO_ITEM)
|
||||||
TodoListEntityFeature.CREATE_TODO_ITEM
|
? html`
|
||||||
)
|
<div class="addRow">
|
||||||
? html`
|
|
||||||
<ha-textfield
|
<ha-textfield
|
||||||
class="addBox"
|
class="addBox"
|
||||||
.placeholder=${this.hass!.localize(
|
.placeholder=${this.hass!.localize(
|
||||||
@ -218,9 +217,9 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
|||||||
@click=${this._addItem}
|
@click=${this._addItem}
|
||||||
>
|
>
|
||||||
</ha-icon-button>
|
</ha-icon-button>
|
||||||
`
|
</div>
|
||||||
: nothing}
|
`
|
||||||
</div>
|
: nothing}
|
||||||
<ha-sortable
|
<ha-sortable
|
||||||
handle-selector="ha-svg-icon"
|
handle-selector="ha-svg-icon"
|
||||||
draggable-selector=".draggable"
|
draggable-selector=".draggable"
|
||||||
|
@ -478,6 +478,7 @@ export interface TodoListCardConfig extends LovelaceCardConfig {
|
|||||||
theme?: string;
|
theme?: string;
|
||||||
entity?: string;
|
entity?: string;
|
||||||
hide_completed?: boolean;
|
hide_completed?: boolean;
|
||||||
|
hide_create?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StackCardConfig extends LovelaceCardConfig {
|
export interface StackCardConfig extends LovelaceCardConfig {
|
||||||
|
@ -20,6 +20,7 @@ const cardConfigStruct = assign(
|
|||||||
theme: optional(string()),
|
theme: optional(string()),
|
||||||
entity: optional(string()),
|
entity: optional(string()),
|
||||||
hide_completed: optional(boolean()),
|
hide_completed: optional(boolean()),
|
||||||
|
hide_create: optional(boolean()),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user