mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +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,
|
||||
})}
|
||||
>
|
||||
<div class="addRow">
|
||||
${this._todoListSupportsFeature(
|
||||
TodoListEntityFeature.CREATE_TODO_ITEM
|
||||
)
|
||||
? html`
|
||||
${!this._config.hide_create &&
|
||||
this._todoListSupportsFeature(TodoListEntityFeature.CREATE_TODO_ITEM)
|
||||
? html`
|
||||
<div class="addRow">
|
||||
<ha-textfield
|
||||
class="addBox"
|
||||
.placeholder=${this.hass!.localize(
|
||||
@ -218,9 +217,9 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
||||
@click=${this._addItem}
|
||||
>
|
||||
</ha-icon-button>
|
||||
`
|
||||
: nothing}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
: nothing}
|
||||
<ha-sortable
|
||||
handle-selector="ha-svg-icon"
|
||||
draggable-selector=".draggable"
|
||||
|
@ -478,6 +478,7 @@ export interface TodoListCardConfig extends LovelaceCardConfig {
|
||||
theme?: string;
|
||||
entity?: string;
|
||||
hide_completed?: boolean;
|
||||
hide_create?: boolean;
|
||||
}
|
||||
|
||||
export interface StackCardConfig extends LovelaceCardConfig {
|
||||
|
@ -20,6 +20,7 @@ const cardConfigStruct = assign(
|
||||
theme: optional(string()),
|
||||
entity: optional(string()),
|
||||
hide_completed: optional(boolean()),
|
||||
hide_create: optional(boolean()),
|
||||
})
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user