Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve av

Daniel037619368a4f
diff --git a/kernel/av/av.go b/kernel/av/av.go
index 95b04d9efa..d69138b804 100644
--- a/kernel/av/av.go
+++ b/kernel/av/av.go
@@ -192,21 +192,21 @@ type View struct {
Gallery *LayoutGallery `json:"gallery,omitempty"` // 卡片布局
ItemIDs []string `json:"itemIds,omitempty"` // 项目 ID 列表,用于维护所有项目
- Group *ViewGroup `json:"group,omitempty"` // 分组规则
- GroupUpdated int64 `json:"groupUpdated"` // 分组规则更新时间戳
- Groups []*View `json:"groups,omitempty"` // 分组视图列表
- GroupItemIDs []string `json:"groupItemIds"` // 分组项目 ID 列表,用于维护分组中的所有项目
- GroupCalc *GroupCalc `json:"groupCalc,omitempty"` // 分组计算规则
- GroupValue *Value `json:"groupValue,omitempty"` // 分组值
- GroupFolded bool `json:"groupFolded"` // 分组是否折叠
- GroupHidden int `json:"groupHidden"` // 分组是否隐藏,0:显示,1:空白隐藏,2:手动隐藏
+ Group *ViewGroup `json:"group,omitempty"` // 分组规则
+ GroupUpdated int64 `json:"groupUpdated"` // 分组规则更新时间戳
+ Groups []*View `json:"groups,omitempty"` // 分组视图列表
+ GroupItemIDs []string `json:"groupItemIds"` // 分组项目 ID 列表,用于维护分组中的所有项目
+ GroupCalc *GroupCalc `json:"groupCalc,omitempty"` // 分组计算规则
+ GroupVal *Value `json:"groupVal,omitempty"` // 分组值
+ GroupFolded bool `json:"groupFolded"` // 分组是否折叠
+ GroupHidden int `json:"groupHidden"` // 分组是否隐藏,0:显示,1:空白隐藏,2:手动隐藏
}
func (view *View) GetGroupValue() string {
- if nil == view.GroupValue {
+ if nil == view.GroupVal {
return ""
}
- return view.GroupValue.String(false)
+ return view.GroupVal.String(false)
}
// GetGroup 获取指定分组 ID 的分组视图。
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index ecc657c88c..a4a75a6257 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -1851,13 +1851,13 @@ func genAttrViewViewGroups(view *av.View, attrView *av.AttributeView) {
}
v.Name = "" // 分组视图的名称在渲染时才填充
- v.GroupValue = &av.Value{Type: av.KeyTypeText, Text: &av.ValueText{Content: groupValue}}
+ v.GroupVal = &av.Value{Type: av.KeyTypeText, Text: &av.ValueText{Content: groupValue}}
if av.KeyTypeSelect == groupKey.Type || av.KeyTypeMSelect == groupKey.Type {
- v.GroupValue.Text = nil
- v.GroupValue.Type = av.KeyTypeSelect
+ v.GroupVal.Text = nil
+ v.GroupVal.Type = av.KeyTypeSelect
opt := groupKey.GetOption(groupVal)
- v.GroupValue.MSelect = []*av.ValueSelect{{Content: opt.Name, Color: opt.Color}}
+ v.GroupVal.MSelect = []*av.ValueSelect{{Content: opt.Name, Color: opt.Color}}
}
view.Groups = append(view.Groups, v)
}