web/satellite: remove ramda dependency
The package was barely used and the amount of code needed to remove it is minor. Also remove top-level package-lock, because it's not being used. Change-Id: Ifb4ec4fe7f4fa36ce6e707a33d47f04c583cbe6c
This commit is contained in:
parent
1d5b3e508c
commit
fe3856ff91
3
package-lock.json
generated
3
package-lock.json
generated
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"lockfileVersion": 1
|
|
||||||
}
|
|
1
web/satellite/package-lock.json
generated
1
web/satellite/package-lock.json
generated
@ -23,7 +23,6 @@
|
|||||||
"pbkdf2": "3.1.1",
|
"pbkdf2": "3.1.1",
|
||||||
"pretty-bytes": "5.6.0",
|
"pretty-bytes": "5.6.0",
|
||||||
"qrcode": "1.4.4",
|
"qrcode": "1.4.4",
|
||||||
"ramda": "0.27.1",
|
|
||||||
"stripe": "8.96.0",
|
"stripe": "8.96.0",
|
||||||
"vue": "2.6.12",
|
"vue": "2.6.12",
|
||||||
"vue-class-component": "7.2.5",
|
"vue-class-component": "7.2.5",
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
"pbkdf2": "3.1.1",
|
"pbkdf2": "3.1.1",
|
||||||
"pretty-bytes": "5.6.0",
|
"pretty-bytes": "5.6.0",
|
||||||
"qrcode": "1.4.4",
|
"qrcode": "1.4.4",
|
||||||
"ramda": "0.27.1",
|
|
||||||
"stripe": "8.96.0",
|
"stripe": "8.96.0",
|
||||||
"vue": "2.6.12",
|
"vue": "2.6.12",
|
||||||
"vue-class-component": "7.2.5",
|
"vue-class-component": "7.2.5",
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
import S3 from "aws-sdk/clients/s3";
|
import S3 from "aws-sdk/clients/s3";
|
||||||
import * as R from "ramda";
|
|
||||||
|
|
||||||
const listCache = new Map();
|
const listCache = new Map();
|
||||||
|
|
||||||
@ -52,17 +51,20 @@ export default {
|
|||||||
size: (a: BrowserObject, b: BrowserObject): number => a.Size - b.Size
|
size: (a: BrowserObject, b: BrowserObject): number => a.Size - b.Size
|
||||||
};
|
};
|
||||||
|
|
||||||
// sort by appropriate function
|
// TODO(performance): avoid several passes over the slice.
|
||||||
const sortedFiles = R.sort(fns[state.headingSorted], state.files);
|
|
||||||
|
|
||||||
|
// sort by appropriate function
|
||||||
|
const sortedFiles = state.files.slice();
|
||||||
|
sortedFiles.sort(fns[state.headingSorted]);
|
||||||
// reverse if descending order
|
// reverse if descending order
|
||||||
const orderedFiles =
|
if(state.orderBy !== "asc") {
|
||||||
state.orderBy === "asc" ? sortedFiles : R.reverse(sortedFiles);
|
sortedFiles.reverse();
|
||||||
|
}
|
||||||
|
|
||||||
// display folders and then files
|
// display folders and then files
|
||||||
const groupedFiles = [
|
const groupedFiles = [
|
||||||
...orderedFiles.filter((file) => file.type === "folder"),
|
...sortedFiles.filter((file) => file.type === "folder"),
|
||||||
...orderedFiles.filter((file) => file.type === "file")
|
...sortedFiles.filter((file) => file.type === "file")
|
||||||
];
|
];
|
||||||
|
|
||||||
return groupedFiles;
|
return groupedFiles;
|
||||||
|
Loading…
Reference in New Issue
Block a user