first implementation of downloaded files viewer

This commit is contained in:
2023-05-24 13:19:04 +02:00
parent 3737e86de3
commit 908f4c6636
7 changed files with 276 additions and 31 deletions

View File

@@ -82,6 +82,10 @@ export function getHttpRPCEndpoint() {
return `${window.location.protocol}//${localStorage.getItem('server-addr') || window.location.hostname}:${localStorage.getItem('server-port') || window.location.port}/http-rpc`
}
export function getHttpEndpoint() {
return `${window.location.protocol}//${localStorage.getItem('server-addr') || window.location.hostname}:${localStorage.getItem('server-port') || window.location.port}`
}
export function formatGiB(bytes: number) {
return `${(bytes / 1_000_000_000).toFixed(0)}GiB`
}