mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Add heading card when creating a new view (#22123)
This commit is contained in:
parent
570ad38bac
commit
ac9654c1de
@ -379,7 +379,19 @@ export class HuiDialogEditView extends LitElement {
|
||||
};
|
||||
|
||||
if (viewConf.type === SECTION_VIEW_LAYOUT && !viewConf.sections?.length) {
|
||||
viewConf.sections = [{ type: "grid", cards: [] }];
|
||||
viewConf.sections = [
|
||||
{
|
||||
type: "grid",
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: this.hass!.localize(
|
||||
"ui.panel.lovelace.editor.section.default_section_title"
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
} else if (!viewConf.cards?.length) {
|
||||
viewConf.cards = [];
|
||||
}
|
||||
|
@ -249,7 +249,9 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: "New Section",
|
||||
heading: this.hass!.localize(
|
||||
"ui.panel.lovelace.editor.section.default_section_title"
|
||||
),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -5669,7 +5669,8 @@
|
||||
"section": {
|
||||
"add_badge": "Add badge",
|
||||
"add_card": "[%key:ui::panel::lovelace::editor::edit_card::add%]",
|
||||
"create_section": "Create section"
|
||||
"create_section": "Create section",
|
||||
"default_section_title": "New section"
|
||||
},
|
||||
"delete_section": {
|
||||
"title": "Delete section",
|
||||
|
Loading…
x
Reference in New Issue
Block a user