mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	removed forgotten console.logs
This commit is contained in:
		| @@ -394,7 +394,7 @@ export default class AttributeEditorWidget extends TabAwareWidget { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     showHelpTooltip() {console.log("showHelpTooltip"); |     showHelpTooltip() { | ||||||
|         this.attributeDetailWidget.hide(); |         this.attributeDetailWidget.hide(); | ||||||
|  |  | ||||||
|         this.$editor.tooltip({ |         this.$editor.tooltip({ | ||||||
| @@ -454,7 +454,7 @@ export default class AttributeEditorWidget extends TabAwareWidget { | |||||||
|                 attributeRenderer.renderAttribute(attribute, $attributesContainer, true); |                 attributeRenderer.renderAttribute(attribute, $attributesContainer, true); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|          |  | ||||||
|         this.textEditor.setData($attributesContainer.html()); |         this.textEditor.setData($attributesContainer.html()); | ||||||
|  |  | ||||||
|         if (saved) { |         if (saved) { | ||||||
|   | |||||||
| @@ -977,14 +977,12 @@ export default class NoteTreeWidget extends TabAwareWidget { | |||||||
|                         toastService.showMessage("Auto collapsing notes after inactivity..."); |                         toastService.showMessage("Auto collapsing notes after inactivity..."); | ||||||
|                         noneCollapsedYet = false; |                         noneCollapsedYet = false; | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|                     console.log("Auto collapsed", node.data.noteId); |  | ||||||
|                 } |                 } | ||||||
|             }, false); |             }, false); | ||||||
|         }, 600 * 1000); |         }, 600 * 1000); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async entitiesReloadedEvent({loadResults}) {console.log(loadResults); |     async entitiesReloadedEvent({loadResults}) { | ||||||
|         this.activityDetected(); |         this.activityDetected(); | ||||||
|  |  | ||||||
|         if (loadResults.isEmptyForTree()) { |         if (loadResults.isEmptyForTree()) { | ||||||
|   | |||||||
| @@ -127,7 +127,7 @@ class ImageTypeWidget extends TypeWidget { | |||||||
|  |  | ||||||
|         this.$widget.show(); |         this.$widget.show(); | ||||||
|  |  | ||||||
|         const noteComplement = await this.tabContext.getNoteComplement();console.log(noteComplement, note); |         const noteComplement = await this.tabContext.getNoteComplement(); | ||||||
|  |  | ||||||
|         this.$fileName.text(attributeMap.originalFileName || "?"); |         this.$fileName.text(attributeMap.originalFileName || "?"); | ||||||
|         this.$fileSize.text(noteComplement.contentLength + " bytes"); |         this.$fileSize.text(noteComplement.contentLength + " bytes"); | ||||||
|   | |||||||
| @@ -55,8 +55,6 @@ function getRecentChanges(req) { | |||||||
|  |  | ||||||
|     recentChanges = recentChanges.slice(0, Math.min(500, recentChanges.length)); |     recentChanges = recentChanges.slice(0, Math.min(500, recentChanges.length)); | ||||||
|  |  | ||||||
|     console.log(recentChanges); |  | ||||||
|  |  | ||||||
|     for (const change of recentChanges) { |     for (const change of recentChanges) { | ||||||
|         if (change.current_isProtected) { |         if (change.current_isProtected) { | ||||||
|             if (protectedSessionService.isProtectedSessionAvailable()) { |             if (protectedSessionService.isProtectedSessionAvailable()) { | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ function findNotesWithExpression(expression) { | |||||||
|  |  | ||||||
|     const noteSet = expression.execute(allNoteSet, searchContext); |     const noteSet = expression.execute(allNoteSet, searchContext); | ||||||
|  |  | ||||||
|     let searchResults = noteSet.notes |     const searchResults = noteSet.notes | ||||||
|         .map(note => searchContext.noteIdToNotePath[note.noteId] || noteCacheService.getSomePath(note)) |         .map(note => searchContext.noteIdToNotePath[note.noteId] || noteCacheService.getSomePath(note)) | ||||||
|         .filter(notePathArray => notePathArray.includes(hoistedNoteService.getHoistedNoteId())) |         .filter(notePathArray => notePathArray.includes(hoistedNoteService.getHoistedNoteId())) | ||||||
|         .map(notePathArray => new SearchResult(notePathArray)); |         .map(notePathArray => new SearchResult(notePathArray)); | ||||||
| @@ -70,13 +70,15 @@ function parseQueryToExpression(query, parsingContext) { | |||||||
|  * @return {SearchResult[]} |  * @return {SearchResult[]} | ||||||
|  */ |  */ | ||||||
| function findNotesWithQuery(query, parsingContext) { | function findNotesWithQuery(query, parsingContext) { | ||||||
|     const expression = parseQueryToExpression(query, parsingContext); |     return utils.stopWatch(`Search with query "${query}"`, () => { | ||||||
|  |         const expression = parseQueryToExpression(query, parsingContext); | ||||||
|  |  | ||||||
|     if (!expression) { |         if (!expression) { | ||||||
|         return []; |             return []; | ||||||
|     } |         } | ||||||
|  |  | ||||||
|     return findNotesWithExpression(expression); |         return findNotesWithExpression(expression); | ||||||
|  |     }); | ||||||
| } | } | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -7,6 +7,7 @@ const escape = require('escape-html'); | |||||||
| const sanitize = require("sanitize-filename"); | const sanitize = require("sanitize-filename"); | ||||||
| const mimeTypes = require('mime-types'); | const mimeTypes = require('mime-types'); | ||||||
| const path = require('path'); | const path = require('path'); | ||||||
|  | const log = require('./log'); | ||||||
|  |  | ||||||
| function newEntityId() { | function newEntityId() { | ||||||
|     return randomString(12); |     return randomString(12); | ||||||
| @@ -65,13 +66,13 @@ function prepareSqlForLike(prefix, str, suffix) { | |||||||
| } | } | ||||||
|  |  | ||||||
| function stopWatch(what, func) { | function stopWatch(what, func) { | ||||||
|     const start = new Date(); |     const start = Date.now(); | ||||||
|  |  | ||||||
|     const ret = func(); |     const ret = func(); | ||||||
|  |  | ||||||
|     const tookMs = Date.now() - start.getTime(); |     const tookMs = Date.now() - start; | ||||||
|  |  | ||||||
|     console.log(`${what} took ${tookMs}ms`); |     log.info(`${what} took ${tookMs}ms`); | ||||||
|  |  | ||||||
|     return ret; |     return ret; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user