Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
small fixes
zadama73739d03eb8
diff --git a/src/public/javascripts/desktop.js b/src/public/javascripts/desktop.jsindex 55bfbadfd1..9f3675335c 100644--- a/src/public/javascripts/desktop.js+++ b/src/public/javascripts/desktop.js@@ -195,8 +195,6 @@ if (utils.isElectron()) {items,selectMenuItemHandler: ({command, spellingSuggestion}) => {if (command === 'replaceMisspelling') {- console.log("Replacing missspeling", spellingSuggestion);-webContents.insertText(spellingSuggestion);}}diff --git a/src/public/javascripts/dialogs/add_link.js b/src/public/javascripts/dialogs/add_link.jsindex c0e70f0914..fc2a03905c 100644--- a/src/public/javascripts/dialogs/add_link.js+++ b/src/public/javascripts/dialogs/add_link.js@@ -48,7 +48,9 @@ export async function showDialog(widget) {$autoComplete.on('autocomplete:cursorchanged', function(event, suggestion, dataset) {const noteId = treeService.getNoteIdFromNotePath(suggestion.path);- setDefaultLinkTitle(noteId);+ if (noteId) {+ setDefaultLinkTitle(noteId);+ }});noteAutocompleteService.showRecentNotes($autoComplete);diff --git a/src/public/javascripts/dialogs/options/credentials.js b/src/public/javascripts/dialogs/options/credentials.jsindex 63bbeae10b..f32c4b390b 100644--- a/src/public/javascripts/dialogs/options/credentials.js+++ b/src/public/javascripts/dialogs/options/credentials.js@@ -40,7 +40,7 @@ export default class ChangePasswordOptions {this.$form.on('submit', () => this.save());}- optionsLoaded(options) {console.log(options);+ optionsLoaded(options) {this.$username.text(options.username);}diff --git a/src/public/javascripts/widgets/type_widgets/book.js b/src/public/javascripts/widgets/type_widgets/book.jsindex b8ccd50103..260c180a9e 100644--- a/src/public/javascripts/widgets/type_widgets/book.js+++ b/src/public/javascripts/widgets/type_widgets/book.js@@ -140,7 +140,7 @@ export default class BookTypeWidget extends TypeWidget {});this.$content.append($('<div class="note-book-auto-message"></div>')- .append(`This note doesn't have any content so we display its children. Click `)+ .append(`This note doesn't have any content so we display its children. <br> Click `).append($addTextLink).append(' if you want to add some text.'));}diff --git a/src/public/javascripts/widgets/type_widgets/relation_map.js b/src/public/javascripts/widgets/type_widgets/relation_map.jsindex f54504f749..e87ae63fd5 100644--- a/src/public/javascripts/widgets/type_widgets/relation_map.js+++ b/src/public/javascripts/widgets/type_widgets/relation_map.js@@ -7,6 +7,7 @@ import toastService from "../../services/toast.js";import attributeAutocompleteService from "../../services/attribute_autocomplete.js";import TypeWidget from "./type_widget.js";import appContext from "../../services/app_context.js";+import utils from "../../services/utils.js";const uniDirectionalOverlays = [[ "Arrow", {@@ -165,10 +166,6 @@ export default class RelationMapTypeWidget extends TypeWidget {toastService.showMessage("Click on canvas to place new note");- // reloading tree so that the new note appears there- // no need to wait for it to finish- treeService.reload();-this.clipboard = { noteId: note.noteId, title };});@@ -208,10 +205,9 @@ export default class RelationMapTypeWidget extends TypeWidget {this.jsPlumbInstance.remove(this.noteIdToId(noteId));if (confirmDialog.isDeleteNoteChecked()) {- await server.remove("notes/" + noteId);+ const taskId = utils.randomString(10);- // to force it to disappear from the tree- treeService.reload();+ await server.remove(`notes/${noteId}?taskId=${taskId}&last=true`);}this.mapData.notes = this.mapData.notes.filter(note => note.noteId !== noteId);