mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-12 23:21:23 +08:00
🎨 In production mode, data reset warning pops up when editing data in the user guide https://github.com/siyuan-note/siyuan/issues/9757
This commit is contained in:
parent
37d03ff893
commit
fd1211a6a9
@ -35,6 +35,7 @@ Below are the detailed changes in this version.
|
|||||||
* [Mentions and the last item in the doc tree cannot be clicked when the bottom bar hover window is on](https://github.com/siyuan-note/siyuan/issues/9750)
|
* [Mentions and the last item in the doc tree cannot be clicked when the bottom bar hover window is on](https://github.com/siyuan-note/siyuan/issues/9750)
|
||||||
* [Make setting window draggable](https://github.com/siyuan-note/siyuan/issues/9752)
|
* [Make setting window draggable](https://github.com/siyuan-note/siyuan/issues/9752)
|
||||||
* [Add `Move to New Window` hotkey](https://github.com/siyuan-note/siyuan/issues/9754)
|
* [Add `Move to New Window` hotkey](https://github.com/siyuan-note/siyuan/issues/9754)
|
||||||
|
* [In production mode, data reset warning pops up when editing data in the user guide](https://github.com/siyuan-note/siyuan/issues/9757)
|
||||||
|
|
||||||
### Bugfix
|
### Bugfix
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
* [提及和文檔樹面板最後一項在底部停靠欄懸浮時無法點擊](https://github.com/siyuan-note/siyuan/issues/9750)
|
* [提及和文檔樹面板最後一項在底部停靠欄懸浮時無法點擊](https://github.com/siyuan-note/siyuan/issues/9750)
|
||||||
* [設定視窗支援拖曳](https://github.com/siyuan-note/siyuan/issues/9752)
|
* [設定視窗支援拖曳](https://github.com/siyuan-note/siyuan/issues/9752)
|
||||||
* [新增 `移動到新視窗` 快捷鍵](https://github.com/siyuan-note/siyuan/issues/9754)
|
* [新增 `移動到新視窗` 快捷鍵](https://github.com/siyuan-note/siyuan/issues/9754)
|
||||||
|
* [在生產模式下修改使用者指南資料彈出資料重置警告](https://github.com/siyuan-note/siyuan/issues/9757)
|
||||||
|
|
||||||
### 修復缺陷
|
### 修復缺陷
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
* [提及和文档树面板最后一项在底部停靠栏悬浮时无法点击](https://github.com/siyuan-note/siyuan/issues/9750)
|
* [提及和文档树面板最后一项在底部停靠栏悬浮时无法点击](https://github.com/siyuan-note/siyuan/issues/9750)
|
||||||
* [设置窗口支持拖拽](https://github.com/siyuan-note/siyuan/issues/9752)
|
* [设置窗口支持拖拽](https://github.com/siyuan-note/siyuan/issues/9752)
|
||||||
* [添加 `移动到新窗口` 快捷键](https://github.com/siyuan-note/siyuan/issues/9754)
|
* [添加 `移动到新窗口` 快捷键](https://github.com/siyuan-note/siyuan/issues/9754)
|
||||||
|
* [在生产模式下修改用户指南数据弹出数据重置警告](https://github.com/siyuan-note/siyuan/issues/9757)
|
||||||
|
|
||||||
### 修复缺陷
|
### 修复缺陷
|
||||||
|
|
||||||
|
@ -919,6 +919,8 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
|
|||||||
|
|
||||||
operation.ID = insertedNode.ID
|
operation.ID = insertedNode.ID
|
||||||
operation.ParentID = insertedNode.Parent.ID
|
operation.ParentID = insertedNode.Parent.ID
|
||||||
|
|
||||||
|
checkUpsertInUserGuide(tree)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1007,6 +1009,8 @@ func (tx *Transaction) doUpdate(operation *Operation) (ret *TxErr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
upsertAvBlockRel(updatedNode)
|
upsertAvBlockRel(updatedNode)
|
||||||
|
|
||||||
|
checkUpsertInUserGuide(tree)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1055,6 +1059,8 @@ func (tx *Transaction) doUpdateUpdated(operation *Operation) (ret *TxErr) {
|
|||||||
func (tx *Transaction) doCreate(operation *Operation) (ret *TxErr) {
|
func (tx *Transaction) doCreate(operation *Operation) (ret *TxErr) {
|
||||||
tree := operation.Data.(*parse.Tree)
|
tree := operation.Data.(*parse.Tree)
|
||||||
tx.writeTree(tree)
|
tx.writeTree(tree)
|
||||||
|
|
||||||
|
checkUpsertInUserGuide(tree)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1389,3 +1395,10 @@ func updateRefText(refNode *ast.Node, changedDefNodes map[string]*ast.Node) (cha
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func checkUpsertInUserGuide(tree *parse.Tree) {
|
||||||
|
// In production mode, data reset warning pops up when editing data in the user guide https://github.com/siyuan-note/siyuan/issues/9757
|
||||||
|
if "prod" == util.Mode && IsUserGuide(tree.Box) {
|
||||||
|
util.PushErrMsg(Conf.Language(52), 7000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user