1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

Merge branch '7.1' into master

This commit is contained in:
lian
2020-09-30 11:05:44 +08:00
27 changed files with 524 additions and 220 deletions

View File

@@ -1042,24 +1042,6 @@ export const Utils = {
return items;
},
sortTraffic(items, sortBy, sortOrder) {
let comparator;
switch(sortOrder) {
case 'asc':
comparator = function(a, b) {
return a[sortBy] < b[sortBy] ? -1 : 1;
};
break;
case 'desc':
comparator = function(a, b) {
return a[sortBy] < b[sortBy] ? 1 : -1;
};
break;
}
items.sort(comparator);
return items;
},
/*
* only used in the 'catch' part of a seafileAPI request
*/