diff --git a/src/public/app/widgets/collapsible_widgets/edited_notes.js b/src/public/app/widgets/collapsible_widgets/edited_notes.js
index b214ac17e..3f6851e73 100644
--- a/src/public/app/widgets/collapsible_widgets/edited_notes.js
+++ b/src/public/app/widgets/collapsible_widgets/edited_notes.js
@@ -12,6 +12,10 @@ const TPL = `
text-overflow: ellipsis;
}
+
+
No edited notes on this day yet ...
+
+
`;
@@ -31,18 +35,20 @@ export default class EditedNotesWidget extends CollapsibleWidget {
async doRenderBody() {
this.$body.html(TPL);
- this.$editedNotes = this.$body.find('.edited-notes-widget');
+ this.$list = this.$body.find('.edited-notes-list');
+ this.$noneFound = this.$body.find('.no-edited-notes-found');
}
async refreshWithNote(note) {
- // remember which title was when we found the similar notes
- this.title = note.title;
let editedNotes = await server.get('edited-notes/' + note.getLabelValue("dateNote"));
editedNotes = editedNotes.filter(n => n.noteId !== note.noteId);
+ this.$list.empty();
+ this.$noneFound.hide();
+
if (editedNotes.length === 0) {
- this.$body.text("No edited notes on this day yet ...");
+ this.$noneFound.show();
return;
}
@@ -50,8 +56,6 @@ export default class EditedNotesWidget extends CollapsibleWidget {
await treeCache.getNotes(noteIds, true); // preload all at once
- const $list = $(''); // not using
because it's difficult to style correctly with text-overflow
-
for (const editedNote of editedNotes) {
const $item = $('');
@@ -67,9 +71,7 @@ export default class EditedNotesWidget extends CollapsibleWidget {
$item.append(editedNote.notePath ? await linkService.createNoteLink(editedNote.notePath.join("/"), {showNotePath: true}) : editedNote.title);
}
- $list.append($item);
+ this.$list.append($item);
}
-
- this.$editedNotes.empty().append($list);
}
}
diff --git a/src/services/search/search_result.js b/src/services/search/search_result.js
index 9d0ea334a..a354cfdb7 100644
--- a/src/services/search/search_result.js
+++ b/src/services/search/search_result.js
@@ -19,6 +19,8 @@ class SearchResult {
computeScore(tokens) {
this.score = 0;
+ // matches in attributes don't get extra points and thus are implicitly valued less than note path matches
+
const chunks = this.notePathTitle.toLowerCase().split(" ");
for (const chunk of chunks) {
diff --git a/src/services/sync.js b/src/services/sync.js
index df926c77e..9aad2e3e7 100644
--- a/src/services/sync.js
+++ b/src/services/sync.js
@@ -101,7 +101,7 @@ async function doLogin() {
});
if (sourceIdService.isLocalSourceId(resp.sourceId)) {
- throw new Error(`Sync server has source ID ${resp.sourceId} which is also local. Your sync setup is probably trying to connect to itself.`);
+ throw new Error(`Sync server has source ID ${resp.sourceId} which is also local. This usually happens when the sync client is (mis)configured to sync with itself (URL points back to client) instead of the correct sync server.`);
}
syncContext.sourceId = resp.sourceId;