Merge pull request #3695 from Nriver/master

add natural sort for notes, introduce new label #sortNatural
This commit is contained in:
zadam
2023-03-30 23:49:48 +02:00
committed by GitHub
5 changed files with 48 additions and 9 deletions

View File

@@ -94,13 +94,13 @@ function undeleteNote(req) {
function sortChildNotes(req) {
const noteId = req.params.noteId;
const {sortBy, sortDirection, foldersFirst} = req.body;
const {sortBy, sortDirection, foldersFirst, sortNatural, sortLocale} = req.body;
log.info(`Sorting '${noteId}' children with ${sortBy} ${sortDirection}, foldersFirst=${foldersFirst}`);
log.info(`Sorting '${noteId}' children with ${sortBy} ${sortDirection}, foldersFirst=${foldersFirst}, sortNatural=${sortNatural}, sortLocale=${sortLocale}`);
const reverse = sortDirection === 'desc';
treeService.sortNotes(noteId, sortBy, reverse, foldersFirst);
treeService.sortNotes(noteId, sortBy, reverse, foldersFirst, sortNatural, sortLocale);
}
function protectNote(req) {