Use easy-peasy to store file state data

This commit is contained in:
Dane Everitt 2019-08-04 14:58:31 -07:00
parent 918e0e2947
commit 5f59210c85
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 110 additions and 34 deletions

View file

@ -4,10 +4,3 @@ export function bytesToHuman (bytes: number): string {
// @ts-ignore
return `${(bytes / Math.pow(1000, i)).toFixed(2) * 1} ${['Bytes', 'kB', 'MB', 'GB', 'TB'][i]}`;
}
/**
* Returns the current directory for the given window.
*/
export function getDirectoryFromHash (): string {
return window.location.hash.replace(/^#(\/)+/, '/');
}