mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	feat(in-app-help): support child nesting
This commit is contained in:
		
							parent
							
								
									f1d641ac32
								
							
						
					
					
						commit
						94d53727d1
					
				| @ -26,14 +26,8 @@ function parseNoteMetaFile(noteMetaFile: NoteMetaFile): HiddenSubtreeItem[] { | |||||||
|         return []; |         return []; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const metaRoot = noteMetaFile.files[0]; |     const metaRoot = parseNoteMeta(noteMetaFile.files[0]); | ||||||
|     const items: HiddenSubtreeItem[] = []; |     return metaRoot.children ?? []; | ||||||
| 
 |  | ||||||
|     for (const childMeta of metaRoot.children ?? []) { |  | ||||||
|         items.push(parseNoteMeta(childMeta)); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     return items; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function parseNoteMeta(noteMeta: NoteMeta): HiddenSubtreeItem { | function parseNoteMeta(noteMeta: NoteMeta): HiddenSubtreeItem { | ||||||
| @ -43,5 +37,14 @@ function parseNoteMeta(noteMeta: NoteMeta): HiddenSubtreeItem { | |||||||
|         type: "doc" |         type: "doc" | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |     if (noteMeta.children) { | ||||||
|  |         const children: HiddenSubtreeItem[] = []; | ||||||
|  |         for (const childMeta of noteMeta.children) { | ||||||
|  |             children.push(parseNoteMeta(childMeta)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         item.children = children; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     return item; |     return item; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran