mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	Merge branch 'feature/typescript_backend_5' into feature/typescript_backend_6
This commit is contained in:
		
						commit
						32e34eec90
					
				@ -239,8 +239,8 @@ async function importZip(taskContext: TaskContext, fileBuffer: Buffer, importRoo
 | 
				
			|||||||
            noteId: noteId,
 | 
					            noteId: noteId,
 | 
				
			||||||
            type: resolveNoteType(noteMeta?.type),
 | 
					            type: resolveNoteType(noteMeta?.type),
 | 
				
			||||||
            mime: noteMeta ? noteMeta.mime : 'text/html',
 | 
					            mime: noteMeta ? noteMeta.mime : 'text/html',
 | 
				
			||||||
            prefix: noteMeta ? noteMeta.prefix || "" : '',
 | 
					            prefix: noteMeta?.prefix || '',
 | 
				
			||||||
            isExpanded: noteMeta ? noteMeta.isExpanded : false,
 | 
					            isExpanded: !!noteMeta?.isExpanded,
 | 
				
			||||||
            notePosition: (noteMeta && firstNote) ? noteMeta.notePosition : undefined,
 | 
					            notePosition: (noteMeta && firstNote) ? noteMeta.notePosition : undefined,
 | 
				
			||||||
            isProtected: importRootNote.isProtected && protectedSessionService.isProtectedSessionAvailable(),
 | 
					            isProtected: importRootNote.isProtected && protectedSessionService.isProtectedSessionAvailable(),
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@ -510,8 +510,8 @@ async function importZip(taskContext: TaskContext, fileBuffer: Buffer, importRoo
 | 
				
			|||||||
                noteId,
 | 
					                noteId,
 | 
				
			||||||
                type,
 | 
					                type,
 | 
				
			||||||
                mime,
 | 
					                mime,
 | 
				
			||||||
                prefix: noteMeta ? noteMeta.prefix || "" : '',
 | 
					                prefix: noteMeta?.prefix || '',
 | 
				
			||||||
                isExpanded: noteMeta ? noteMeta.isExpanded : false,
 | 
					                isExpanded: !!noteMeta?.isExpanded,
 | 
				
			||||||
                // root notePosition should be ignored since it relates to the original document
 | 
					                // root notePosition should be ignored since it relates to the original document
 | 
				
			||||||
                // now import root should be placed after existing notes into new parent
 | 
					                // now import root should be placed after existing notes into new parent
 | 
				
			||||||
                notePosition: (noteMeta && firstNote) ? noteMeta.notePosition : undefined,
 | 
					                notePosition: (noteMeta && firstNote) ? noteMeta.notePosition : undefined,
 | 
				
			||||||
 | 
				
			|||||||
@ -102,7 +102,7 @@ function executeScript(script: string, params: ScriptParams, startNoteId: string
 | 
				
			|||||||
    return executeBundle(bundle, { startNote, originEntity });
 | 
					    return executeBundle(bundle, { startNote, originEntity });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function execute(ctx: any, script: string) {
 | 
					function execute(ctx: ScriptContext, script: string) {
 | 
				
			||||||
    return function () { return eval(`const apiContext = this;\r\n(${script}\r\n)()`); }.call(ctx);
 | 
					    return function () { return eval(`const apiContext = this;\r\n(${script}\r\n)()`); }.call(ctx);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user