mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	Merge branch 'master' into next61
# Conflicts: # src/becca/entities/bnote.js # src/public/app/components/note_context.js # src/public/app/layouts/desktop_layout.js # src/public/app/services/note_content_renderer.js # src/public/app/services/utils.js # src/public/app/widgets/ribbon_widgets/file_properties.js # src/public/app/widgets/ribbon_widgets/note_info_widget.js # src/services/notes.js
This commit is contained in:
		@@ -522,6 +522,17 @@ function copyHtmlToClipboard(content) {
 | 
			
		||||
    navigator.clipboard.write([clipboardItem]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function formatNoteSize(size) {
 | 
			
		||||
    size = Math.max(Math.round(size / 1024), 1);
 | 
			
		||||
 | 
			
		||||
    if (size < 1024) {
 | 
			
		||||
        return `${size} KiB`;
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        return `${Math.round(size / 102.4) / 10} MiB`;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
    reloadFrontendApp,
 | 
			
		||||
    parseDate,
 | 
			
		||||
@@ -567,6 +578,8 @@ export default {
 | 
			
		||||
    isValidAttributeName,
 | 
			
		||||
    sleep,
 | 
			
		||||
    escapeRegExp,
 | 
			
		||||
    formatNoteSize,
 | 
			
		||||
    escapeRegExp,
 | 
			
		||||
    areObjectsEqual,
 | 
			
		||||
    copyHtmlToClipboard
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user