mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
9100daffa6
commit
3719459179
1 changed files with 11 additions and 2 deletions
|
|
@ -75,6 +75,15 @@ type BaseInstance struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewViewBaseInstance(view *View) *BaseInstance {
|
func NewViewBaseInstance(view *View) *BaseInstance {
|
||||||
|
showIcon, wrapField := true, false
|
||||||
|
switch view.LayoutType {
|
||||||
|
case LayoutTypeTable:
|
||||||
|
showIcon = view.Table.ShowIcon
|
||||||
|
wrapField = view.Table.WrapField
|
||||||
|
case LayoutTypeGallery:
|
||||||
|
showIcon = view.Gallery.ShowIcon
|
||||||
|
wrapField = view.Gallery.WrapField
|
||||||
|
}
|
||||||
return &BaseInstance{
|
return &BaseInstance{
|
||||||
ID: view.ID,
|
ID: view.ID,
|
||||||
Icon: view.Icon,
|
Icon: view.Icon,
|
||||||
|
|
@ -89,8 +98,8 @@ func NewViewBaseInstance(view *View) *BaseInstance {
|
||||||
GroupFolded: view.GroupFolded,
|
GroupFolded: view.GroupFolded,
|
||||||
GroupHidden: view.GroupHidden,
|
GroupHidden: view.GroupHidden,
|
||||||
GroupDefault: view.GroupDefault,
|
GroupDefault: view.GroupDefault,
|
||||||
ShowIcon: view.Table.ShowIcon,
|
ShowIcon: showIcon,
|
||||||
WrapField: view.Table.WrapField,
|
WrapField: wrapField,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue