mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/stable'
This commit is contained in:
		| @@ -2,7 +2,7 @@ | ||||
|   "name": "trilium", | ||||
|   "productName": "Trilium Notes", | ||||
|   "description": "Trilium Notes", | ||||
|   "version": "0.46.3-beta", | ||||
|   "version": "0.46.4-beta", | ||||
|   "license": "AGPL-3.0-only", | ||||
|   "main": "electron.js", | ||||
|   "bin": { | ||||
|   | ||||
| @@ -254,22 +254,39 @@ class NoteShort { | ||||
|         return noteAttributeCache.attributes[this.noteId]; | ||||
|     } | ||||
|  | ||||
|     getAllNotePaths() { | ||||
|     getAllNotePaths(encounteredNoteIds = null) { | ||||
|         if (this.noteId === 'root') { | ||||
|             return [['root']]; | ||||
|         } | ||||
|  | ||||
|         if (!encounteredNoteIds) { | ||||
|             encounteredNoteIds = new Set(); | ||||
|         } | ||||
|  | ||||
|         encounteredNoteIds.add(this.noteId); | ||||
|  | ||||
|         const parentNotes = this.getParentNotes(); | ||||
|         let paths; | ||||
|  | ||||
|         if (parentNotes.length === 1) { // optimization for the most common case | ||||
|             paths = parentNotes[0].getAllNotePaths(); | ||||
|             if (encounteredNoteIds.has(parentNotes[0].noteId)) { | ||||
|                 return []; | ||||
|             } | ||||
|             else { | ||||
|                 paths = parentNotes[0].getAllNotePaths(encounteredNoteIds); | ||||
|             } | ||||
|         } | ||||
|         else { | ||||
|             paths = []; | ||||
|  | ||||
|             for (const parentNote of parentNotes) { | ||||
|                 paths.push(...parentNote.getAllNotePaths()); | ||||
|                 if (encounteredNoteIds.has(parentNote.noteId)) { | ||||
|                     continue; | ||||
|                 } | ||||
|  | ||||
|                 const newSet = new Set(encounteredNoteIds); | ||||
|  | ||||
|                 paths.push(...parentNote.getAllNotePaths(newSet)); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -88,7 +88,7 @@ export default class NotePathsWidget extends TabAwareWidget { | ||||
|             .find('a') | ||||
|             .addClass("no-tooltip-preview"); | ||||
|  | ||||
|         const comments = []; | ||||
|         const icons = []; | ||||
|  | ||||
|         if (this.notePath === notePath) { | ||||
|             $noteLink.addClass("path-current"); | ||||
| @@ -98,23 +98,23 @@ export default class NotePathsWidget extends TabAwareWidget { | ||||
|             $noteLink.addClass("path-in-hoisted-subtree"); | ||||
|         } | ||||
|         else { | ||||
|             comments.push("outside of hoisting"); | ||||
|             icons.push(`<span class="bx bx-trending-up" title="This path is outside of hoisted note and you would have to unhoist."></span>`); | ||||
|         } | ||||
|  | ||||
|         if (notePathRecord.isArchived) { | ||||
|             $noteLink.addClass("path-archived"); | ||||
|  | ||||
|             comments.push("archived"); | ||||
|             icons.push(`<span class="bx bx-archive" title="Archived"></span>`); | ||||
|         } | ||||
|  | ||||
|         if (notePathRecord.isSearch) { | ||||
|             $noteLink.addClass("path-search"); | ||||
|  | ||||
|             comments.push("search"); | ||||
|             icons.push(`<span class="bx bx-search" title="Search"></span>`); | ||||
|         } | ||||
|  | ||||
|         if (comments.length > 0) { | ||||
|             $noteLink.append(` (${comments.join(', ')})`); | ||||
|         if (icons.length > 0) { | ||||
|             $noteLink.append(` ${icons.join(' ')}`); | ||||
|         } | ||||
|  | ||||
|         this.$notePathList.append($noteLink); | ||||
|   | ||||
| @@ -106,7 +106,7 @@ function processContent(images, note, content) { | ||||
|         for (const {src, dataUrl, imageId} of images) { | ||||
|             const filename = path.basename(src); | ||||
|  | ||||
|             if (!dataUrl.startsWith("data:image")) { | ||||
|             if (!dataUrl || !dataUrl.startsWith("data:image")) { | ||||
|                 log.info("Image could not be recognized as data URL:", dataUrl.substr(0, Math.min(100, dataUrl.length))); | ||||
|                 continue; | ||||
|             } | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| module.exports = { buildDate:"2021-03-08T23:11:11+01:00", buildRevision: "f27370d44f08afaa22d4cd86cba489584f9c878b" }; | ||||
| module.exports = { buildDate:"2021-03-10T23:35:12+01:00", buildRevision: "6f901e6852c33ba0dae6c70efb9f65e5b0028995" }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user