mirror of
https://github.com/zadam/trilium.git
synced 2025-12-21 23:59:59 +01:00
added "show recent notes" widget
This commit is contained in:
@@ -139,6 +139,8 @@ function createNote(node, parentKey, target) {
|
||||
});
|
||||
}
|
||||
|
||||
recentNotes = [];
|
||||
|
||||
function loadNote(noteId) {
|
||||
$.get(baseUrl + 'notes/' + noteId).then(function(note) {
|
||||
globalNote = note;
|
||||
@@ -161,10 +163,22 @@ function loadNote(noteId) {
|
||||
|
||||
$(window).resize(); // to trigger resizing of editor
|
||||
|
||||
addRecentNote(noteId, note.detail.note_title);
|
||||
|
||||
noteChangeDisabled = false;
|
||||
});
|
||||
}
|
||||
|
||||
function addRecentNote(noteId, noteTitle) {
|
||||
// if it's already there, remove the note
|
||||
recentNotes = recentNotes.filter(note => note.noteId !== noteId);
|
||||
|
||||
recentNotes.unshift({
|
||||
noteId: noteId,
|
||||
noteTitle: noteTitle
|
||||
});
|
||||
}
|
||||
|
||||
function encryptNote() {
|
||||
let password = prompt("Enter password for encryption");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user