Skip to content

Build your personal knowledge base with Trilium Notes

links to documentation for attributes, links and search + fix for opening external links

azivneracbd18e8fc66
diff --git a/electron.js b/electron.js
index 867cbfc0b0..75d1e5fe50 100644
--- a/electron.js
+++ b/electron.js
@@ -36,7 +36,7 @@ async function createMainWindow() {
win.on('closed', onClosed);
win.webContents.on('new-window', (e, url) => {
- if (url !== mainWindow.webContents.getURL()) {
+ if (url !== win.webContents.getURL()) {
e.preventDefault();
require('electron').shell.openExternal(url);
}
diff --git a/src/public/javascripts/services/tree_builder.js b/src/public/javascripts/services/tree_builder.js
index 4cb026a089..27e038b8a7 100644
--- a/src/public/javascripts/services/tree_builder.js
+++ b/src/public/javascripts/services/tree_builder.js
@@ -77,14 +77,8 @@ async function prepareSearchBranch(note) {
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
- const noteIds = results.map(res => res.noteId);
-
- console.log("result: ", results);
-
// force to load all the notes at once instead of one by one
- const notes = await treeCache.getNotes(noteIds);
-
- console.log("NOTES", notes);
+ await treeCache.getNotes(results.map(res => res.noteId));
for (const result of results) {
const origBranch = await treeCache.getBranch(result.branchId);
@@ -100,8 +94,6 @@ async function prepareSearchBranch(note) {
treeCache.addBranch(branch);
}
- console.log("fullNote", fullNote);
-
return await prepareRealBranch(fullNote);
}
diff --git a/src/views/index.ejs b/src/views/index.ejs
index 768ef0aa09..83459361fe 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -220,7 +220,7 @@
<code>@abc @def some search string</code> - same combination</li>
</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>
</div>
@@ -302,6 +302,10 @@
</div>
<button class="btn btn-primary">Add note link <kbd>enter</kbd></button>
+
+ &nbsp; &nbsp; &nbsp; &nbsp;
+
+ <a target="_blank" href="https://github.com/zadam/trilium/wiki/Links">Documentation on links</a>
</form>
</div>
@@ -551,6 +555,10 @@
<form data-bind="submit: save">
<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>
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
+
+ <a target="_blank" href="https://github.com/zadam/trilium/wiki/Attributes">Documentation on attributes</a>
</div>
<div style="height: 97%; overflow: auto">