mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 09:46:10 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
2dc526c21a
3 changed files with 18 additions and 8 deletions
|
|
@ -21,7 +21,7 @@
|
|||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
|
||||
&:hover {
|
||||
&:not(.b3-list-item--focus):hover {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,6 +241,8 @@ func getAttrViewAddingBlockDefaultValues(attrView *av.AttributeView, view, group
|
|||
if !av.MSelectExistOption(newValue.MSelect, groupView.GetGroupValue()) {
|
||||
if 1 > len(newValue.MSelect) || av.KeyTypeMSelect == groupKey.Type {
|
||||
newValue.MSelect = append(newValue.MSelect, &av.ValueSelect{Content: opt.Name, Color: opt.Color})
|
||||
} else {
|
||||
newValue.MSelect = []*av.ValueSelect{{Content: opt.Name, Color: opt.Color}}
|
||||
}
|
||||
} else {
|
||||
var vals []*av.ValueSelect
|
||||
|
|
@ -3987,11 +3989,18 @@ func sortAttributeViewRow(operation *Operation) (err error) {
|
|||
if targetGroupView := view.GetGroupByID(operation.TargetGroupID); nil != targetGroupView && !gulu.Str.Contains(itemID, targetGroupView.GroupItemIDs) {
|
||||
fillDefaultValue(attrView, view, targetGroupView, operation.PreviousID, itemID, false)
|
||||
|
||||
// 移除旧分组的值
|
||||
if val := attrView.GetValue(groupKey.ID, itemID); nil != val {
|
||||
if av.MSelectExistOption(val.MSelect, groupView.GetGroupValue()) {
|
||||
// 移除旧分组的值
|
||||
val.MSelect = av.MSelectRemoveOption(val.MSelect, groupView.GetGroupValue())
|
||||
}
|
||||
|
||||
now := time.Now().UnixMilli()
|
||||
val.SetUpdatedAt(now)
|
||||
if blockVal := attrView.GetBlockValue(itemID); nil != blockVal {
|
||||
blockVal.Block.Updated = now
|
||||
blockVal.SetUpdatedAt(now)
|
||||
}
|
||||
}
|
||||
|
||||
for i, r := range targetGroupView.GroupItemIDs {
|
||||
|
|
|
|||
|
|
@ -978,12 +978,6 @@ func DuplicateDoc(tree *parse.Tree) {
|
|||
|
||||
previousPath := tree.Path
|
||||
resetTree(tree, "Duplicated", false)
|
||||
createTreeTx(tree)
|
||||
box := Conf.Box(tree.Box)
|
||||
if nil != box {
|
||||
box.addSort(previousPath, tree.ID)
|
||||
}
|
||||
FlushTxQueue()
|
||||
|
||||
// 复制为副本时移除数据库绑定状态 https://github.com/siyuan-note/siyuan/issues/12294
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
|
|
@ -996,6 +990,13 @@ func DuplicateDoc(tree *parse.Tree) {
|
|||
n.RemoveIALAttrsByPrefix(av.NodeAttrViewStaticText)
|
||||
return ast.WalkContinue
|
||||
})
|
||||
|
||||
createTreeTx(tree)
|
||||
box := Conf.Box(tree.Box)
|
||||
if nil != box {
|
||||
box.addSort(previousPath, tree.ID)
|
||||
}
|
||||
FlushTxQueue()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue