mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🎨 位于超级块中的嵌入块不显示面包屑 Fix https://github.com/siyuan-note/siyuan/issues/6258
This commit is contained in:
parent
6352273052
commit
4e7c898273
7 changed files with 12 additions and 14 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"docNameAndContent": "Doc Name and Content",
|
||||
"breadcrumb": "Breadcrumb",
|
||||
"embedBlockBreadcrumb": "Embed Block Breadcrumb",
|
||||
"embedBlockBreadcrumbTip": "After enabling embed block will show breadcrumbs",
|
||||
"embedBlockBreadcrumbTip": "After enabling embed blocks will display breadcrumbs, embed blocks in super blocks ignore this option and never show breadcrumbs",
|
||||
"appearanceMode": "Appearance Mode",
|
||||
"editMode": "Edit Mode",
|
||||
"editReadonly": "Read-only mode",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"docNameAndContent": "Nombre y contenido del documento",
|
||||
"miga de pan": "Miga de pan",
|
||||
"embedBlockBreadcrumb": "Incrustar migas de pan de bloque",
|
||||
"embedBlockBreadcrumbTip": "Después de habilitar el bloque incrustado, se mostrarán migas de pan",
|
||||
"embedBlockBreadcrumbTip": "Después de habilitar los bloques incrustados, se mostrarán migas de pan, incrustar bloques en superbloques ignora esta opción y nunca muestra migas de pan",
|
||||
"appearanceMode": "Modo de apariencia",
|
||||
"editMode": "Modo de edición",
|
||||
"editReadonly": "Modo de solo lectura",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"docNameAndContent": "Nom et contenu du document",
|
||||
"fil d'Ariane": "Fil d'Ariane",
|
||||
"embedBlockBreadcrumb": "Intégrer le fil d'Ariane du bloc",
|
||||
"embedBlockBreadcrumbTip": "Après avoir activé le bloc d'intégration, le fil d'Ariane s'affichera",
|
||||
"embedBlockBreadcrumbTip": "Après avoir activé l'intégration, les blocs afficheront le fil d'Ariane, intégrer des blocs dans des super blocs ignorent cette option et n'affichent jamais le fil d'Ariane",
|
||||
"appearanceMode": "Mode d'apparence",
|
||||
"editMode": "Mode d'édition",
|
||||
"editReadonly": "Mode lecture seule",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"docNameAndContent": "文檔名和內容",
|
||||
"breadcrumb": "麵包屑",
|
||||
"embedBlockBreadcrumb": "嵌入塊麵包屑",
|
||||
"embedBlockBreadcrumbTip": "啟用後嵌入塊將顯示麵包屑",
|
||||
"embedBlockBreadcrumbTip": "啟用後嵌入塊將顯示麵包屑,在超級塊中的嵌入塊忽略該選項,始終不顯示麵包屑",
|
||||
"appearanceMode": "外觀模式",
|
||||
"editMode": "編輯模式",
|
||||
"editReadonly": "只讀模式",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"docNameAndContent": "文档名和内容",
|
||||
"breadcrumb": "面包屑",
|
||||
"embedBlockBreadcrumb": "嵌入块面包屑",
|
||||
"embedBlockBreadcrumbTip": "启用后嵌入块将显示面包屑",
|
||||
"embedBlockBreadcrumbTip": "启用后嵌入块将显示面包屑,在超级块中的嵌入块忽略该选项,始终不显示面包屑",
|
||||
"appearanceMode": "外观模式",
|
||||
"editMode": "编辑模式",
|
||||
"editReadonly": "只读模式",
|
||||
|
|
|
|||
|
|
@ -393,14 +393,6 @@ func getEmbeddedBlock(embedBlockID string, trees map[string]*parse.Tree, sqlBloc
|
|||
if nil == def {
|
||||
return
|
||||
}
|
||||
embedNodeTree, _ := loadTreeByBlockID(embedBlockID)
|
||||
if nil == embedNodeTree {
|
||||
return
|
||||
}
|
||||
embedNode := treenode.GetNodeInTree(embedNodeTree, embedBlockID)
|
||||
if nil == embedNode {
|
||||
return
|
||||
}
|
||||
|
||||
var unlinks, nodes []*ast.Node
|
||||
ast.Walk(def, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
|
|
@ -444,7 +436,12 @@ func getEmbeddedBlock(embedBlockID string, trees map[string]*parse.Tree, sqlBloc
|
|||
block = &Block{Box: def.Box, Path: def.Path, HPath: b.HPath, ID: def.ID, Type: def.Type.String(), Content: dom}
|
||||
|
||||
// 位于超级块中的嵌入块不显示面包屑 https://github.com/siyuan-note/siyuan/issues/6258
|
||||
inSuperBlock := embedNode.ParentIs(ast.NodeSuperBlock)
|
||||
inSuperBlock := false
|
||||
embedNodeTree, _ := loadTreeByBlockID(embedBlockID)
|
||||
if nil != embedNodeTree {
|
||||
embedNode := treenode.GetNodeInTree(embedNodeTree, embedBlockID)
|
||||
inSuperBlock = nil != embedNode && embedNode.ParentIs(ast.NodeSuperBlock)
|
||||
}
|
||||
|
||||
if breadcrumb && !inSuperBlock {
|
||||
blockPaths = buildBlockBreadcrumb(def)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ type EmbedBlock struct {
|
|||
}
|
||||
|
||||
func SearchEmbedBlock(embedBlockID, stmt string, excludeIDs []string, headingMode int, breadcrumb bool) (ret []*EmbedBlock) {
|
||||
time.Sleep(512 * time.Millisecond /* 前端队列轮询间隔 */)
|
||||
WaitForWritingFiles()
|
||||
return searchEmbedBlock(embedBlockID, stmt, excludeIDs, headingMode, breadcrumb)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue