Merge pull request #600 from trheyi/main
Add icon support to Section and TabsItem components
This commit is contained in:
commit
07ded02606
3 changed files with 8 additions and 5 deletions
|
|
@ -38,7 +38,7 @@ func TestLoadID(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func prepare(t *testing.T, language ...string) {
|
func prepare(t *testing.T) {
|
||||||
|
|
||||||
// load flows
|
// load flows
|
||||||
err := flow.Load(config.Conf)
|
err := flow.Load(config.Conf)
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ func (layout *LayoutDSL) Xgen(data map[string]interface{}, excludes map[string]b
|
||||||
|
|
||||||
// Filter exclude filter
|
// Filter exclude filter
|
||||||
func (section SectionDSL) Filter(excludes map[string]bool, mapping *mapping.Mapping) (SectionDSL, error) {
|
func (section SectionDSL) Filter(excludes map[string]bool, mapping *mapping.Mapping) (SectionDSL, error) {
|
||||||
new := SectionDSL{Columns: []Column{}, Title: section.Title, Desc: section.Desc}
|
new := SectionDSL{Columns: []Column{}, Title: section.Title, Desc: section.Desc, Icon: section.Icon, Weight: section.Weight, Color: section.Color}
|
||||||
columns, err := section.filterColumns(section.Columns, excludes, mapping)
|
columns, err := section.filterColumns(section.Columns, excludes, mapping)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new, err
|
return new, err
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,12 @@ type FrameDSL struct {
|
||||||
|
|
||||||
// SectionDSL layout.form.sections[*]
|
// SectionDSL layout.form.sections[*]
|
||||||
type SectionDSL struct {
|
type SectionDSL struct {
|
||||||
Title string `json:"title,omitempty"`
|
Title string `json:"title,omitempty"`
|
||||||
Desc string `json:"desc,omitempty"`
|
Desc string `json:"desc,omitempty"`
|
||||||
Columns []Column `json:"columns,omitempty"`
|
Icon interface{} `json:"icon,omitempty"`
|
||||||
|
Color string `json:"color,omitempty"`
|
||||||
|
Weight interface{} `json:"weight,omitempty"`
|
||||||
|
Columns []Column `json:"columns,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Column table columns
|
// Column table columns
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue