mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
add the ability to sort notes by folders first, closes #2649
This commit is contained in:
@@ -94,13 +94,13 @@ function undeleteNote(req) {
|
||||
|
||||
function sortChildNotes(req) {
|
||||
const noteId = req.params.noteId;
|
||||
const {sortBy, sortDirection} = req.body;
|
||||
const {sortBy, sortDirection, foldersFirst} = req.body;
|
||||
|
||||
log.info(`Sorting '${noteId}' children with ${sortBy} ${sortDirection}`);
|
||||
log.info(`Sorting '${noteId}' children with ${sortBy} ${sortDirection}, foldersFirst=${foldersFirst}`);
|
||||
|
||||
const reverse = sortDirection === 'desc';
|
||||
|
||||
treeService.sortNotes(noteId, sortBy, reverse);
|
||||
treeService.sortNotes(noteId, sortBy, reverse, foldersFirst);
|
||||
}
|
||||
|
||||
function protectNote(req) {
|
||||
|
||||
Reference in New Issue
Block a user