mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	small fixes
This commit is contained in:
		
							parent
							
								
									a1c1c7c830
								
							
						
					
					
						commit
						75fc9e2048
					
				@ -166,12 +166,14 @@ class NoteRevision extends AbstractEntity {
 | 
			
		||||
            utcDateLastEdited: this.utcDateLastEdited,
 | 
			
		||||
            utcDateCreated: this.utcDateCreated,
 | 
			
		||||
            utcDateModified: this.utcDateModified,
 | 
			
		||||
            content: this.content,
 | 
			
		||||
            contentLength: this.contentLength
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    getPojoToSave() {
 | 
			
		||||
        const pojo = this.getPojo();
 | 
			
		||||
        delete pojo.content; // not getting persisted
 | 
			
		||||
        delete pojo.contentLength; // not getting persisted
 | 
			
		||||
 | 
			
		||||
        if (pojo.isProtected) {
 | 
			
		||||
 | 
			
		||||
@ -141,7 +141,7 @@ export default class DesktopLayout {
 | 
			
		||||
                                        .ribbon(new NoteInfoWidget())
 | 
			
		||||
                                        .button(new EditButton())
 | 
			
		||||
                                        .button(new ButtonWidget()
 | 
			
		||||
                                            .icon('bx bx-history')
 | 
			
		||||
                                            .icon('bx-history')
 | 
			
		||||
                                            .title("Note Revisions")
 | 
			
		||||
                                            .command("showNoteRevisions")
 | 
			
		||||
                                            .titlePlacement("bottom"))
 | 
			
		||||
 | 
			
		||||
@ -310,7 +310,7 @@ export default class RibbonContainer extends NoteContextAwareWidget {
 | 
			
		||||
            // won't trigger .refresh();
 | 
			
		||||
            await super.handleEventInChildren('setNoteContext', data);
 | 
			
		||||
        }
 | 
			
		||||
        else if (this.isEnabled()) {
 | 
			
		||||
        else if (this.isEnabled() || name === 'initialRenderComplete') {
 | 
			
		||||
            const activeRibbonWidget = this.getActiveRibbonWidget();
 | 
			
		||||
 | 
			
		||||
            // forward events only to active ribbon tab, inactive ones don't need to be updated
 | 
			
		||||
 | 
			
		||||
@ -40,6 +40,15 @@ export default class SqlResultWidget extends NoteContextAwareWidget {
 | 
			
		||||
        this.$resultContainer.empty();
 | 
			
		||||
 | 
			
		||||
        for (const rows of results) {
 | 
			
		||||
            if (typeof rows === 'object' && !Array.isArray(rows)) {
 | 
			
		||||
                // inserts, updates
 | 
			
		||||
                this.$resultContainer.empty().show().append(
 | 
			
		||||
                    $("<pre>").text(JSON.stringify(rows, null, '\t'))
 | 
			
		||||
                );
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (!rows.length) {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user