`;
}
+ private _importedCardSectionConfig = memoizeOne(
+ (cards: LovelaceCardConfig[]) => ({
+ type: "grid",
+ cards,
+ })
+ );
+
private _createSection(): void {
const newConfig = addSection(this.lovelace!.config, this.index!, {
type: "grid",
@@ -432,6 +472,33 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
--mdc-icon-size: 20px;
color: var(--primary-text-color);
}
+
+ .imported-cards {
+ --column-span: var(--column-count);
+ --row-span: 1;
+ order: 2;
+ }
+
+ .imported-card-header {
+ margin-top: 24px;
+ padding: 16px 8px;
+ border-top: 2px dashed var(--divider-color);
+ }
+
+ .imported-card-header .title {
+ margin: 0;
+ color: var(--primary-text-color);
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 24px;
+ }
+ .imported-card-header .subtitle {
+ margin: 0;
+ color: var(--secondary-text-color);
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 20px;
+ }
`;
}
}
diff --git a/src/translations/en.json b/src/translations/en.json
index ea07a3b19397..528743b0b90d 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -5611,14 +5611,18 @@
"visibility": {
"select_users": "Select which users should see this view in the navigation"
},
- "type": "View type",
- "type_warning_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.",
- "type_warning_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.",
+ "type": "Layout",
+ "convert_view": "Convert",
+ "convert_view_title": "Convert view layout",
+ "convert_view_text": "It will create a new view using sections. This current view will stay untouched. All your cards will be imported so you can rearrange them freely.",
+ "convert_view_action": "Create",
+ "card_to_section_convert": "Convert your view to a section view.",
+ "section_to_card_not_supported": "You can not change your section view to an other type. Start from scratch with a new view if you want to use another view type.",
"types": {
+ "sections": "Sections (default)",
"masonry": "Masonry",
"sidebar": "Sidebar",
- "panel": "Panel (single card)",
- "sections": "Sections"
+ "panel": "Panel (single card)"
},
"subview": "Subview",
"max_columns": "Max number of sections wide",
@@ -5704,7 +5708,9 @@
"move_card": {
"header": "Choose a view to move the card to",
"strategy_error_title": "Impossible to move the card",
- "strategy_error_text_strategy": "Moving a card to an auto generated view is not supported."
+ "strategy_error_text_strategy": "Moving a card to an auto generated view is not supported.",
+ "success": "Card moved successfully",
+ "error": "Error while moving card"
},
"change_position": {
"title": "Change card position",
@@ -5723,8 +5729,8 @@
"add_card": "[%key:ui::panel::lovelace::editor::edit_card::add%]",
"create_section": "Create section",
"default_section_title": "New section",
- "imported_card_section_title_view": "Imported cards from ''{view_title}'' view",
- "imported_card_section_title_default": "Imported cards from another view"
+ "imported_cards_title": "Imported cards",
+ "imported_cards_description": "These cards are imported from another view. They will only be displayed in edit mode. Move them into sections to display them in your view."
},
"delete_section": {
"title": "Delete section",