mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	Merge remote-tracking branch 'origin/stable'
This commit is contained in:
		
						commit
						cd858a73c1
					
				| @ -2,7 +2,7 @@ | ||||
|   "name": "trilium", | ||||
|   "productName": "Trilium Notes", | ||||
|   "description": "Trilium Notes", | ||||
|   "version": "0.45.7", | ||||
|   "version": "0.45.8", | ||||
|   "license": "AGPL-3.0-only", | ||||
|   "main": "electron.js", | ||||
|   "bin": { | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| module.exports = { buildDate:"2020-12-22T20:21:15+01:00", buildRevision: "bdfd760b9d428dc29c45a0e016d12a25af220043" }; | ||||
| module.exports = { buildDate:"2021-01-11T22:29:31+01:00", buildRevision: "369274ead75947a68bf7bbb5ab1e784e81521030" }; | ||||
|  | ||||
| @ -234,7 +234,7 @@ function exportToZip(taskContext, branch, format, res) { | ||||
|     <link rel="stylesheet" href="${cssUrl}"> | ||||
|     <base target="_parent"> | ||||
| </head> | ||||
| <body> | ||||
| <body class="ck-content"> | ||||
|   <h1>${utils.escapeHtml(title)}</h1> | ||||
| ${content} | ||||
| </body> | ||||
|  | ||||
| @ -31,10 +31,7 @@ function initNotSyncedOptions(initialized, startNotePath = 'root', opts = {}) { | ||||
|     optionService.createOption('openTabs', JSON.stringify([ | ||||
|         { | ||||
|             notePath: startNotePath, | ||||
|             active: true, | ||||
|             sidebar: { | ||||
|                 widgets: [] | ||||
|             } | ||||
|             active: true | ||||
|         } | ||||
|     ]), false); | ||||
| 
 | ||||
| @ -102,6 +99,15 @@ function initStartupOptions() { | ||||
|             log.info(`Created missing option "${name}" with default value "${value}"`); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     if (process.env.TRILIUM_START_NOTE_ID) { | ||||
|         optionService.setOption('openTabs', JSON.stringify([ | ||||
|             { | ||||
|                 notePath: process.env.TRILIUM_START_NOTE_ID, | ||||
|                 active: true | ||||
|             } | ||||
|         ])); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| function getKeyboardDefaultOptions() { | ||||
|  | ||||
| @ -32,11 +32,15 @@ class NoteContentProtectedFulltextExp extends Expression { | ||||
|                 FROM notes JOIN note_contents USING (noteId)  | ||||
|                 WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 1`)) {
 | ||||
| 
 | ||||
|             if (!inputNoteSet.hasNoteId(noteId) || !(noteId in noteCache.notes)) { | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
|             try { | ||||
|                 content = protectedSessionService.decryptString(content); | ||||
|             } | ||||
|             catch (e) { | ||||
|                 log.info('Cannot decrypt content of note', noteId); | ||||
|                 log.info(`Cannot decrypt content of note ${noteId}`); | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
| @ -50,11 +54,7 @@ class NoteContentProtectedFulltextExp extends Expression { | ||||
|                 content = content.replace(/ /g, ' '); | ||||
|             } | ||||
| 
 | ||||
|             if (this.tokens.find(token => !content.includes(token))) { | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
|             if (inputNoteSet.hasNoteId(noteId) && noteId in noteCache.notes) { | ||||
|             if (!this.tokens.find(token => !content.includes(token))) { | ||||
|                 resultNoteSet.add(noteCache.notes[noteId]); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @ -26,6 +26,10 @@ class NoteContentUnprotectedFulltextExp extends Expression { | ||||
|                 FROM notes JOIN note_contents USING (noteId)  | ||||
|                 WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 0`)) {
 | ||||
| 
 | ||||
|             if (!inputNoteSet.hasNoteId(noteId) || !(noteId in noteCache.notes)) { | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
|             content = content.toString().toLowerCase(); | ||||
| 
 | ||||
|             if (type === 'text' && mime === 'text/html') { | ||||
| @ -36,11 +40,7 @@ class NoteContentUnprotectedFulltextExp extends Expression { | ||||
|                 content = content.replace(/ /g, ' '); | ||||
|             } | ||||
| 
 | ||||
|             if (this.tokens.find(token => !content.includes(token))) { | ||||
|                 continue; | ||||
|             } | ||||
| 
 | ||||
|             if (inputNoteSet.hasNoteId(noteId) && noteId in noteCache.notes) { | ||||
|             if (!this.tokens.find(token => !content.includes(token))) { | ||||
|                 resultNoteSet.add(noteCache.notes[noteId]); | ||||
|             } | ||||
|         } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam