Basic working file rename modal
This commit is contained in:
parent
f4d0694670
commit
2716ff8841
8 changed files with 120 additions and 12 deletions
|
@ -4,3 +4,10 @@ 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(/^#(\/)+/, '/');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue