mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	links to documentation for attributes, links and search + fix for opening external links
This commit is contained in:
		| @@ -36,7 +36,7 @@ async function createMainWindow() { | |||||||
|     win.on('closed', onClosed); |     win.on('closed', onClosed); | ||||||
|  |  | ||||||
|     win.webContents.on('new-window', (e, url) => { |     win.webContents.on('new-window', (e, url) => { | ||||||
|         if (url !== mainWindow.webContents.getURL()) { |         if (url !== win.webContents.getURL()) { | ||||||
|             e.preventDefault(); |             e.preventDefault(); | ||||||
|             require('electron').shell.openExternal(url); |             require('electron').shell.openExternal(url); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -77,14 +77,8 @@ async function prepareSearchBranch(note) { | |||||||
|     const results = (await server.get('search/' + encodeURIComponent(fullNote.jsonContent.searchString))) |     const results = (await server.get('search/' + encodeURIComponent(fullNote.jsonContent.searchString))) | ||||||
|         .filter(res => res.noteId !== note.noteId); // this is necessary because title of the search note is often the same as the search text which would match and create circle |         .filter(res => res.noteId !== note.noteId); // this is necessary because title of the search note is often the same as the search text which would match and create circle | ||||||
|  |  | ||||||
|     const noteIds = results.map(res => res.noteId); |  | ||||||
|  |  | ||||||
|     console.log("result: ", results); |  | ||||||
|  |  | ||||||
|     // force to load all the notes at once instead of one by one |     // force to load all the notes at once instead of one by one | ||||||
|     const notes = await treeCache.getNotes(noteIds); |     await treeCache.getNotes(results.map(res => res.noteId)); | ||||||
|  |  | ||||||
|     console.log("NOTES", notes); |  | ||||||
|  |  | ||||||
|     for (const result of results) { |     for (const result of results) { | ||||||
|         const origBranch = await treeCache.getBranch(result.branchId); |         const origBranch = await treeCache.getBranch(result.branchId); | ||||||
| @@ -100,8 +94,6 @@ async function prepareSearchBranch(note) { | |||||||
|         treeCache.addBranch(branch); |         treeCache.addBranch(branch); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     console.log("fullNote", fullNote); |  | ||||||
|  |  | ||||||
|     return await prepareRealBranch(fullNote); |     return await prepareRealBranch(fullNote); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -220,7 +220,7 @@ | |||||||
|                   <code>@abc @def some search string</code> - same combination</li> |                   <code>@abc @def some search string</code> - same combination</li> | ||||||
|               </ul> |               </ul> | ||||||
|  |  | ||||||
|               <a href="https://github.com/zadam/trilium/wiki/Labels">Complete help on search syntax</a> |               <a target="_blank" href="https://github.com/zadam/trilium/wiki/Search">Documentation on search</a> | ||||||
|             </p> |             </p> | ||||||
|           </div> |           </div> | ||||||
|  |  | ||||||
| @@ -302,6 +302,10 @@ | |||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <button class="btn btn-primary">Add note link <kbd>enter</kbd></button> |         <button class="btn btn-primary">Add note link <kbd>enter</kbd></button> | ||||||
|  |  | ||||||
|  |                 | ||||||
|  |  | ||||||
|  |         <a target="_blank" href="https://github.com/zadam/trilium/wiki/Links">Documentation on links</a> | ||||||
|       </form> |       </form> | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
| @@ -551,6 +555,10 @@ | |||||||
|       <form data-bind="submit: save"> |       <form data-bind="submit: save"> | ||||||
|         <div style="text-align: center"> |         <div style="text-align: center"> | ||||||
|           <button class="btn btn-large" style="width: 200px;" id="save-attributes-button" type="submit">Save changes <kbd>enter</kbd></button> |           <button class="btn btn-large" style="width: 200px;" id="save-attributes-button" type="submit">Save changes <kbd>enter</kbd></button> | ||||||
|  |  | ||||||
|  |                       | ||||||
|  |  | ||||||
|  |           <a target="_blank" href="https://github.com/zadam/trilium/wiki/Attributes">Documentation on attributes</a> | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <div style="height: 97%; overflow: auto"> |         <div style="height: 97%; overflow: auto"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user