mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	small fixes
This commit is contained in:
		
							parent
							
								
									7bd05415fa
								
							
						
					
					
						commit
						8d312515dd
					
				@ -204,7 +204,8 @@ export default class TabManager extends Component {
 | 
				
			|||||||
    async activateOrOpenNote(noteId) {
 | 
					    async activateOrOpenNote(noteId) {
 | 
				
			||||||
        for (const tabContext of this.getTabContexts()) {
 | 
					        for (const tabContext of this.getTabContexts()) {
 | 
				
			||||||
            if (tabContext.note && tabContext.note.noteId === noteId) {
 | 
					            if (tabContext.note && tabContext.note.noteId === noteId) {
 | 
				
			||||||
                await tabContext.activate();
 | 
					                this.activateTab(tabContext.tabId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -55,7 +55,9 @@ async function addClipping(req) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    const rewrittenContent = await addImagesToNote(images, clippingNote, content);
 | 
					    const rewrittenContent = await addImagesToNote(images, clippingNote, content);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    await clippingNote.setContent(await clippingNote.getContent() + '<p>' + rewrittenContent + '</p>');
 | 
					    const existingContent = await clippingNote.getContent();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    await clippingNote.setContent(existingContent + (existingContent.trim() ? "<br/>" : "") + rewrittenContent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
        noteId: clippingNote.noteId
 | 
					        noteId: clippingNote.noteId
 | 
				
			||||||
 | 
				
			|||||||
@ -419,12 +419,14 @@ async function saveLinks(note, content) {
 | 
				
			|||||||
            && existingLink.name === foundLink.name);
 | 
					            && existingLink.name === foundLink.name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!existingLink) {
 | 
					        if (!existingLink) {
 | 
				
			||||||
            await new Attribute({
 | 
					            const newLink = await new Attribute({
 | 
				
			||||||
                noteId: note.noteId,
 | 
					                noteId: note.noteId,
 | 
				
			||||||
                type: foundLink.name === 'externalLink' ? 'label' : 'relation',
 | 
					                type: foundLink.name === 'externalLink' ? 'label' : 'relation',
 | 
				
			||||||
                name: foundLink.name,
 | 
					                name: foundLink.name,
 | 
				
			||||||
                value: foundLink.value,
 | 
					                value: foundLink.value,
 | 
				
			||||||
            }).save();
 | 
					            }).save();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            existingLinks.push(newLink);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (existingLink.isDeleted) {
 | 
					        else if (existingLink.isDeleted) {
 | 
				
			||||||
            existingLink.isDeleted = false;
 | 
					            existingLink.isDeleted = false;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user