Skip to content

Commit

Permalink
Improve editor
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Oct 30, 2024
1 parent db200fd commit 8818d9c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
32 changes: 16 additions & 16 deletions src/panels/lovelace/editor/view-editor/hui-view-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,16 @@ export class HuiViewEditor extends LitElement {
private _schema = memoizeOne(
(localize: LocalizeFunc, viewType: string) =>
[
{ name: "title", selector: { text: {} } },
{
name: "icon",
selector: {
icon: {},
},
},
{ name: "path", selector: { text: {} } },
{ name: "theme", selector: { theme: {} } },
{
name: "subview",
selector: {
boolean: {},
},
},
{
name: "type",
selector: {
select: {
options: (
[
SECTIONS_VIEW_LAYOUT,
MASONRY_VIEW_LAYOUT,
SIDEBAR_VIEW_LAYOUT,
PANEL_VIEW_LAYOUT,
MASONRY_VIEW_LAYOUT,
] as const
).map((type) => ({
value: type,
Expand All @@ -75,6 +60,21 @@ export class HuiViewEditor extends LitElement {
},
},
},
{ name: "title", selector: { text: {} } },
{
name: "icon",
selector: {
icon: {},
},
},
{ name: "path", selector: { text: {} } },
{ name: "theme", selector: { theme: {} } },
{
name: "subview",
selector: {
boolean: {},
},
},
...(viewType === SECTIONS_VIEW_LAYOUT
? ([
{
Expand Down
6 changes: 3 additions & 3 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5611,18 +5611,18 @@
"visibility": {
"select_users": "Select which users should see this view in the navigation"
},
"type": "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",
Expand Down

0 comments on commit 8818d9c

Please sign in to comment.