mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
fix: fix building UI project (#2794)
* fix: fix building UI project * fix makefile * inputspec instead of config --------- Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -31,15 +31,6 @@ export class DurationToSecondsPipe implements PipeTransform {
|
||||
}
|
||||
}
|
||||
|
||||
export function convertBytes(bytes: number) {
|
||||
if (bytes === 0) return '0 Bytes'
|
||||
|
||||
const k = 1000
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k))
|
||||
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i]
|
||||
}
|
||||
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
||||
|
||||
const unitsToSeconds: Record<string, number> = {
|
||||
|
||||
Reference in New Issue
Block a user